Error : “Unable to start debugging on the web server…” ASP.NET 4.0

前端 未结 13 1609
别跟我提以往
别跟我提以往 2021-01-31 08:56

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 th

相关标签:
13条回答
  • 2021-01-31 09:23

    I've had this several times - in my case it's always that I've not updated my hosts file so VS is trying to locate an external DNS instead of my local one.

    0 讨论(0)
  • 2021-01-31 09:23

    I spent a few hours fighting with this issue. In the end it seems to be that some changes made outside VisualStudio had confused it. I don't know what the issue actually was but things started to work again when I opened a different version from the same solution so that VisualStudio (or IIS) did some magic on the IIS configuration. Then I changed back to the original solution, the configuration was again modified - and now debugging works again.

    0 讨论(0)
  • 2021-01-31 09:26

    In Visual Studio 2010 this usually means there is a problem with Web.Config file that cannot be displayed in Debug mode. So, simply start the app using Ctrl F5 to run in normal mode will tell you which line in Web.Config is faulty.

    0 讨论(0)
  • 2021-01-31 09:27

    For me this was related to this solution: http://www.codeproject.com/Questions/83338/Does-not-have-write-access-to

     cd %windir%\Microsoft.NET\Framework64\v4.0.30319
     aspnet_regiis -i
     aspnet_regiis -ga "IIS APPPOOL\DefaultAppPool"
    

    Note this didnt work after I did it on Framework folder and then worked after I did it on Framework64 folder. I guess do both to be sure.

    0 讨论(0)
  • 2021-01-31 09:29

    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.

    0 讨论(0)
  • 2021-01-31 09:32

    This did the trick for me:

    In IIS > under .NET compilation

    Note: Default Website is selected only for screenshot purposes.

    Changing the Debug option to True

    enter image description here

    0 讨论(0)
提交回复
热议问题