Sunday, March 30, 2008

ASP.Net Remote Debugging & Local Host Alias

Visual Studio Error: "Unable to start debugging unknown user name or bad password"

Here is an even better solution than using locolhost with some bugus port. There was a security change in SP1 for Windows 2003 that prevents debugging on anything but localhost. There's an obscure KB article about it here:

http://support.microsoft.com/?kbid=896861

The fix is simple:

1. Click Start, click Run, type regedit, and then click OK.
2. In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. Right-click Lsa, point to New, and then click DWORD Value.
4. Type DisableLoopbackCheck, and then press ENTER.
5. Right-click DisableLoopbackCheck, and then click Modify.
6. In the Value data box, type 1, and then click OK.
(reboot may be necessary)

If the other computer is truly remote, it will be necessary to define debugging permissions on that machine:
Click Start, click Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Remote Debugger Configuration Wizard.

Also configure in Administrative Tools: "Local Security Policy" / "User Rights Assignment". The policy "Debug Programs" should be granted to your User.

No comments:

Share Links