VS2010 error: Unable to start debugging on the web server

前端 未结 27 3325
萌比男神i
萌比男神i 2020-12-13 07:42

I get error message \"Unable to start debugging on the web server\" in Visual Studio 2010. I clicked the Help button and followed the related suggestions without success.

相关标签:
27条回答
  • 2020-12-13 08:34

    I had this problem in Visual Studio 2012 when running a website I had created in Visual Studio 2010. I tried each of the following, which did not solve the problem, but still may have been required:

    1. Checked that the App Pool was targeted to the same framework as what was specified in the web.config

      <compilation defaultLanguage="c#" debug="true" targetFramework="4.0">
    2. Started the 64bit Remote Debugger: \Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe

    3. Set the DisableLoopbackCheck registry key and restarted Windows. MS Instructions here

    4. Browsed the site locally (it came up just fine).

    5. Finally I found the IIS setting that fixed the issue.

      1. Go to IIS (7.5 in my case) and click on the relevant site in the Sites node.
      2. Double click .NET Compilation in the ASP.NET section
      3. Under Behavior, set Debug to True.
      4. Click Apply and run the site in Visual Studio.
    0 讨论(0)
  • 2020-12-13 08:34

    What worked for me was to edit the HOSTS file in the C:\Windows\System32\drivers\etc folder and set the loopback for the website name I'd setup.

    For example:
    127.0.0.1 http://guyellisrocks.com/

    0 讨论(0)
  • 2020-12-13 08:35

    I've had the same issue and in my case it happened because the AppPool identity was set to impersonate an AD user which had its password changed. Therefore the process could not start and the AppPool always stopped when trying to debug from VS.

    After updating the password in the AppPool/Advanced Settings/Identity everything started running smoothly.

    0 讨论(0)
  • 2020-12-13 08:35

    Your solution file in visual studio is broken. It's a known issue when converting from a file-system website to an IIS website, and it has been carried over from 2008 to 2010. Not sure of the location for the bug report on ms's kb site, though.

    Remove the website from the solution file (right click the project name, click "remove"). Then right click the solution name, click "add existing web site". When the dialog to add a web site comes up, choose "from IIS" in the left-hand pane. Navigate to your application in IIS, select "use secure sockets layer" if necessary, and click "finish" (or whatever that button is labeled).

    this will permanently fix the issue.

    0 讨论(0)
  • 2020-12-13 08:38

    These steps my differ depending on your version of Windows. I am using 7 with iis 7.

    Open IIS Manager, click on Application Pools and find the 2 ASP.NET v4.0 pools (One is called "ASP.NET v4.0" the other "ASP.NET v4.0 Classic". Chances are that first one is stopped. Do not start it yet, we need to investigate a bit more.

    For the "ASP.NET v4.0" pool, check the name in the Identity Field. Is it ApplicationPoolIdentity? Remember the name.

    Open Computer Management (right click on My Computer and select Manage). Expand Event Viewer, then Windows Logs. Click on Application and wait for the data to load. There should be an error with a source of User Profile Service with a message that starts with "Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly."

    If you do find that, then you have the same problem as I did.

    The Solution: Go back to IIS Manager and right click on "ASP.NET v4.0" and select Advanced Settings. Under Process Model, the first field is Identity. Change this from ApplicationPoolIdentity to NetworkService. Click OK.

    Now start the pool if it did not restart automalically. Go back to your application and press F5 (start debug) and your application should work.

    Please note that I have not figured out why this works, and this may be a security risk, but at least you will be able to do some work while you think about this.

    0 讨论(0)
  • 2020-12-13 08:38

    Unable to start debugging on web server. the web server not configured correctly.

    1. How To Resolve This Problem?

      Step-1

      open Command Prompt(Run as administrator)

      Step-2

      C:\Windows\system32>cd..

      C:\Windows>cd Microsoft.NET

      C:\Windows\Microsoft.NET>cd Framework

      C:\Windows\Microsoft.NET\Framework>cd v4.0.30319

      C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -i Microsoft (R) ASP.NET RegIIS version 4.0.30319.0 Administration utility to install and uninstall ASP.NET on the local machine. Copyright (C) Microsoft Corporation. All rights reserved. Start installing ASP.NET (4.0.30319.0). .................. Finished installing ASP.NET (4.0.30319.0).

      C:\Windows\Microsoft.NET\Framework\v4.0.30319>

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