Visual studio 2019 “Unable to connect to web server ‘IIS Express’”

I tried this one and it worked for me:

  1. Go to ‘Debug Properties

  2. Find ‘Web Server Settings

  3. Change the port in ‘App URL‘ section and save the changes

  4. Run the application and the same error will appear again

  5. Switch the port back to the original port and save the changes

  6. Run the application and enjoy it!

I hope this trick work for you.

Leave a Comment