Does TFS API require Visual Studio?

2019-07-19 02:29发布

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条回答
萌系小妹纸
2楼-- · 2019-07-19 03:23

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.

查看更多
登录 后发表回答