Visual Studio .NET - Unable to debug a C# Windows application in Visual Studio 2005

Asked By Sebastiaan Aarts on 07-Jun-11 07:38 AM
Hi,

I have used VS2005 and Windows 7, 64 bits for a long time and have always been able to debug. However recently I have installed VS2010 and Windows Phone 7 development tools. Now I can not debug with VS2005 anymore. VS2005 is busy (not responsive) for several seconds and then I get the following error message:

Error while trying to run project: Unable to start debugging.
De pipe is beeindigd.

The second line is in Dutch and I do not know the exact translation. I guess it is translated to The pipe is terminated / closed. However that does not give me a clue.

I tried uninstalling VS2010 and WP7. I also tried uninstalling VS2005 and installing it again. It all fails. However I can still debug a C++ application. So my suspicion is that I can not debug managed code anymore but can debug unmanaged code.

I know that debugging on a 64 bits machine is done via WOW.

Could anyone help me please?
Reena Jain replied to Sebastiaan Aarts on 07-Jun-11 08:17 AM
hi,

This problem occurs because the debugger does not send the debug action to IIS when you run the application. The debugger identifies your computer as localhost. However, in IIS, the Web Site Identification of the application is the IP address that you specified.
so try this and let me know
In a text editor such as Notepad, open the WebApplicationName.vbproj.webinfo file locate the following line.
<Web URLPath = "http://localhost/%3C;WebApplicationName>/<WebApplicationName>.csproj" />
Replace "localhost" with the IP Address of your computer as follows.
<Web URLPath = "http://10.150.144.131/%3C;WebApplicationName>/<WebApplicationName>.csproj" />
now
  1. Start Microsoft Internet Explorer. On the Tools menu, click Internet Options.
  2. In the Internet Options dialog box, click the Security tab. Under Select a Web content zone to specify its security settings, click Local Intranet, and then click Sites.
  3. In the Local Intranet dialog box, click Advanced.
  4. In the Add this Web Site to the zone box, type the URL of your project, and then click Add.
  5. Close the application, and then open the application again.
  6. On the Debug menu, click Start.
hope this will help you
Reena Jain replied to Sebastiaan Aarts on 07-Jun-11 08:18 AM
hi,

Also

  • Make sure that IIS is configured to use Integrated Windows Authentication. Look for the checkbox on the Authentication Method dialog launched from the Directory Security tab of the site properties.
  • Make sure that HTTP Keep Alives are enabled. You'll find that checkbox on the Web Site tab of the properties dialog, in the connections section.
  • This one is strange, but it seemed to do the trick for many out there, add http://localhost to the trusted sites in Internet Explorer. To tell the truth, this seems to be a fix for the symtoms, not actually fixing the problem itself, but if it works it works. BTW, you'll have to uncheck the “Require server verification (https:) for all sites in this zone“ checkbox to add it as a trusted site.
Sebastiaan Aarts replied to Reena Jain on 07-Jun-11 08:26 AM
I am not debugging a web application but a Windows application (New project, Visual C#, Windows, Windows Application). So I also do not have a <WebApplicationName>. Is the rest of the IIS still valid for my problem?
Jitendra Faye replied to Sebastiaan Aarts on 07-Jun-11 09:26 AM

Try these options-

I think this may be helpful to u too.

This is usually caused because of one or both of the following problems:

  1. The directory the web app resides in has not been registered as a web application.
  2. The correct ASP.NET version has not been set for the web app (note that this cannot be set until 1. has been sorted out).

To fix problem 1:

  1. Open the IIS admin app.
  2. Right click on your app's directory (/virtual dir) and select Properties.
  3. On the Directory tab, under Application Settings, next to Application Name there will be a 'Create' button - click it.  Once the dir has been registered as a web app then this button will say 'Remove'.
  4. Click Apply (or OK).

To fix problem 2:

  1. Open the IIS admin app.
  2. Right click on your app's directory (/virtual dir) and select Properties.
  3. Select the ASP.NET tab.
  4. Select the correct ASP.NET version.  Note that this field is disabled if the dir has not been set as an application (see above).
  5. Click Apply (or OK).

Reena Jain replied to Sebastiaan Aarts on 07-Jun-11 09:33 AM
hi,

try this
There are two ways that you can resolve this problem. Do either of the following:
  • Resolution 1
    1. Right-click the Project Name in Solution Explorer, and then click Properties.
    2. In the left pane of Properties, click to select Configuration Properties.
    3. Click to select Debugging.
    4. In the right pane, click to select the Unmanaged code debugging check box.
  • Resolution 2
    1. In Microsoft Notepad, open Boot.ini, which is located in the System Drive folder (usually C:\). This file may be hidden and read-only, so you may have to use dir /ASH to find it.
    2. Remove all of the following switches, if found in the file:
      • /debug
      • /debugport
      • /baudrate
    3. Restart the computer, start Visual Studio .NET, and then debug.
refer :- http://support.microsoft.com/kb/303067

Hope this will help you
Sebastiaan Aarts replied to Reena Jain on 10-Jun-11 04:00 AM
The problem is solved. This is what I did:
I uninstalled VS2010 and Phone 7 stuff (problem still occurred)
I reinstalled VS2005 (problem still occurred)
I completely reinstalled my computer with Windows7 and only VS2005 (and the two standard patches :-)
Now VS2005 works.
However when I opened Internet explorer 8 and start VS2005 again, VS2005 does not work anymore
After running Windows Updates (58 pieces !!!) I also get Internet explorer 9 installed (one of the updates)
Now VS2005 works also when Internet explorer 9 is opened

So thanks for all the help and hopefully someone else can also use this tip.
PS. try installing Internet explorer 9 first before a complete reinstall :-) This might not be needed after all ...