Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error : "Unable to start debugging on the web server..." ASP.NET 4.0

I am getting an error when I want to create a web site on IIS server. I am using Windows 7 and Visual Studio 2010.

Do I have to register or configure asp.net 4.0 for the IIS ?

like image 459
Kubi Avatar asked Nov 30 '09 13:11

Kubi


People also ask

How do I enable debugging in web config?

In the Web. config file, locate the compilation element. Debugging is enabled when the debug attribute in the compilation element is set to true. Change the debug attribute to false to disable debugging for that application.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.


2 Answers

There aren't many details here, but I was getting that same error while trying to Start Debugging on a web application project in Visual Studio 2010 that I'd just changed from 3.5 to 4.0.

This solved the problem for me from the command line:

cd %windir%\Microsoft.NET\Framework\v4.0.30319 aspnet_regiis.exe -i 

Just make sure to go into IIS Manager afterwards and double-check your application pools and such, since it's likely that this will reset some of your configuration.

like image 186
Calvin Fisher Avatar answered Sep 25 '22 09:09

Calvin Fisher


This did the trick for me:

In IIS > under .NET compilation

Note: Default Website is selected only for screenshot purposes.

enter image description here

Changing the Debug option to True

enter image description here

like image 22
muruge Avatar answered Sep 25 '22 09:09

muruge