How do I get Visual Studio 2019 to connect to IIS Express?

Justin Hardin 6 Reputation points
2021-12-02T07:19:35.257+00:00

Using the latest version of Visual Studio 2019 and opening the ASP .NET Core Web Application template, I try to run the default code without any changes, but I continually get and error message saying, "unable to connect to web server IIS Express". I tried everything from deleting the .vs folder, changing the application port number, restarting my computer, and uninstalling then reinstalling visual studio. I trying it again on another laptop and it worked flawlessly. I don't know what is special about my PC, but I need help. Both computers used Windows 10. My PC used Windows 10 pro and my laptop used Windows 10 home. attached is a screen shot of what I'm seeing.

154395-iis.png

Internet Information Services
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,962 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,851 Reputation points
    2021-12-03T01:43:09.44+00:00

    Try deleting the hidden folder .vs in the solutions directory. You cannot have the solution open when doing that.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.