Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
378 views
in Technique[技术] by (71.8m points)

c# - Unable to Start Debugging on the WebServer

While creating the website I choose Location as HTTP and then provided http://172.24.17.188/myProject and it created the project happily.

And I was able to run the project too. But once I have closes the VS2008 and reopened the project , I am getting the following error while trying to run the website.

enter image description here Edit: I am able to browse the website by manually typing in browser but unable to run or debug usinh VS2008.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If the website is running on IIS on the same machine then you can attach the debugger to the IIS process. You do this by click on "Debug" then "Attach to process...". Sort the processes in descending order and find the process named "w3wp.exe". Then click the "Attach" button. If you don't see the process then view the site in a browser to allow IIS to start the process.

If the website is running on a different server then you can do the same but you need to run the remote debugging tool (MSVSMON). This means you will need to have Visual Studio installed on the webserver. Run MSVSMON and be sure the firewall doesn't block the connection. Now you click "Debug" then "Attach to process...". Enter the server name that was displaed on MSMON's debug window in the qualifier textbox. If everything is setup properly you will see the remote servers process list. Then you can connect to the "w3wp.exe" process.

These are two ways to debug web applications using Visual Studios and IIS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...