Copying Doth Not A Debuggable Web Application Maketh

This week I was banging my head against the wall with a web project that I was working on.

The project manager had sent me a web project that he wanted me to work on. I copied the project and files into a directory (for sake of example xyzproject) under inetpub\wwwroot. Then, from within Visual Studio I opened the project from web: localhost/xyzproject. I made a bunch of changes and then tried to run the web app. I got an error that said that the application was not configured for debugging.

Following the instructions given by the error message, I went to my web.config and made sure that in the configuration section that debug was set to true (which it already was). I try to run the application, and again I'm presented with the error that the application is not configured for debugging. I can't even run the app in release mode.

After knocking my head against the wall for a while, I came to the realization that just copying a web project to wwwroot, does not make it recognized by IIS as a web application.

Here are the steps I took to fix it.

1. Open IIS
2. Go to the directory
3. Right-click the directory and choose properties
4. Next to the application name, there is a button with the caption "Create" (circled in red below). Press the button.



















5. Click on the Configuration button (circled in red below)




















6. Click on the Debugging tab. (circled in red below)





















7. Make sure that the two Debugging Flags checkboxes are checked. (circled in red below)





















7. Press Ok twice

Problem solved.

I hope this saves someone a slap and/or a butt-load of time.

Rick

Comments

Popular posts from this blog

Using Linq To XML to Parse XML with Multiple Namespaces

String Interpolation in Powershell Strings

Wha' Happen'd?