Error: The web server is not configured correctly
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. 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
After taking steps detailed here to resolve the issue, 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
.
Take these steps to resolve this issue:
If the web app hosted on the server is configured as a Release build, republish as a Debug build, and verify that the web.config file contains
debug=true
in the compilation element. Reset IIS and retry.For example, if you are using a Publish Profile for a Release build, change it to Debug and republish. Otherwise, the debug attribute will be set to
false
when you publish.(IIS) Verify that the physical path is correct. In IIS, you find this setting in Basic Settings > Physical Path (or Advanced Settings in older versions of IIS).
The physical path may be incorrect if the web application was copied to a different machine, manually renamed, or moved. Reset IIS and retry.
If you are debugging locally in Visual Studio, verify that the correct server is selected in the properties. (Open Properties > Web > Servers or Properties > Debug depending on your project type. For a Web Forms project, open Property Pages > Start Options > Server).
If you are using an external (custom) server such as IIS, the URL must be correct. Otherwise, select IIS Express and retry.
(IIS) Make sure that the correct version of ASP.NET is installed on the server.
Mismatched versions of ASP.NET on IIS and in your Visual Studio project may cause this issue. You may need to set the framework version in web.config. To install ASP.NET on IIS, use the Web Platform Installer (WebPI). Also, see IIS 8.0 Using ASP.NET 3.5 and ASP.NET 4.5 or, for ASP.NET Core, Host on Windows with IIS.
If the
maxConnection
limit in IIS is too low, and you have too many connections, you may need to increase the connection limit.