Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio 2017 "Unable to connect to web server 'IIS Express'"

If I attempt to launch my .net core app I get this message. I realize there are many posts out there claiming to fix this but I have tried every method they suggest and none are working.

If I go into the project properties under debug and change the port, then it will connect 1 time. Then if I attempt to connect again, it will give me the same error again. I can then switch the port back to the original and it will load one time, then it will fail any time beyond that, until I switch it again. Anyone have any ideas or fixes they used?

Thanks!

like image 699
DevDevDev Avatar asked Nov 02 '17 12:11

DevDevDev


People also ask

How do I enable IIS Express in Visual Studio 2017?

Select the ASP.NET Core project in Visual Studio Solution Explorer and click the Properties icon, or press Alt+Enter, or right-click and choose Properties. Select the Debug tab. In the Properties pane, next to Profile, For IIS Express, select IIS Express from the dropdown.

How do I use Visual Studio with IIS Express?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.


2 Answers

I had this problem. There is a hidden folder in directory of project that name is '.vs'. Close the Visual Studio and delete this folder. The problem will be solved.

like image 198
Mohammad Taherian Avatar answered Oct 07 '22 07:10

Mohammad Taherian


I installed core 2.0 and updated VS 2017 to 15.4.3 today, had the same error.

I ended up changing the application to run on a different port, it worked for me.

I have tried to delete the vs folder but did not work.

Hope it helps.

like image 41
Tofuninja173 Avatar answered Oct 07 '22 09:10

Tofuninja173