Does TFS API require Visual Studio?

爷,独闯天下 提交于 2019-12-13 16:39:28

问题


I am trying to check in, check out, GetLatest, etc. with the TFS API using C#. For the development PC and an Admin user this works flawlessly. however, on a dedicated maschine without VS 2010 installed and the TFS user being a non-Admin this does nto work. I get the following error: *

Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0' is denied. 2012-10-08 14:58:30 [...] error : at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity) at Microsoft.TeamFoundation.Client.UIHost.get_UserRegistryRoot() at Microsoft.TeamFoundation.VersionControl.Client.Workstation.get_GetLatestOnCheckout()

*

I wonder if this has to do with Administrator rights? The TFS "user" is actually a website running under that under account, so it is and is not supposed to be an Admin.

I tried running a test console app with my own credentials on the same maschine, and it works. So this is a credentials.

Can anyone help? Is it enough to make the website user account an Admin?

And: what does it want to access the registry when creating the local workspace?


回答1:


We've seen this kind of error when you are running a website under the application pool identity but the application pool identity is set to not load the user profile (and therefore has no HKCU registry access).

In IIS, under the advanced settings, set "Load User Profile"=True

See http://geekswithblogs.net/ProjectLawson/archive/2009/05/05/iis-system.web.aspnethostingpermission-exception-on-windows-7-rc.aspx

.. for more info.



来源:https://stackoverflow.com/questions/12782679/does-tfs-api-require-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!