Share via

Unable to connect to web server "IIS Express" ... its baaaackkk

Coreysan 1,866 Reputation points
2022-04-07T05:29:03.503+00:00

I've done everything stackoverflow mentioned:

  1. Deleted the .vs folder
  2. Initalized a new AppSettings.json file
  3. Changed the port number
  4. Rebooted

Nothing works. I'm still getting the error.

It doesn't make sense that I should delete the bin and/or obj folders. I have several projects, and they all have the same error.

What's the real issue here? Anyone know?

I have VS 2019, build 16.4.3, with .Net 4.8

Windows development | Internet Information Services
Developer technologies | ASP.NET | ASP.NET Core

3 answers

Sort by: Most helpful
  1. Bruce Zhang-MSFT 3,776 Reputation points
    2022-04-08T01:45:16.257+00:00

    Hi @Coreysan ,

    What kind of application and what .NET version you use? Something I think you can try and if anything wrong or abnormal, I need your feedback.

    1. Try to create an empty asp.net or asp.net core application and run it in IIS Express directly. Please tell me the result.
    2. Delete .vs\config\applicationhost.config file, then right click on prject solution -> properties -> debug tab ->web server settings, change port number to be different from all other applications. Restart VS and rebuild solution.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang

    3 people found this answer helpful.

  2. Ravi Dhileeban 0 Reputation points
    2025-06-05T13:41:19.2033333+00:00

    Hello @Coreysan ,

    I encountered the same issue in Visual Studio due to a caching problem.

    -> Restarting the system resolved it for me.

    After the restart, I was able to run the project without any issues. This method worked in my case.

    0 comments No comments

  3. loverboy sfiso wilson 0 Reputation points
    2023-10-19T04:07:01.9833333+00:00

    Running VS as Admin resolved this issue for me

    0 comments No comments

Your answer

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