Skip to main content

Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged.

I have planned to share my experience on the various .NET errors which I have faced till now and the solution for the same. This is the first post in this series.

Error: Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged.

Cause: Either debug is not enabled in your web.config (OR) For some reasons IIS is not considering your web application as a virtual directory. Instead it is considering it to be a normal folder.

Solution 1:

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

For ex:
In my web.config I have a line like this <compilation defaultLanguage="c#" debug="false"/>
I would change it to <compilation defaultLanguage="c#" debug="true"/>

If at all this doesn't work. Try out the next solution.

Solution 2:

Step 1: Start >> Run >> inetmgr
Step 2: Navigate to the virtual directory of the project which is throwing this error.
Step 3: Right click on the virtual directory and choose "Properties"
Step 4: Next to the application name there would be a button named "Create". Click on it. [After that, the button should read as "Remove"]

If at also doesn't work, try the next solution.

Solution 3:

If you are running Visual Studio 2003 (or ASP.NET v1.1) you should setup IIS to use ASP.NET v1.1 and not ASP.NET v2.0

May be you have installed .NET framework 1.1 as well as 2.0 in your box and trying to run an application via VS.NET 2003. If so, then do the following:

Step 1: Start >> Run >> inetmgr
Step 2: Navigate to the virtual directory of the project which is throwing this error.
Step 3: Right click on the virtual directory and choose "Properties"
Step 4: Choose the tab ASP.NET
Step 5: The first dropdown would read "ASP.NET Version", choose 1.1.4322

That's it. Hope this helps somebody sometime somewhere in the world :)

Comments

Anonymous said…
Great!!!
After 2 days of searching, finally found out that this was the problem!!!
Anonymous said…
Thanks, that helped. God bless you.
Anonymous said…
Thank uuuu... u helped me in finding out this, without wasting much of my time.
Anonymous said…
It did help. Thanks a lot!
Anonymous said…
Nope, still didn't fix it!!!
Anonymous said…
OK, I needed to add the ASPNET account into the permissions for the wwwroot on the server. I found the following link VERY helpful - like shows screenshots... - like helpful...

http://www.gotdotnet.com/team/csharp/learn/whitepapers/_Toc49569439

I still have a separate issue with RPC Server not available when trying to debug with a remote machine, means for the time being I'll have to use debug on the server :¬[

Two wasted days fabricating excuses as to why I haven't done much. I Can't believe how @#!%$ fiddly it is to make some Micros*ft products work. A complete waste of time. Why doesn't software come with intelligable diagnosis to pin-point exact causes for such issues.

Rant Rant Rant, best of luck, you'll need it.
Anonymous said…
For some reason the url became truncated - see if this works

http://www.gotdotnet.com/team/csharp/learn/whitepapers/_Toc49569439
Anonymous said…
OK, this sux! :)

Try concatenating these two strings:

http://www.gotdotnet.com/team/csharp/learn/
whitepapers/_Toc49569439
Anonymous said…
OK, this sux! :)

You'll need to concatenate these two strings to get the complete url

http://www.gotdotnet.com/team/csharp/learn/
whitepapers/_Toc49569439
Anonymous said…
Thanks, Solution 3 worked for me. I have both VS 2003 and 2005, on my machine and at some point I said to configure localhost to 2005. Now with solution 3 I fixed problem and able to run both.
Anonymous said…
Yes, I am one in the world for which this solution actually worked!!! Thank you so much!

Hmm.. (GRRR!, rather), why does this not work with .NET 2?

-dan
Anonymous said…
Duh! (me again) I get the feeling that VS 2005 is required for .NET 2

:-)
Anonymous said…
Thanks!! your post did sure help me in the world... the 3rd option worked for me ...
Thanks a ton :)
Anonymous said…
Nothing seems to work form me. After creating a new project in vs.2003 and run it, I got the same error (there is no virtual directory in IIS at this point/time)
Anonymous said…
I had the same error. But mine was because the web.config file did not have security permission for the aspnet account. Just wanted to mention this so that it can help someone.
Anonymous said…
Tried everything here without success...
Then I decided to go with the famous aspnet_regiis -i and that did the trick.

HTH
Unknown said…
Thanx alot....the second solution worked out for me.u r doing a gr8 job.

rite now its working but ..when i start debugging it showing an error like "unable to start debugging ..debugging failed coz integrated windows authentication is not enabled."
why i am getting this?How to check it out?
plz mail me at
shalni_raj7@yahoo.com
Anonymous said…
thanks a lot. I've been having this problem for 2 days now. I just fixed my problem.

Sam from Germany
Anonymous said…
Hey...the solution #3 works for me!!! Thanks alot! Hurray...!
Sunshine said…
could be that your iis server certificate is missing, create a self assigned server certificate.
edit bindings: point to the newly created cert.
Unknown said…
Very good post and I found very helpful. There could be some more reason for this issue. I got solution from both yours and below link. Thanks.
http://blogershub.com/Archive/2014/2/Unable-to-start-debugging-on-the-web-server-The-project-is-not-configured-to-be-debugged

Popular posts from this blog

Script table as - ALTER TO is greyed out - SQL SERVER

One of my office colleague recently asked me why we are not able to generate ALTER Table script from SSMS. If we right click on the table and choose "Script Table As"  ALTER To option would be disabled or Greyed out. Is it a bug? No it isn't a bug. ALTER To is there to be used for generating modified script of Stored Procedure, Functions, Views, Triggers etc., and NOT for Tables. For generating ALTER Table script there is an work around. Right click on the table, choose "Modify" and enter into the design mode. Make what ever changes you want to make and WITHOUT saving it right click anywhere on the top half of the window (above Column properties) and choose "Generate Change Script". Please be advised that SQL Server would drop actually create a new table with modifications, move the data from the old table into it and then drop the old table. Sounds simple but assume you have a very large table for which you want to do this! Then it woul

AWS fatal error: An error occurred (400) when calling the HeadObject operation: Bad Request

While using AWS and trying to copy a file from a S3 bucket to my EC2 instance ended up with this error message. Command Used: aws s3 cp s3://mybucketname/myfilename.html /var/www/html/ Error: fatal error: An error occurred (400) when calling the HeadObject operation: Bad Request The error goes off if we add the region information to the command statement. I am using Asia Pacific (Mumbai) so used ap-south-1 as the region name. Modified Command: aws s3 cp s3://mybucketname/myfilename.html /var/www/html/ --region ap-south-1

[Non Tech] Want to know the recipe for Omelette :)

Fed up with Bread - Jam and Curd Rice, today i wanted to eat Omelette. Interesting part is I wanted to cook it myself :) So in the first picture you see all the items which are needed for preparing an Omelette. When I had a closer look at the eggs I see that almost all the eggs are broken. But believe me when I bought it couple of days back it was in perfect condition! I was wondering whether the eggs have become rotten or pretty old to consume! I tried taking an egg and break it but couldn't break it at all :) Since I have kept in the freezer all the eggs have frozen and looked like a iron ball :) After trying for few minutes of trying i removed the shell of the egg and then kept that iron ball :) into a bowl and placed it within Oven. I heated it for 1 minute and checked. It melted only to a limit. So i just set it for another 2 minutes and checked it later. It has melted but the part of the egg white has become a Omelette :( I didn't leave it there. I took the bowl out of