Unable to attach to process and debug web application

Hi Gurus,

I am running VS2008 on Vista and developing an web application in VB.Net. I have set up the default website in localhost in IIS (IIS 6.0) to run the website and it is working fine. But when I try to debug the site by selecting attach to process from debug
menu and select the browser process (IE8 or Mozilla), nothing happens and the process doesn’t hit the breakpoint. What am I doing wrong?

Thanks in advance for the help.

Regards,

Sudipta

check if you are running with release mode ..

And check this article too

http://weblogs.asp.net/abdullaabdelhaq/archive/2009/06/01/VS-Debug-Problem-with-IE8.aspx

Hi Abdulla,

Thanks for the response. I have checked that the settings in the solution is kept as Debug mode. One major issue is that when I click on the Start Debug button on the VS opens a new IE window with URL like
http://localhost:2108/…  with an error saying that there is connection issue.

Where is this port number coming form? How can I run the debugging?

Appreciate your help.

Thanks,

Sudipta

In your web browser check this http://localhost:2236  this is the Process Id on which your web application is running in IIS attach your process to this Id in the list of
Available Processes  and then debug the application

Check this also if you r facing this problem :

http://support.microsoft.com/kb/950244

Regards

Asif

ASPDev200

Hi Abdulla,

Thanks for the response. I have checked that the settings in the solution is kept as Debug mode. One major issue is that when I click on the Start Debug button on the VS opens a new IE window with URL like
http://localhost:2108/…  with an error saying that there is connection issue.

Where is this port number coming form? How can I run the debugging?

Appreciate your help.

Thanks,

Sudipta

Port number comes becuase you create a file system web application, this port number is an autogenerate number.

check if you are opening another instance from the VS 2008 at the same, because the process (asp.net webserver) will be busy with the first instance, you can stop all opened webserver, you can found them on the task bar on your desktop right beside the clock,
just do right click and click stop.

Post the complete actual error, this will close us to the find solution.

ASPDev200

I have set up the default website in localhost in IIS (IIS 6.0) to run the website

For IIS 6, Attach Process to w3wp.exe.

For IIS 5, Attach Process to aspnet_wp.exe,

For VS web server Attach Process to Web Developer.exe

Hi Everyone,

Thanks for all the tips. I am still facing the issue. To test the issue I created a simple website in VS 2008 and tried to debug it. When clicked on the Start Debugging button, a new firefox (default browser) window opened up with the URL like : http://localhost:49934/Test/Default.aspx
. But this page throw a page load error with message saying "Firefox can’t establish a connection to the server at localhost:49934." 

If I setup the IIS (IIS 7.0) default website to point to this website location with port number 49934 and try to debug then an error message comes up saying "Port 49934 is in use".

I am really confused on this one. When I try to find the attach to process I couln’t find any process with like w3wp.exe or aspnet_wp.exe. I am using IIS 7.0

Thanks in advance.

Sudipta

   

ASPDev200

Firefox can’t establish a connection to the server at localhost:49934

May be Antivirous Software Blok this Port

http://forums.asp.net/p/987980/3266451.aspx

http://forums.asp.net/t/1235447.aspx

ASPDev200

If I setup the IIS (IIS 7.0) default website to point to this website location with port number 49934 and try to debug then an error message comes up saying "Port 49934 is in use".

Try To Change the Port By Selecting The Project Root then Open properties Window then Set Dynamic Port=False and then Set Port Number any e.g, 2999.

ASPDev200

I am using IIS 7.0

Is you create a Virtual Directory For You Web Application in  IIS 7?

this state that

ASPDev200

http://localhost:49934

you are not using IIS 7

Hi Everyone,

Thanks for all the suggestions and valuable links. Finally I was able to debug the website in visual studio 2008. I did so many changes in the trial and error process that I am not sure what fixed the issue. But I will list down some of the changes I made
so that others reading this post might have some clue.

The changes I did:

1. Right click on the web project in the solution and click on "Convert to Web Application". After this change I was able to catch the debug poing set. Not sure why this happened. May be the project was a file system project rather than a web project. I
downloaded the solution from web.

2. In the host file in I had commented the line ":: 1" and made an entry as "127.0.0.1    localhost".

3. In the Web Project properties under the Web section I choose specific port and gave port number as 8600 (just random number).

4. In the Vista firewall I created an exception to allow incomming http request to pass through port 8600.

I made all th above changes after going through several forums, blogs and articles. Hope this will help others going through similar issues.

Thanks,

Sudipta

Leave a Reply