Debugging a VS2010 Website in IIS 7.0

Working on my standalone box, I wanted to do some debuggign specifically in IIS 7.0.  It was quite easy to set up when you know how.  After a bit of digging here’s what I did.

  • Created a VS2010 ASP.NET Web Application
  • In WebSite Properties, select ‘Use Custom Server’ and enter in your base Url.
  • In IIS 7.0 map your website root to a virtual directory and then convert the virtual directory into an Application.
  • By default the DefaultAppPool runs under a hidden account IIS APPPOOL\DefaultAppPool which you need to give full control permissions  or at least Modify Permissions to the folder where your Visual Studio Web Application Projecty is.
  • Hit f5 and you’re off.
  • Note if you recycle the AppPool in IIS 7.0 it stops the w3wp.exe process and starts another, so your debugging will stop working.
  • If you have any code in Application_Start in the Global.asax file it will not be run when you hit f5.  You Session_Start code will be however.

Cheers

Dave Mc

Advertisements

About davemcmahon81
Software Developer & Architect, User Group Leader, Speaker, Writer, Blogger, Occasional Guitarist, Man-made Global Warming Sceptic, Climate Change Believer, General Optimist but most of all proud Husband and Dad ...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: