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" />
</appSettings>
</configuration>

If this does not help, following some of the other suggestions mentioned here may help.
Reference:
http://blogs.msdn.com/b/narend/archive/2006/07/29/682032.aspx

Comments

Popular posts from this blog

WPF How to Dispose ViewModel when the associated UserControl (Not Window) closes?

C# How to unit test Dispatcher

WPF: How to Deep Copy WPF object (e.g. UIElement) ?