• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Unable to attach to process (on localhost)

MSDN Blogs > Never doubt thy debugger > Unable to attach to process (on localhost)

Unable to attach to process (on localhost)

Rate This
Carlo Cardella
23 Feb 2007 9:09 AM
  • Comments 9

Another interesting one I got a few days ago: after installing the SP1 for Visual Studio 2003, the customer was unable to debug his web application (on localhost) neither pressing F5 nor attaching to the target w3wp.exe process. As you can imagine, removing SP1 the problem disappeared. Moreover they had multiple machines running the same OS and software that worked fine, only one particular machine was affected by this problem; more interestingly, other developers were able to remotely debug their application hosted on the affected server, so only debugging on localhost was not working (WinForm debugging was also working fine). Of course the account used to login on the server was a local administrator.

The target platform we were running on was Windows Server 2003 R2 x64 on AMD Operton 280 (dual core, 2.4GHz) with 4GB RAM; IIS is configured to run in 32 bit mode (w3svc/AppPools/Enable32bitAppOnWin64 = TRUE), and of course Visual Studio .NET 2003 with Service Pack 1.

To start troubleshooting this I did a quick research in our internal docs and it turner out that his is a known issue due to loopback check; basically the reason is because the underlying DEBUG request is getting a 401 response, causing the debugger to fail. There are two options to resolve this problem:

Method 1: Disable the loopback check

  • Click Start, click Run, type regedit, and then click OK
  • In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  • Right-click Lsa, point to New, and then click DWORD Value
  • Type DisableLoopbackCheck, and then press ENTER
  • Right-click DisableLoopbackCheck, and then click Modify
  • In the Value data box, type "1", and then click OK
  • Quit Registry Editor

Method 2: Specify host names

To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:

  • Click Start, click Run, type regedit, and then click OK
  • In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  • Right-click MSV1_0, point to New, and then click Multi-String Value
  • Type BackConnectionHostNames, and then press ENTER
  • Right-click BackConnectionHostNames, and then click Modify
  • In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK

The customer applied the first method and then happily started debugging his application smile_regular

 

Cheers

  • 9 Comments
ASP.NET, Debugging/Windbg, Visual Studio
Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
Comments
  • Shiva
    14 May 2007 8:11 PM

    This doesn't seem to work . I have the same issue and doesn't seem to resolve.

  • Carlo Cardella
    15 May 2007 1:41 AM

    Shiva, do you have the same configuration above? If you are running a x64 OS, are you editing the 32bit or 64bit registry? Your IIS is 32bit?

    A solution for a customer does not necessarily work for another one; if you are willing to resolve this problem you can open a Service Request with CSS (http://support.microsoft.com) to investigate this...

  • Shiva
    15 May 2007 12:53 PM

    Yes I have the exact configuration. I have a x64 OS. I am running IIS 64bit.  I enabled IIS to use 32 bit using Enable32bitAppOnWin64.

    "Are you editing the 32bit or 64 bit registry " Thats an interesting question. I just did regedit and put in the values there. Yes I can open a ticket.

  • Shiva
    15 May 2007 1:16 PM

    Also from what I understand, the HKLM\System is the same for both 64 bit and 32 bit, only the software part differs.

  • Carlo Cardella
    16 May 2007 1:48 AM

    If you simply type "regedit" in the "Run..." dialog you'll have the 64bit version, while if you want the 32bit one you have to manually execute C:\Windows\SysWOW64\regedit.exe.

    Anyway you're right, the HKLM\System trees are equals in the two editors...

    If you'll open a ticked and are based in EMEA there are chances that can take it (would also be useful to update this post :-))

  • AD
    19 Sep 2007 1:22 AM

    I like Visual Studio but this is really not acceptable. The proposed solution does not work for me either. The service pack still introduces the problem (as of Sep. 2007) and to top it all off, the SP cannot easily be uninstalled. Add/Remove programs does not even show it.

  • Carlo Cardella
    19 Sep 2007 1:45 AM

    Ad, Shiva,

    The inability to rebug a web application (as the majority of other problems) may be due to a lot of different causes, and of course the solution for "cause A" may be completely ineffective for "cause B". If the solution I propose here does not help, you're likely to have the same symptoms but due to a different cause.

    Moreover, have you already had a look at other possible solutions about problems with the debugger? See http://blogs.msdn.com/carloc/archive/2006/09/30/sweet-sorrow-remote-debugging-and-more.aspx and http://blogs.msdn.com/carloc/archive/2007/07/22/visual-studio-debugger-conflicts-on-port-80.aspx as examples.

    Anyway if you need help to troubleshoot it, I really suggest to call CSS as I described in another post (http://blogs.msdn.com/carloc/archive/2007/03/25/session-onend-not-firing-after-applying-windows-2003-service-pack-2.aspx#3560934).

    HTH

  • AD
    19 Sep 2007 1:36 PM

    Carloc,

    Thanks for your quick reply.

    I did not build a web application, just a QT4.2 based GUI app with VS2003 C++. I ended up completely uninstalling and then reinstalling VS2003. That solved the problem.

    AD

  • kolla Rajesh
    17 Mar 2008 6:33 PM

    I have the same problem. And the above said soln doesn't work to me either!

Page 1 of 1 (9 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223