Visual Studio 2017无法使用IIS Express运行核心应用

编程入门 行业动态 更新时间:2024-10-19 07:36:53
本文介绍了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 / content / problem / 11391 / aspnet-core-iis-express-httplocalhost51733-failed.html

You could follow or upvote the issue: developercommunity.visualstudio/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:

If you aren't familiar with VS2017/asp:

您已经拥有或可以通过查看菜单显示 其他工具栏:

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

调试工具栏-> dropdowncombobutton 说 [绿色箭头>] IIS Express

  • 单击按钮的下拉箭头部分。
  • Click on the dropdown downarrow part of the button.

您应该看到运行{yourprojectname} 选项。 这等效于在命令行中运行 dotnet {yourprojectname} 。

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

您可以配置下拉菜单中显示的选项,

You can configure the options that appear in the dropdown with

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

更多推荐

Visual Studio 2017无法使用IIS Express运行核心应用

本文发布于:2023-11-14 09:54:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586900.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:核心   Studio   Visual   Express   IIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!