Visual Studio 2017 不使用 IIS Express 运行核心应用程序 [英] Visual Studio 2017 Doesn't Run Core Apps with IIS Express

查看:25
本文介绍了Visual Studio 2017 不使用 IIS Express 运行核心应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Visual Studio 2017 RC 时遇到了一个问题,当我使用 IIS Express 运行 MVC 和/或 WebAPI 应用程序时,该应用程序实际上从未运行过.相反,我被浏览器中的一个页面卡住,表明它正在尝试附加,然后它就不再继续了.如果我在浏览器中打开另一个选项卡/窗口并尝试直接导航到启动 URL,它只会永远旋转.同样,当我使用 dot net run 命令运行它时,应用程序启动并运行良好.

I am having an issue with Visual Studio 2017 RC where when I run an MVC and/or WebAPI app using IIS Express the app never actually runs. Instead I get stuck with a page in the browser indicating it is trying to attach and from there it goes no further. If I open another tab/window in the browser and try to navigate directly to the launch URL, it just spins forever. Likewise when I run this using the dot net run command, the app launches and runs fine.

我似乎没有看到任何错误,只是浏览器无限旋转,实际上从未加载页面/端点.

There do not seem to be any errors that I can see, just that the browser spins indefinitely without actually ever loading the page/endpoint.

注意:这在大多数情况下都会发生.在 VS 中新创建的项目,没有更改,以前版本的已知工作项目等.

Note: this occurs for most any circumstance. Newly created project in VS with no changes, known working project from previous versions, etc.

推荐答案

您可以关注或支持该问题:https://developercommunity.visualstudio.com/content/problem/11391/aspnet-core-iis-express-httplocalhost51733-failed.html

You could follow or upvote the issue: https://developercommunity.visualstudio.com/content/problem/11391/aspnet-core-iis-express-httplocalhost51733-failed.html

看起来我们同时的解决方法是

Looks like our workarounds meanwhile are

  • dotnet 运行
  • 发布到本地 IIS.这对我有用.
  • (未测试:从 core-1.1 降级到 core-1.0)

如果您不熟悉 VS2017/asp.net:

If you aren't familiar with VS2017/asp.net:

你有,或者可以通过View Menu-->Other Toolbars显示:

You have, or can reveal via View Menu-->Other Toolbars :

Debug toolbar --> dropdowncombobutton[green arrow>] IIS Express"

  • 点击按钮的下拉箭头部分.

您应该会看到一个 Run {yourprojectname} 选项.这相当于在命令行中 dotnet run {yourprojectname}.

You should see a Run {yourprojectname} option. This is the equivalent of dotnet run {yourprojectname} from the commandline.

您可以使用

在解决方案资源管理器中右键单击项目 --> Properties --> Debug

这篇关于Visual Studio 2017 不使用 IIS Express 运行核心应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆