Posts

Showing posts from July, 2010

Microsoft.TeamFoundation.WorkItemTracking.Client.ClientException: Access is denied.

Microsoft.TeamFoundation.WorkItemTracking.Client.ClientException: Access is denied. While accessing the TFS API to get a work item from a WCF service. I was getting the above mentioned error. After doing some research and doing some trial and error I found the solution. 1) The WCF service needs to use a separate application pool that runs under a domain account that has rights to view collection on TFS server. 2) Team Explorer needs to be installed on the web server running the WCF service 3) Add the following setting to the WCF service's web.config file. TFS uses the folder to store cache entries. The folder needs to exist outside the root folder of the service and the domain account the service is running under, needs to have at least read and write permissions to the folder specified in the app setting (e.g. E:\FolderForCache) <configuration> … <appSettings> <add key="WorkItemTrackingCacheRoot" value="E:\FolderForCache" /> <

Common .Net Active Directory Exceptions

Any application dealing with Active Directory lookup must handle the following 3 exception types 1) InvalidOperationException Explanation:  2) NotSupportedException Explanation: The Active Directory provider does not support the operation performed (e.g. .FindAll(), .FindOne()) 3) COMException Explanation: This exception is thrown when the machine performing AD lookup, cannot access the provider. Reference: http://msdn.microsoft.com/en-us/library/system.directoryservices.directorysearcher.findall.aspx