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

Coreysan 1,651 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

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,295 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce Zhang-MSFT 3,736 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

    2 people found this answer helpful.

  2. 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