Search code examples
c#asp.nettfsregistrykey

Error : Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0' is denied. Due to Tfs pendEdit


I need your help because my asp.net App is working on Local but on server it's create this error:

Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0' is denied.

Code:

WebForm1.pathCollection.TryGetValue(Form.releaseList.SelectedItem.ToString(), out value);

TfsUtils.CheckChangeExist(value + "\\" + Form.envList.SelectedItem.ToString());
File.SetAttributes(value + "\\" + Form.envList.SelectedItem.ToString(), FileAttributes.Normal);
File.WriteAllText(value + "\\" + Form.envList.SelectedItem.ToString(), WebForm1.tmpSave);
WebForm1.SessionVar.Ws.PendEdit(value + "\\" + Form.envList.SelectedItem.ToString());

This code is inside a try-Catch and it stop working before the line PendEdit();

Do you have any suggestions ?

Edit: My problem could be similar to this topic.

Does TFS API require Visual Studio?


Solution

  • The solution was:

    • Go Application Pools of IIS, select the website where my app is hosted.
    • set "Load User Profile"=True.
    • Restart the Website