【问题标题】:The program iisexpress.exe' has exited with code 0程序 iisexpress.exe' 已退出,代码为 0
【发布时间】:2019-05-27 18:40:37
【问题描述】:

当我尝试启动新创建的 WebApplication 时,我收到此错误:

The program '[73635] iisexpress.exe' has exited with code 0 (0x0).

我已经在互联网上进行了搜索,但这些解决方案都没有帮助我:

  • 更改端口号(和虚拟目录)
  • 以管理员身份启动
  • 删除 .vs 文件夹
  • 删除 Documents 下的 IISExpress 文件夹
  • 使用 64 位版本的 IISexpress
  • 重启电脑
  • 按 CTRL-F5

我只想构建页面。 我没有对原来的 MVC5 网站做任何改动。

编辑: 我认为这是一个错误,但在@Lex li 的评论中说这不是一个错误。 当我在互联网上搜索时,似乎很多人以前都经历过。

我刚刚创建了一个新的 MVC 应用程序。在不做任何更改的情况下,我尝试使用 IIS Express (Google Chrome) 运行它,但它只是停止了,没有其他任何东西。 Chrome 给了我这个错误:This site can’t be reached localhost refused to connect.。而且我从来没有遇到任何错误。它只是无法启动,并且 Visual Studio 诊断工具在 Chrome 自行关闭的同时停止运行。

编辑 2: 我已经能够挖掘更多:

C:\Program Files (x86)\IIS Express>iisexpress.exe /trace:error
Starting IIS Express ...
Initializing the W3 Server Started CTC = 2601562
Error initializing IISUTIL's LocalRequest.  hr = 80072afa
Terminating W3_SERVER object
Start listenerChannel http:0
Initializing the W3 Server Started CTC = 2610156
Error initializing IISUTIL's LocalRequest.  hr = 80072afa
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Unable to start iisexpress.

我已经意识到 IISExpress 我遇到了一些问题。当我按下 CTRL - F5: unable to launch iis express web server 时,我得到了这个错误。

Scan the folder C:\Users\xuser\source\repos\CMySQL\CMySQL for project files.
1 project(s) are detected.
* CMySQL.csproj


Project file: C:\Users\xuser\source\repos\CMySQL\CMySQL\CMySQL.csproj.
IIS Express configuration file: C:\Users\xuser\source\repos\CMySQL\.vs\config\applicationHost.config.
Analyze ASP.NET project.
Extract web project settings.
UseIIS: True
AutoAssignPort: True
DevelopmentServerPort: 61708
DevelopmentServerVPath: /
IISUrl: http://localhost:6549/
NTLMAuthentication: False
UseCustomServer: False
CustomServerUrl: 

SaveServerSettingsInUserFile: False
UseIISExpress: true
IISExpressSSLPort: 
IISExpressAnonymousAuthentication: 
IISExpressWindowsAuthentication: 
IISExpressUseClassicPipelineMode: 
UseGlobalApplicationHostFile: 
Scan all bindings.
IIS Express is used for this project.
Binding *:6549 (http).
A matching binding is found for http://localhost:6549/.

【问题讨论】:

  • 代码 0 表示“无错误”。这里到底有什么问题?请详细描述。
  • 添加了更多信息,@LexLi
  • 你最好运行一个项目诊断报告并将其作为问题的一部分,docs.jexusmanager.com/tutorials/vs-diagnostics.html 用这样的关键信息谈论这些是不可能的。
  • @LexLi,我已经添加了诊断。但这对我来说意义不大。
  • 您的设置似乎不错,但 Error initializing IISUTIL's LocalRequest. hr = 80072afa 是未记录的。除了与微软交谈,我认为你无能为力,developercommunity.visualstudio.com/spaces/8/index.html

标签: visual-studio iis-express


【解决方案1】:

我的问题只通过删除.vs目录解决了。

【讨论】:

  • 删除.vs目录是这个问题的基本解决方案。它会起作用的。
  • 在删除 .vs 文件夹后,我也不得不关闭并重新打开 Visual Studio。
【解决方案2】:

对于我来说,只能删除位于 c:\users"youruser"\Documents\ISSExpress 中的 ISSExpress 文件夹

【讨论】:

    【解决方案3】:

    关闭所有浏览器窗口对我有用。

    但那是在第一次这样做之后: 文件 -> 打开 -> 网站 等等,如此处所述 - 我从 IIS Express 中删除了该网站:

    Why and how to fix? IIS Express "The specified port is in use"

    不确定我是否必须同时做这两件事,但它对我有用。

    【讨论】:

      【解决方案4】:

      当我尝试在 localhost 中运行以前删除的应用程序时,就会发生这种情况。

      我需要在 IIS 中重新制作一个本地网站,其中包含指向 Web.config 所在的 fisic 文件夹的路径。或者,您可以在 C:\Windows\System32\drivers\etc\host 您的本地网站上注册为 anyname,例如添加以下行:

      127.0.0.1 yourlocalsite.Web

      并在 IIS 关联中使用此名称作为您站点的主机名。

      然后您可以在浏览器中使用yourlocalsite.Web 打开它。

      【讨论】:

        【解决方案5】:

        就我而言。由于我也使用 weblogic oracle,我需要在我的 regedit 中设置 '\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP' 并且属性值 'start' 应该设置为 3。然后重新启动机器。 这对我有用。

        【讨论】:

          【解决方案6】:

          对我来说,我通过关闭 IIS Express 进程解决了这个问题。所以如果你尝试了上面所说的,它仍然不起作用,如果它是一个 web 项目,请尝试更改你的项目的 IP 端口,然后关闭 IIS Express 进程。

          【讨论】:

            【解决方案7】:

            如果 localhost 对两个项目使用相同的端口号,可能会导致问题。

            就我而言,一个应用程序在端口 30000 上运行,另一个项目尝试在端口上运行 也有30000。

            所以最好的做法是尽可能使用不同的端口号。

            【讨论】:

              【解决方案8】:

              我的问题通过重启电脑解决了。

              您可以尝试删除临时数据。

              【讨论】:

                【解决方案9】:

                正如你所描述的那样,我确实遇到了问题。两天后

                我发现我的 ip 和 dns 行为奇怪..在我删除 regdit 上的 winsock 和 winsock2 条目之前,只需从其他普通计算机导出这些条目并导入,这解决了我的问题...

                【讨论】:

                  猜你喜欢
                  • 2018-07-25
                  • 1970-01-01
                  • 2018-12-16
                  • 2018-07-01
                  • 2020-09-09
                  • 2018-05-28
                  • 1970-01-01
                  • 1970-01-01
                  • 2012-07-20
                  相关资源
                  最近更新 更多