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

Registry manipulation from SQL

Registry Manupulation from SQL Server is pretty easy. There are 4 extended stored procedure in SQL Server 2000 for the purpose of manupulating the server registry. They are: 1) xp_regwrite 2) xp_regread 3) xp_regdeletekey 4) xp_regdeletevalue Let us see each one of them in detail! About xp_regwrite This extended stored procedure helps us to create data item in the (server’s) registry and we could also create a new key. Usage: We must specify the root key with the @rootkey parameter and an individual key with the @key parameter. Please note that if the key doesn’t exist (without any warnnig) it would be created in the registry. The @value_name parameter designates the data item and the @type the type of the data item. Valid data item types include REG_SZ and REG_DWORD . The last parameter is the @value parameter, which assigns a value to the data item. Let us now see an example which would add a new key called " TestKey ", and a new data item under it called TestKeyValue :

Screen scraping using XmlHttp and Vbscript ...

I wrote a small program for screen scraping any sites using XmlHttp object and VBScript. I know I haven't done any rocket science :) still I thought of sharing the code with you all. XmlHttp -- E x tensible M arkup L anguage H ypertext T ransfer P rotocol An advantage is that - the XmlHttp object queries the server and retrieve the latest information without reloading the page. Source code: < html > < head > < script language ="vbscript"> Dim objXmlHttp Set objXmlHttp = CreateObject("Msxml2.XMLHttp") Function ScreenScrapping() URL == "UR site URL comes here" objXmlHttp.Open "POST", url, False objXmlHttp.onreadystatechange = getref("HandleStateChange") objXmlHttp.Send End Function Function HandleStateChange() If (ObjXmlHttp.readyState = 4) Then msgbox "Screenscrapping completed .." divShowContent.innerHtml = objXmlHttp.responseText End If End Function </ script > < head > < body > &l

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