我使用的 JetBrains Rider 是最新版本,2019.1.2(30 天免费试用),来自官网。这不是一个损坏的版本。
我有一个包含 ASP.NET Web API csproj 的解决方案。该解决方案在 IIS 或 VS + IISExpress 中正常工作。
和 VS 一样,Rider 也在 .idea 文件夹中创建了一些配置文件。在其中,我可以找到 IISExpress 的 applicationhost.config 文件。
问题是,一旦我在控制台中开始调试,IISExpress 就永远无法启动并显示错误:
**Failed to initialize site bindings**
Error initializing ULATQ. hr = 80070005
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Waiting for all LISTENER_CHANNELS to stop
Unable to start iisexpress.
我检查了 applicationhost.config 文件。和VS生成的一样。它还有绑定(bind)信息行,我确定端口可用:<bindings>
<binding protocol="http" bindingInformation="*:8080:localhost" />
</bindings>
问题:Rider 真的可以与 IISExpress 一起正常工作吗?知道如何配置它以及应该更改哪些文件?
最佳答案
我终于发现,在 Windows 10 中,似乎是权限问题导致 Rider 无法正常启动 IISExpress。
解决方案:
Properties
并转到 Web
部分。Generate applicationhost.config
在第一次运行它之前。http://locahost:8080/
( 8080
可以是任何端口。尚未支持任何 IP。)Anonymous authentication
允许查看和调试页面。Generate applicationhost.config
第一次运行后。确保 Rider 仍在使用 IISExpress,而
Properties
中没有任何更改和 applicationhost.config
.仅当 Rider 以管理员身份运行并且
Properties
中的设置正确时IISExpress 会正常工作吗?否则,它不会启动或仅返回 HTTP 5XX/4XX。
关于iis-express - JetBrains Rider 能否与 IISExpress 一起正常工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56681655/