Error: Unable to Start Debugging on the Web Server

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

When you try to debug an ASP.NET application running on a Web server, you may get this error message: Unable to start debugging on the Web server.

In many cases, this error occurs because IIS is not configured correctly.

Check your IIS configuration

After taking steps to resolve an issue detailed here, and before trying again to debug, you may also need to reset IIS. You can do that by opening an Administrator command prompt and typing iisreset, or you can do this in IIS Manager.

  • Stop and restart your Application Pools, then retry.

    The Application Pool may have stopped or another configuration change that you made may require that you stop and restart your Application Pool.

    Note

    If the Application Pool keeps stopping, you may need to uninstall the URL Rewrite Module from the Control Panel and then reinstall it using the Web Platform Installer (WPI). This could be an issue after a significant system upgrade.

  • Check your Application Pool configuration, correct it if needed, and then retry.

    If password credentials have changed, you may need to update them in your Application Pool. Also, if you have recently installed ASP.NET, the Application Pool may be configured for the wrong version of ASP.NET. Fix the issue and restart the Application Pool.

  • Check that your Web Application folder has the right permissions.

    Make sure that you give IIS_IUSRS or IUSR (or the specific user associated with the Application Pool) read and execute rights for the Web Application folder. Fix the issue and restart your Application Pool.

  • If you are using a HOSTS file with local addresses, try using the loopback address instead of the machine's IP address.

  • Bring up the localhost page in the browser.

    If IIS is not installed correctly, you should get errors when you type https://localhost in a browser.

    For information about deploying to IIS, see Remote Debugging ASP.NET on a Remote IIS Computer or, for ASP.NET Core, Publishing to IIS).

  • Make sure that the correct version of ASP.NET is installed on IIS. See Deploy an ASP.NET Application or, for ASP.NET Core, Publishing to IIS).

  • Create a basic ASP.NET application on the server.

    If you can't get your app to work with the debugger, try creating a basic ASP.NET application locally on the server, and try to debug the basic app. If you can debug a basic app, that may help you identify what's different between the two configurations.

  • Resolve authentication errors if you are using only the IP address

    By default, IP addresses are assumed to be part of the Internet, and NTLM authentication is not done over the Internet. If your web site is configured in IIS to require authentication, this authentication will fail. To correct this problem, you can specify the name of the remote computer instead of the IP address.

Other causes

If you are using an older version of Visual Studio:

  • Restart Visual Studio with elevated privileges and try again.

    A bug in older versions (fixed later) required elevated privileges in some ASP.NET debugging scenarios.

  • If multiple instance of Visual Studio are running, re-open your project in one instance of Visual Studio, and try again.

See Also

Debugging Web Applications: Errors and Troubleshooting