Visual Studio 2017 does not launch core applications using IIS Express

I am having a problem with Visual Studio 2017 RC, where when I launch an MVC and / or WebAPI application using IIS Express, the application never starts. Instead, I was stuck with a page in the browser indicating that it was trying to connect, and from there it did not go any further. If I open another tab / window in the browser and try to go directly to the launch URL, it will just spin forever. Similarly, when I run this using the net net run command, the application starts up and works fine.

There seems to be no errors that I can see, just that the browser spins endlessly without even loading the page / endpoint.

Note: this happens for most cases. A recently created project in VS without changes, a well-known working project from previous versions, etc.

+5
source share
2 answers

You can track or fix the problem: https://developercommunity.visualstudio.com/content/problem/11391/aspnet-core-iis-express-httplocalhost51733-failed.html

Looks like our workarounds

  • dotnet run
  • Publish on-premises IIS. What works for me.
  • (Untested: Migrating from core-1.1 to core-1.0)

If you are not familiar with VS2017 / asp.net:

You have or can be shown via View MenuOther Toolbars :

Debug toolbardropdowncombobutton saying " [green arrow>] IIS Express "

  • Click the dropdown downarrow button on the button.

You should see the option Run {yourprojectname} . This is equivalent to dotnet run {yourprojectname} from the command line.

You can configure the options that appear in the drop-down menu with

Right-click on project in solution explorerPropertiesDebug

+6
source

I had the same problem, and after a long search, I found that I have dotnet preview v1.0.0-preview2 installed in the "Program Files" section (x86) and the version without preview in x64. I think VS is launching the x86 version (preview), but expects to see the full version. To fix this, I did the following.

  • every visible kernel is removed from programs and functions. (note: for me this did not remove the x86 preview)
  • Go to https://www.microsoft.com/net/download/core#/sdk and install the BOTH x86 and x64 SDKs.
  • open the command line and run the root directory check run: dotnet --version (at the time of writing it was 1.0.4)
  • run the .net core project in VS 2017 and run.

When I did all this, I managed to run the site in IIS Express from VS.

0
source

Source: https://habr.com/ru/post/1263982/


All Articles