Visual Studio 2017 throws error on debugging an ASP.NET MVC application

343 views Asked by At

I am setting up my new workstation (Windows 10 Pro) with my ASP.NET projects with Visual Studio 2017. I have enabled local IIS and the project throws a timeout error while trying to debug the project.

It is not failing 100% of the time though, mostly fails but when it runs it is taking longer than expected to give the startup page. The error thrown is

Unable to start debugging on the web server. The operation has timed out

I did notice that the IIS worker process (w3wp.exe) was only executed in the completed console output. So it looks like the IIS worker process is not always being executed.

Any help would be appreciated!

Thank you!

The project runs successfully on an old workstation (Windows 10 Edu) with Visual Studio 2017. App pool settings has been compared between both and it seems same. IIS reset is tried as well. Visual studio has been repaired and IIS local has been restarted as well (unchecking and enabling followed by restarting the machine). Default app pool is used and its been recycled as well. Nothing worked!

1

There are 1 answers

0
user20376806 On

Possibly the Visual Studio project version does not match the ASP.NET configured application pool. Update the ASP.NET version in the application pool and restart it.

Make sure you have the correct version of ASP.NET installed on IIS. A version mismatch between ASP.NET in IIS and the Visual Studio project can cause this issue. May need to set the framework version in web.config. To install ASP.NET on IIS, use the Web Platform Installer (WebPI).

If the issue is not related to IIS configuration, try the following steps:

  1. Restart Visual Studio with administrator privileges and try again. For example, using the Web to deploy some ASP.NET debugging scenarios that require elevated Visual Studio privileges.

  2. If you are running multiple instances of Visual Studio, reopen your project in one instance of Visual Studio (with administrator privileges) and try again.

  3. If using a HOSTS file with a local address, try using the loopback address instead of the computer's IP address.

  4. If not using a local address, make sure the HOSTS file contains the same project URL as in the project properties, Properties > Web > Server or Properties > Debug, depending on the project type.

Reference link: Visual Studio "Unable to start debugging on the web server. The web server did not respond in a timely manner.".