The Dreaded 'Unable to Connect to Web Server IIS Express' Error

Hey kids! If you've been writing code for more than ... oh ... a month, you'll run into this error. It's persisted in Visual Studio since it was built originally. Developers have been asking for a fix for about 400 years, but no one listens at Microsoft. Which we're pretty used to now.
This is one of the more annoying Microsoft errors to deal with. The error really tells you nothing, there isn't anything in any of the output results or log files that tells you "hey this file is probably corrupt and needs regenerated". Thankfully there is StackOverflow to help during your most favorite times of contemplating your career choice and thinking "I should have been a stripper"

Generally, one of the things listed below will get rid of it. Sometimes, you will need to do them all. But start one at a time.
1. If you are not running Visual Studio as Administrator, you can try to close your instance, then reopen as Administrator. Sometimes just this will knock out the issue without further changes.
Right click on the Visual Studio application and choose "run as administrator".

2. If the error still happens, try deleting the applicationhost file (Example: C:\Repos\solution\.vs\config\applicationhost.config)
Or you can try deleting the entire .vs folder. This holds your local settings for that particular solution.

3. If those don't help, close all instances of Visual Studio you have open. It "should" only be needed to close what you're having an issue with, but I've had to shut it all down as a last resort sometimes.
Navigate to your local source folder (EX: C:\Repos\solution\project\Properties)
Locate the launchSettings.json file in the project that won't open. If you have multiple startup projects in your solution, you'll need to determine which project is screaming at you this time.
Now, delete the file.

Reopen Visual Studio and clean, then rebuild your solution. The launchSettings.json file should regenerate automatically. Then go ahead and run your project / solution. Hopefully this will allow you to get rid of that pesky error and continue coding.

One or all of these changes should reset the problem and allow you to run your localhost as you intend.
Cheers!!

keo nha cai mình thấy bạn bè nhắc hoài nên tiện tay vào thử cho biết thôi. Không có kiểu ngồi đọc kỹ từng dòng đâu, mình chỉ lướt xem giao diện có dễ chịu không. Vừa mở ra là thấy trang làm khá thoáng, khoảng trắng nhiều nên nhìn đỡ mệt mắt, kéo xuống cũng không bị ngợp. Mình thích nhất là mấy khối thông tin dạng bảng cột họ canh gọn, nhìn qua là hiểu ý chính chứ không rối. Thanh menu đặt chỗ dễ thấy nên bấm qua lại mấy mục cũng nhanh, dùng vài phút là quen tay. Nói chung cảm giác họ sắp xếp nội dung theo từng block rõ ràng, menu và các bảng…
Bài viết dễ theo dõi, trình bày rõ ràng nên mình đọc một mạch, cảm ơn bạn đã chia sẻ. Mình cũng hay xem thống kê XSMB mỗi ngày để nắm nhịp, nên tự gom lại thành một trang tổng hợp cho tiện tra cứu, khỏi phải lục nhiều nơi. Ai cũng quan tâm số liệu cập nhật theo ngày thì ghé xem thử https://3dtoday.ru/blogs/Soicauxsmbpro