Go Back

Debugging an IIS hosted web app

Some at my work had been wondering how to enter into debugging (Via the f5 key) in visual studio .Net when your project is hosted in IIS. Since i had been working with WPF Xbap application, i was already familiar with how they did those and figured this would be much the same, and it was... marginally different. :)

 

First set your project as the startup project, then make sure your Default.aspx or Login.aspx is set as the start page. Right click your web project and click properties.

 

image002.jpg

Select URL debug mode, Hit “APPLY” (or you won’t be able to type in the start URL field), then enter the URL that points to your local IIS hosted application.

 

When I Hit f5 at this point, I had received this error: “Error while trying to run project: unable to start debugging on the web server. The web server has been locked down and is blocking the DEBUG verb, which is required to enable debugging. Click help for more information.”

image004.jpg

 

So I searched and found this link about the error:

http://www.velocityreviews.com/forums/t91432-the-web-serve-has-been-locked-down-and-is-blocking-the-debug-verb.html

 

The solution was as follows:

add DEBUG to allowed verbs of the URLScan.ini file which is located at:

C:\WINDOWS\system32\inetsrv\urlscan

(see below)

 

image006.jpg

 

Do an IISRESET (Type iisreset in a command prompt window)

 

I Tried f5 again at this point and I received this error: “Error while trying to run project: Unable to start debugging on the web server. You do not have permission to debug the application. The URL for this project is in the Internet zone. Click help for more information.”

image008.jpg

 

I web searched for it and found this blog article about the error:

http://geekswithblogs.net/ranganh/archive/2005/12/30/64446.aspx

 

it said to modify my internet security setting like this: (start, control panel, internet options, security tab, click internet zone, click custom settings)

change it from automatic logon only in intranet zone to “Automatic logon with current user name and password” ( I imagine you also could use prompt just fine?)

image010.jpg

 

Hit f5 in vs and it should work now.

Facebook DZone It! Digg It! StumbleUpon Technorati Del.icio.us NewsVine Reddit Blinklist Furl it!

Post a comment!
  1. Formatting options