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


当前回答

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

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

其他回答

如果你正在使用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

如果你从管理员运行Visual Studio,你可以添加

<装订协议=“http”bindingInformation=“8080:*”/>

or

<装订协议=“https”binps条=“*:8443:*”/>

into

%userprofile%\My Documents\IISExpress\config\applicationhost.config

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

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

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

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

我用反向代理的方法解决了这个问题。

我安装了wamp服务器,使用了apache web服务器的简单反向代理功能。

我添加了一个新的端口来监听Apache web服务器(8081)。然后我为该端口添加了虚拟主机代理配置。

<VirtualHost *:8081>
ProxyPass / http://localhost:46935/
ProxyPassReverse / http://localhost:46935/
</VirtualHost>

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

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

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

这是工作!