Asp.Net: Debug website in iis
18,517
Solution 1
Had this same problem. The key is to not open the project using the visual studio project file.
- In IIS, under your Default Web Site, you need to have already created an application, and pointed it at the folder containing the files.
- In Visual Studio, go to File > Open > Web Site (Shift+Alt+O).
- Select the newly-created application.
- You'll notice the solution explorer now uses the URL in place of the project name. (http://localhost/mysite/)
- Click the debug arrow like normal.
Solution 2
you can attached the asp_wp into your Visual Studio debuggar to debug it.
Solution 3
This should work:
- Compile project in Debug mode.
- Set debug="true" in the web.config.
- Attach to IIS working process (which v of IIS do you use?) (Ctrl-Alt-P in VS). There can be MANY processes. MAKE SURE YOU ATTACH TO THE CORRECT ONE.
Author by
Yaron Naveh
Web Services Performance, Interoperability And Testing Blog - WCF, Axis2, WSIT... blog twitter
Updated on July 24, 2022Comments
-
Yaron Naveh almost 2 years
Is it possible to debug an Asp.Net website running on iis? I am able to debug an Asp.Net web application project, but not a web site, and wanted to know if this is by design or am I missing something.
-
Yaron Naveh almost 15 yearsit works find for web application but breakpoint does not stop for website
-
Yaron Naveh almost 15 yearsit works find for web application but breakpoint does not stop for website
-
Dewfy almost 15 years@Yaron Naveh - you need pdb files near the dlls, also to leverage more debug features build your site in debug mode.
-
Yaron Naveh almost 15 yearsI'm using "website" not "web application". It does not compile locally but only on the fly in iis. How can I create the pdb?
-
Yaron Naveh almost 15 yearsI use iis 5. There is only one process. I use website and not "web project" - it is compiled on the fly so I can't control it.
-
AbdulG almost 4 yearsSo much of the same answers over the internet. This is the only 1 I have been looking for