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


当前回答

顺便说一句:

netsh http add urlacl url=http://vaidesg:8080/ user=everyone

这只适用于英文版的Windows。如果你正在使用本地化版本,你必须用其他东西替换“everyone”,例如:

在使用荷兰语版本时是“Iedereen” 使用德语版本时使用“Jeder” 当使用匈牙利语版本时,“Mindenki”

否则你会得到一个错误(创建SDDL失败,错误:1332)

其他回答

如果你正在使用Visual Studio,那么按照以下步骤通过ip地址访问IIS-Express:

Get your host IP-Adress: ipconfig in Windows Command Line GoTo $(SolutionDir)\.vs\config\applicationHost.config Find <site name="WebApplication3" id="2"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Users\user.name\Source\Repos\protoype-one\WebApplication3" /> </application> <bindings> <binding protocol="http" bindingInformation="*:62549:localhost" /> </bindings> </site> Add: <binding protocol="http" bindingInformation="*:62549:192.168.178.108"/> with your IP-Adress Run your Visual Studio with Administrator rights and everything should work See post from Andrii how to configure Firewall: here

帮助我的是右键单击“IISExpress”图标,“显示所有应用程序”。然后选择网站,我看到哪个应用程序主机。它使用的配置,纠正进行得很完美。

顺便说一句:

netsh http add urlacl url=http://vaidesg:8080/ user=everyone

这只适用于英文版的Windows。如果你正在使用本地化版本,你必须用其他东西替换“everyone”,例如:

在使用荷兰语版本时是“Iedereen” 使用德语版本时使用“Jeder” 当使用匈牙利语版本时,“Mindenki”

否则你会得到一个错误(创建SDDL失败,错误:1332)

这个问题的公认答案是如何让IIS Express使用webmatrix的指南。我发现这个指南在使用VS 2010时更有用。

我只是按照步骤3和4(以管理员身份运行IIS Express),并且不得不暂时禁用我的防火墙才能让它工作。

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

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