Sunday 6 February 2022

unable to connect to web server iisexpress

 


When I try to start any .NET Core Web Application I get "unable to connect to web server iisexpress". If If I change the profile to start the "project", it starts up fine.

I have tried the following:
1) Uninstall IIS Express 10. Reinstall through the Visual Studio 2017 setup.
2) Delete the IISExpress folder under My Documents. Delete the ApplicationConfig under the .vs folder.
3) Changing the port number

I am using Visual Studio 2017 15.5.5 on Windows 7 Pro SP1. It's running dotnet core 2.1.4.

If in your launchSettings.json file is not available in your project, then please add it and Copy and Paste below code.

Change Port number according to your application.


Here is the launchSettings:

{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:2732/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Sample": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:2733/"
}
}
}

No comments:

Post a Comment