且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

"无法启动IIS前preSS Web服务器"错误

更新时间:2022-03-05 19:02:09

有一件事解决了这个问题对我来说是使用在&LT以下行;绑定> 部分我在对ApplicationHost.config 文件site:

The one thing that fixed this for me was using the following line in the <bindings> section for my site in the applicationhost.config file:

<bindings>
    <binding protocol="http" bindingInformation="*:8099:" />
</bindings>

的关键是简单地删除本地主机。不要用星号代替它,不要用一个IP或计算机名替换它。刚刚离开冒号后为空白。

The key was to simply remove localhost. Don't replace it with an asterisk, don't replace it with an IP or a computer name. Just leave it blank after the colon.

这样做后,我并不需要运行Visual Studio作为管理员,我可以***地在项目属性更改Project URL到本地IP或计算机名。然后,我设置端口转发,这是互联网访问。

After doing this, I don't need to run Visual Studio as administrator, and I can freely change the Project Url in the project properties to the local IP or computer name. I then set up port forwarding and it was accessible to the Internet.

编辑:

我发现多了一个怪癖,就是让IIS防爆preSS正确可以满足外部请求重要。

I've discovered one more quirk that is important to getting IIS Express to properly serve external requests.


  1. 如果您正在运行Visual Studio / IIS防爆preSS作为管理员,您不可以添加使用netsh的HTTP添加urlacl到HTTP.SYS预约... 命令。这样做将导致一个HTTP 503服务不可用错误。删除您在URLACL提出解决这一问题的任何保留。

  1. If you are running Visual Studio/IIS Express as an administrator, you must not add a reservation to HTTP.SYS using the "netsh http add urlacl ..." command. Doing so will cause an HTTP 503 Service Unavailable error. Delete any reservations you've made in the URLACL to fix this.

如果你的不可以运行Visual Studio / IIS防爆preSS作为管理员,您必须添加预订到URLACL。

If you are not running Visual Studio/IIS Express as an administrator, you must add a reservation to the URLACL.