如何在IIS Express中启用远程请求?Scott Guthrie写道,这是可能的,但他没有说明如何实现。


当前回答

我做了所有这些步骤,但都无济于事。 我需要的是,它只是通过IIS Express运行我的应用程序…

希望能有所帮助。

其他回答

这是非常棒的,甚至包括HTTPS的漂亮域名:

http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

非常棒的部分,我在其他地方找不到,以防上面的链接消失:

> C:\Program Files (x86)\IIS Express>IisExpressAdminCmd.exe Usage:
> iisexpressadmincmd.exe <command> <parameters> Supported commands:
>       setupFriendlyHostnameUrl -url:<url>
>       deleteFriendlyHostnameUrl -url:<url>
>       setupUrl -url:<url>
>       deleteUrl -url:<url>
>       setupSslUrl -url:<url> -CertHash:<value>
>       setupSslUrl -url:<url> -UseSelfSigned
>       deleteSslUrl -url:<url>
> 
> Examples: 1) Configure "http.sys" and "hosts" file for friendly
> hostname "contoso": iisexpressadmincmd setupFriendlyHostnameUrl
> -url:http://contoso:80/ 2) Remove "http.sys" configuration and "hosts" file entry for the friendly  hostname "contoso": iisexpressadmincmd
> deleteFriendlyHostnameUrl -url:http://contoso:80/

上面的实用程序将为您注册SSL证书!如果你使用-UseSelfSigned选项,这非常简单。

如果你想用困难的方式做事,不明显的部分是你需要告诉HTTP。SYS使用什么证书,像这样:

netsh http add sslcert ipport=0.0.0.0:443 appid={214124cd-d05b-4309-9af9-9caa44b2b74a} certhash=YOURCERTHASHHERE

Certhash是您可以从MMC中的证书属性中获得的“Thumbprint”。

一个很好的资源是Scott Hanselman的IISExpress更容易在开发阶段使用SSL。

您要了解的是如何让IIS Express通过端口80为外部提供服务

我在win8.1中使用IIS Express和外部请求时遇到一些问题。

我遵循以下步骤调试外部请求:

安装IIS 配置Visual Studio以使用本地IIS (Web项目中的页面属性) 在IIS中创建一个专用的appool来使用我的应用程序 在我的项目中,我使用Oracle客户端,必须是32位(64位不使用Visual Studio),然后我需要在应用程序池中允许32位 配置Windows防火墙以允许端口80中的请求(入站规则)

这是工作!

如果你尝试过Panic上校的答案,但在Visual Studio中不起作用,试试这个:

在IIS Express配置中附加另一个<binding />

<bindings>
    <binding protocol="http" bindingInformation="*:8080:localhost" />
    <binding protocol="http" bindingInformation="*:8080:hostname" />
</bindings>

最后,你必须以管理员的身份运行Visual Studio

访问外部请求的另一种方法是使用IIS而不是IIS Express。 在我的视觉工作室,我可以很容易地切换。