当我尝试启动新创建的 Web 应用程序时,出现此错误:
The program '[73635] iisexpress.exe' has exited with code 0 (0x0).
我已经通过互联网进行搜索,但这些解决方案都没有帮助我:
我只想构建页面。 我没有对原来的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/.
我的问题只有删除
.vs
目录才解决。
对于我来说,只能删除位于 c:\users"youruser"\Documents\ISSExpress 中的 ISSExpress 文件夹
关闭所有浏览器窗口对我有用。
但那是在先这样做之后: 文件 -> 打开 -> 网站 等等,如此处所述 - 我从 IIS Express 中删除了该网站:
为什么以及如何解决? IIS Express“指定的端口正在使用中”
不确定我是否必须同时执行这两项操作,但这对我有用。
当我尝试在本地主机中运行先前删除的应用程序时,就会发生这种情况。
我需要在 IIS 中重新制作一个本地网站,并提供 Web.config 所在 fisic 文件夹的路径。或者,您可以在
C:\Windows\System32\drivers\etc\host
您的本地网站上注册为 anyname,例如添加以下行:
127.0.0.1 yourlocalsite.Web
并在 IIS 关联中使用此名称作为站点的主机名。
然后您可以使用
yourlocalsite.Web
在浏览器中打开它。
就我而言。由于我也使用 weblogic oracle,因此我需要在 '\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP' 中的注册表中进行设置,并将属性值“start”设置为 3。然后重新启动计算机。 这对我有用。
对我来说,我通过关闭 IIS Express 进程解决了这个问题。因此,如果您尝试了上面所说的方法但仍然不起作用,请尝试更改项目的 IP 端口(如果它是 Web 项目),然后关闭 IIS Express 进程。
如果 localhost 对两个项目使用相同的端口号,则可能会导致问题。
对于我的情况,一个应用程序在端口 30000 运行,其他项目尝试在端口运行 也有30000。
因此,最好的做法是如果可能的话使用不同的端口号。
我的问题通过重新启动计算机解决了。
或
您可以尝试删除临时数据。
我发现我的 IP 和 DNS 行为很奇怪。在我删除regdit上的winsock和winsock2条目之前。只需从其他普通计算机导出这些条目并导入即可。这解决了我的问题。
为此我安装了 来自以下链接的 dotnet-sdk-3.4.424-win-64xx https://dotnet.microsoft.com/en-us/download/dotnet/3.1 之后我重新启动了它对我有用的机器
我删除了 .vs 文件夹,重新启动计算机,然后使用 net 6.0 而不是 net48 运行该项目。这为我解决了这个问题。