Tuesday, September 16, 2008

Unable to start debugging... - Part 2.

Dot .Net Dilemmas
Ok, I just got over the hump of trying to run a project developed in VS2003 with .NET 1.1 in VS2008 with .NET 2.0 or 3.0 when I get the 'Unable to start debugging on the web server' message AGAIN but with a different twist.

"Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information."

One thing that you can check first is that you have debug enabled in your web.config file. I know that this sounds obvious but it has caught me and others out on more than one occasion.

Step 1: Open the web.config
Step 2: If debug is set to "false" change it to "true".

Example:
In the web.config there will be a line similar:
<compilation defaultlanguage="c#" debug="false">

Change this to:
<compilation defaultlanguage="c#" debug="true">

(Don't forget to set this back to 'false' before you promote the code to production)

If this doesn't work, as the message says, It usually means that the web server is not configured correctly but, have you ever looked at the list that Microsoft recommend that you check to try and get it working?
I have spent hours and hours trying to implement all these 'checks' and it still didn't work. All I want to be able to do is debug the application so that I can finish me work. So, one of the great things about VS since 2005 is the ability to use the Visual Studio Development Server to run and debug your web based .NET work without the need for IIS.

The steps:
1. Right click on your project in VS2005/2008.
2. Click on Properties
3. Click on Web tab
4. Under Servers, click on the radio button Use Visual Studio Development Server
5. Check Auto Assign Port radio button
6. Uncheck NTLM Authentication and Enable Edit and Continue

No comments: