Miscellaneous
Earlier today I was informed by Microsoft that I have been awarded an MVP (Most Valuable Professional) in Microsoft Office SharePoint Server 2007. I just wanted to post a great "thanks" to those people who nominated and voted for me especially my former colleague, Eli Ribbilard and my new MVP lead Sasha Krsmanovic. I'd also like to extend my sentiments to my blog readers who read my blog and email me with questions and enlighten me with their warm comments. They truly make me feel to be part of our SharePoint community and keep me well-motivated to contribute as much as possible.
I feel much honored to have received this award and truly enjoy being deeply involved in our community. Thanks Microsoft and everyone!
Microsoft Surface will be released this winter and is a breakthrough technology .This amazing technology will bring computers to another level for sure. Surface Computing is no longer a dream. Imagine if this is combined with real time collaboration , then this world would be a lot easier place to live in!
Today, a close relative tried to boggle my mind by sending a link to this fantastic puzzle: http://digicc.com/fido/
Well, it was clever, but not super difficult to solve.The secret is the subtraction operation and 9 as a strange number with awesome mathematical characteristics. When you subtract two numbers with same digits, but jumbled as in this puzzle, the result is always divisible by nine(e.g.198 or 7974 in the following examples). Summing up all the digits in the result number will also make a new number divisible by nine(1+9+8=18, 7+9+7+4=27 ). From here onwards, finding out the missing (circled) digit is just 10 lines of code plus some Flash/UI talents :)
1) Here is the pattern for 3 digit numbers:
Let's assume that you have entered 198 (As the result of subtraction for 321-123)
if you have circled 1 >> 98 >> 9+8 =17 >> 1+7 = 8 >> 9-8 = 1 >>Answer: 1
if you have circled 9>> 18 >> 1+8 =9 >> Since it is a single digit number, there is no need for additional steps>> Answer : 9
if you have circled 8>> 19 >> 1+9=10 >> 1+0 = 1 >> 9-1 =8 >> Answer :8
2) Here is the pattern for 4 digit numbers:
Let's assume that you have entered 7974 (As the result of subtraction for 9213-1239):
if you have circled 7 >> 974 >> 9+7+4 =20 >> 2+0= 2 >> 9-2 = 7 >>Answer: 7
if you have circled 9>> 774 >> 7+7+4 =18 >> 1+8 = 9 >> Since it is a single digit number, there is no need for additional steps >> Answer : 9
if you have circled the second 7>> 974 >> 9+7+4 =20 >> 2+0= 2 >> 9-2 = 7 >>Answer: 7
if you have circled 4>> 797 >> 7+9+7 =23 >> 2+3 =5 >> 9-5 = 4 >>Answer: 4
Try it out , it is fun!
Well, let's take a break from the SharePoint/technology in favor of a more personal/marketing post........
Assaf Koren , my volleyball partner and a close friend in Vancouver has come up with a great tool to enable users of Orkut to send and receive instant scraps *without* a web browser. Check out their great product here.
I am sure that the Persian community with all that brutal filtering inside the country will appreciate their innovative idea.
Happy Scrapping!!!
In the process of applying MOSS 2007 Beta 2 Technical Refresh update , you require to uninstall Windows Workflow Foundation Beta 2.2 (Build 3807) and then install Microsoft .NET Framework 3.0 - Release Candidate from http://www.microsoft.com/downloads/details.aspx?FamilyId=19E21845-F5E3-4387-95FF-66788825C1AF&displaylang=en that installs the latest version of Windows Workflow Foundation on your MOSS server. The .Net Framework (dotnetfx3setup.exe) that you will get by clicking on the link above is a small redistributable package that downloads the required components during setup.This means that you need to have an active Internet Connection (or ICS) in your server. Since most of us install Beta softwares on Virtual Machines, and on the other hand sharing the internet between host and guest operating systems is a little bit more of a challenge; you may want to try the .NET Framework 3.0 redistributable package that is available as a stand-alone executable file named dotnetfx3.exe.
If you have any trouble locating this file (as I did), refer to this URL then : http://download.microsoft.com/download/D/C/0/DC09D14E-494D-4E5A-A1BA-783554D9D8FE/dotnetfx3.exe
As far as I know, there is no way to perform a SELECT TOP 10 query on a disconnected Recordset in ADO.NET. However, you can create a DataView over the target table and use the technique described below to extract Top 10 records.
As you can see in the below excerpt, I am trying to return Top 10 records of my ds dataset using a method called “GetTopTen”. First of all, I have assigned the defaultView of the only DataTable in input dataset named "SITE_DT" to a DataView object and then have sorted the result based on "Total_Size" field. This guarantees that our result (no matter how many records is returned) are always sorted in a descending manner.
Next, I have cloned the schema of first DateTable to another DataTable and added the new DataTable to a completely new DataSet. ADO.NET normally does not let you add a DataTable (neither a DataRow) directly from one dataset to another, so you have to clone it in a way. Finally I've just grunt it out the old-fashioned way by looping through each row of the DataView object and adding them to a new DataTable. My method ends by returning the new dataset which contains the Top 10 records based on "Total_Size". This might not be the best option for you, but perfectly works in my case.
public DataSet GetTopTen(DataSet ds)
{
Try
{
DataView dwDs= ds.Tables["SITE_DT"].DefaultView;
dwDs.Sort="Total_Size DESC";
DataSet dss = new DataSet();
DataTable dt = dwDs.Table.Clone();
dss.Tables.Add(dt);
int counter = 0;
if(dwDs.Count > 10)
counter = 10;
else
counter = dwDs.Count;
for (int i=0; i < counter; i++)
{
DataRow dv = dwDs[i].Row;
dss.Tables[0].ImportRow(dv);
}
dss.AcceptChanges();
return(dss);
}
catch(Exception e)
{
throw e;
}
}
I have recently done an extensive research on the possibility of tweaking "Shared Workspace" task pane for SharePoint and came to conclusion that there is no way of modifying it. I have two reasons to support it :
1) SharePoint 2003 doesn't have "hide features" in its design model. Everything is shown to everyone ,but actions can only be completed by people who have right permissions. Having said this , I think any mechanism to hide features, on the server side, are not seen in SharePoint 2003 architecture. I went through all the registry keys related to office 11.0 in the "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0" and "HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0" and I could not find any keys in regards to Disabling/Enabling "Shared Document" workspace features.
2) According to my research on the client side, all office applications (like word, Excel and etc) provide a customizable mechanism to end users to customize their environments, but they DO NOT really provide facilities for administrators to lock things down.The "Shared Workspace" pane is not programmable which means that there is not such a real programmability model to override the task pane behavior.
We might be able to write Macros or leverage Policies (as stated in Office Resource Kit) to disable a task pane completely ,but who wants to take this great collaboration feature away from office ?
Look at this answer by Mike Hernandez who is the program manager of VSTO (Visual Studion Tools for Office) Team:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=197143&SiteID=1
If you have ever worked with NAnt , you probably know that there is an xsd for .build files that provides intellisense in VS.NET 2003. After you add a task dll ( In my case NAnt.SharePoint.Task.dll) or install a newer version of NAnt , there are some manual steps required to make VS recognizes the new schema. Instead of the manual process, you can get NAnt itself to update/generate its schema for the internal use of VS.NET 2003 by creating a build file and calling the command line as described below:
1) Create UpdateCreateSchema.build file with the following NAnt snippet and save the file in for example c:\nantGen folder :
xml version="1.0" encoding="utf-8" ?>
<project name=" UpdateCreateSchema" default="genschema">
might be different in your installation-->
<property name="SchemaFile" value="C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml\NAnt.xsd"/>
<target name="genschema">
<nantschema output="${SchemaFile}" target-ns="http://nant.sf.net/schemas/nant.xsd"/>
target>
project>
2) Assuming Nant has been properly added to Path variable, open a command prompt and change directory to c:\nantGen . Call the following command line:
nant file: UpdateCreateSchema.build
3) Now that you have deployed the latest version of NAnt.xsd file to the C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml folder , you must go through all of your build files in your project and
a.Make VS.NET recognize your .build file as an XML file (If already done, skip this step then ):
In "Solution Explorer", right-click a .build file and choose "Open With". In the "Open With" dialog, select "HTML/XML Editor" and click the "Set as Default" button. Enable intellisense for each .build file.
b.When file is opened by the "HTML/XML Editor" , in the properties window , set the targetSchema to the newly updated/generated Nant.xsd
4) Boom. You'll get intellisense. Enjoy!
For ASP.NET developers who are used to name their configuration files "web.config" , working with configuration files of Windows forms application in VS.NET is a little bit tricky. Let's assume that you have an application called "TestConig" which generates the executable TestConig.exe. If you ever decide to add a config file to this app using visual studio ,there are couple of things to remember:
1) Add an new item to your project and name it App.config which is basically nothing more than an XML file.
2)Build your project and look in the build output directory. The bin\Release or bin\Debug directory for C# projects
Surprisingly you'll see that there is a file called TestConig.exe.config and App.config is not what the configuration file ends up getting called, this is just what it's called inside a Visual Studio .NET project.
I guess the question is that why VS.NET behaves like that? and the answer is simple:
TestConig.exe.config file is a copy of the App.Config file.VS.NET copies it so that you don't need to maintain a separate debug and release version of this file. And they use the name TestConig.exe.config because that's the magic name they've chosen for this behavior
Deployment: In deployment you need to make sure that the App.config file is renamed TestConig.exe.config or just simply pick up TestConig.exe.config from debug or release folder.
As an ASP.NET developer, what really bugs me the most is the security issues related to current web context, in which you do your coding .I have been recently working on an ASP.NET project, which requires me to frequently query Active Directory to obtain necessary information about users, groups and so on. I mostly use System.DirectoryServices and its two famous classes DirectoryEntry and DirectorySearcher. I guess the biggest challenge working with Active Directory from a web context is that fact that AD requires a primary token all the time. As long as IIS server has a user name and password (not just a hash of the password as the result of NTLM authentication) and can hand it over to AD you are fine, otherwise you are toast and soon you will end up receiving various nasty messages from AD. If I can convince my clients to pass credentials to System.DirectoryServices code using the DirectoryEntry class constructor or by using the Username and Password properties, then this method is my preferred one. However you should consider securing your credentials and not leave them in clear text anywhere in your app. For the sake of demonstration, let’s assume that you have written a piece of code to authenticate to AD to do some work:
DirectoryEntry adSharepointUsers=null;
try
{
adSharepointUsers = new DirectoryEntry("LDAP://mydomain","ADUser","password");
........
}
catch(Exception ex)
{
throw ex;
}
Everything works fine on your development machine, but once you have deployed your app to the production ,you will be trapped by "The authentication mechanism is unknown" error. If that's the case you might try passing username with the domain name at the same time
ie: MyDomain/ADUser.
DirectoryEntry adSharepointUsers=null;
try
{
adSharepointUsers = new DirectoryEntry("LDAP://MyDomain","MyDomain/ADUser","password");
........
}
catch(Exception ex)
{
throw ex;
}
Yes, it does the trick!
The official release of yet another discovery of server virtualization technologies is available for *FREE* download on Microsoft’s web site. Microsoft Virtual Server 2005 R2 caught my eyes soon in a way that I am almost done with transferring all my virtual machines from VMWare to this great product. I have also installed it on my laptop and since my laptop has no physical net connection, I had quite a hard time to configure networking connection between guest and host operating systems. It is fairly easy to do so in VMWare by utilizing VPN connection (Host only –VMNet1), but in virtual server 2005 ,you must follow some steps to properly setup the connection.
1)Log in to the host computer using an administrator account
2)Install Microsoft Loopback adaptor on the host OS only.For more information on how to install Microsoft Loopback adaptor check this link
3)Make sure Virtual Machine Network Services is checked in Microsoft Loopback adaptor
4)Set Internet Protocol (TCP/IP) in the host to use an static IP address from a non-routable range like 192.168.x.y
Note: The tricky part is here. First of all x in host IP address must be exactly same as x in guest IP address (You should set the guest OS to use an static IP address too, you will see it later in this post). Leave the subnet mask to be 255.255.255.0 on the host and do not set a value for default gateway. The most important part is that if your primary Ethernet card or any other adaptor (in my case, my VMWare VPN) is using x ,then you won’t be able to connect host to guest. In that case you must choose a different value for x.
5)Set Internet Protocol (TCP/IP) in the guest to use an static IP address from a non-routable range like 192.168.x.z. As I mentioned above x must be same as the host ,and again no default gateway
6)file and printer sharing must be exempted from the guest’s firewall (if you are planning to remote desktop to the guest computer from the host ,do the same for remote desktop as well)
7) Go to virtual server administration console and change your virtual network to use Microsoft Loopback adaptor . If the option is not there uninstall/reinstall the Virtual Server 2005. restart the guest operating system and you should be good to go!
Yesterday, I was just trying to attach a DIME attachment to my soap message and send it to a WSE 2.0 enabled web service resides on my virtual server (VMWare). I was getting “Message Expired” or “An error was discovered processing the header” all the time. It was obvious that this was happening on the client since soap request was not reaching to the server (I was monitoring the server by MSSOAPTrace and nothing was there). After I did a lot of changes to the client I came to realize that Date and Time on the server was out of synch with client. That was all about it.
Let's assume that you are going to interview someone for a supervision position. Like any other tasks, you have to define a strategy in advance to manage a successful interview and to achieve what you want to get the most out of that particular person for whom you have arranged the interview. Here are some questions /suggestions that I'm aware of.Just go ahead and pick the ones which best suit your case. They are a bit tricky, so you may want to ask them in a way that he doesn’t think you are trying to make him look silly or bringing him down. Nodding your head to signal approval and smiling are very effective ways to get him in the mood and to get him breathless with your level of professionalism as well.
The first important thing to be considered is that instead of asking direct questions like what is your favorite…? Or how do like ……? ; try to ask scenario-based questions. For instance throw him one of your everyday hassles or challenges at work and then ask him what his plan is to approach or probably solve it. This also implies that you know your business bottom lines. Well, these scenarios should not be very difficult to be contextualized or realized .People normally start with very simple ones and make it harder as they go deeper.
Now, let’s have a look at the questions:
Scenario-based questions:
1)what have you done to prepare yourself to be a supervisor? >>I personally like this one!! It reveals a lot.
2)We don’t have a facility to do bluh bluh bluh (archiving the tickets or recording the feature requests or etc)? Can you think about a solution?
3)There is a customer on the line complaining about one of us. Could you please walk me through, exactly what you usually do in these circumstances?
4)How do you manage client’s requests with your team’s ability and availability? How do you reprioritize the tasks?
General questions:
1)What aspect of supervision do you find the most difficult?
2)How do you decide what to delegate and to whom?
3)In what kind of work environment are you most comfortable?
4)What is the most important quality a supervisor should have?
The last and the most important thing to remember is that if you feel that he is not an able person; don’t make him awkward by asking difficult questions. It is not fare.
Happy interviewing and good luck!
Quite frankly this subject is a bit tricky and usually highly subjective point of view, so you probably never get a clear answer, unless you spend a considerable amount of time to find out different methodologies and compare them with your needs and start forming your own strategy based on different scenarios. Hereby I also tried to address it from my own perspective and according to my experience. In other words this is what I do in most of my work with technology.
- Rushing blindly into technology, without being fully aware of business needs and conducting more research on real-world business problems instead of more research on the product itself is something that you seriously may want to avoid.
- Again it varies from one case to another case, but generally speaking I'd prefer to have the implementation to a minimum level of risk from the technology perspective and once achieved, I’ll take a higher level cooperation between technology and business process. I have not invented this approach.It is proven by a lot of ERP vendors and is known to be very effective. .
- To get more out of your technology investment, the easiest way is to INTEGRATE everything together to have a better understanding on whether you need to apply technology or not. Why having bundles of software and services if you can easily package everything?
- Always ask yourself questions as follows in advance :
- Do I have a clear hard look at the Return on Investment (ROI) if I ever decide to bring the technology in-house?
- What is the Total Cost of Ownership (TCO) and how it affects your other objectives?
- Variety of solutions in the today's IT market has made most of enterprise environments heterogeneous which means different platforms and that means Maintaining Compatibility (my nightmare;-)) - Is the technology (you are bringing in) platform dependant or completely neutral?
- Software as a Service (SaaS) or On-demand concept in some cases is a better way to go for. Think ahead to see if you can use the technology as a service with low capital investments and rapid realization of the business benefit.
To wrap it up, I believe that true business value comes through how expertise is delivered, and the way that expertise is delivered is not necessarily diving into the new technology. Watch out not to get trapped by toolsets, utilities and etc, which are notoriously designed to help you to accomplish things better rather than putting you in trouble!
Happy incorporating and good luck with your business
Microsoft finally released the Beta1 of Windows Vista (Code named longhorn) for MSDN subscribers yesterday and soon it would be available for the public.I was just mucking around with new windows a bit this morning.It's really cool,particularly the new architecture used in this version which is all managed.I can not wait until I start developing apps using Indigo and Avalons.I found this community interesting for WINFX developer and Longhorn maniacs:
http://www.longhornblogs.com/default.aspx?GroupID=2