Sunday, December 05, 2004 - Posts

Solution: Unexpected error during portfolio creation in Visual Studio Team System.

After I installed foundation server successfully, I tried creating portfolio project in VSTS. Portfolio project was created successfully, but with the following error. 

unexpected error.:SyncWithAD_Lookup was unable to get a domain for <domainname>\<username>

SyncBisTree: ChangerId is NULL 

Due to this error I couldn’t create any workitem in that project. I thought this error is due to some wrong configuration of domain user name in foundation server. For more than two days I tried various options like changing identity for foundation server, for IIS, and running foundation server in administrator account and many more… but I couldn’t solve the problem…  

Then instead of trying all this options, I opened the project creation code of VSTS using .NET Reflector. Thanks to Lutz Roeder. I traced the problem with the help of stack trace of the exception. I was surprised to see that problem is not in the application tier of foundation server, it’s in data tier. I started the SQL Profiler, and again I created the portfolio project to trace the exact SP in which I am getting this error. Finally I found out this error is coming in SyncWithAD_Lookup SP in pssshared database. Luckily this SP is not encrypted. So I could get the text of Stored Procedure.  

In that SP, they are trying to check the domain details of the logged on user. But the assumption in that SP is that, email nick name (saravanak in saravanak@abc.com) and logged in user name should be same. I just commented the code that verifies this assumption, I could create portfolio project without this error. But I got Security exception error. This error was also coming because of same reason, but I couldn’t read the SP which is raising this error as it is encrypted. Then I opened the Table “ADObjects” which is storing details about user account. I updated that table so that mailnickname and logged on user name to same value. After that I could create portfolio project without any error. 

I don’t know why VSTS team is assuming mailnickname and login name should be same or did I missed anything during foundation server installation. I am not thinking too much on that, as I am able to play with VSTS now without any problems.

with 2 Comments