Azure和IIS Express进行外部本地测试

Kyl*_*yle 5 iis azure iis-express

我正在使用IIS Express测试Azure网站.问题是我希望能够从另一个系统访问我的测试角色.我是一般的我发现了一些建议,我可以通过执行以下操作来允许访问IIS Express:

使用以下信息修改applicationHost.config文件:

            <bindings>
                <binding protocol="https" bindingInformation="*:443:*" />
                <binding protocol="http" bindingInformation="*:81:" />
            </bindings>
Run Code Online (Sandbox Code Playgroud)

但是,在使用IIS Express调试Azure网站时,每次启动调试器时都会生成一个新的applicationHost.config文件,并且我的设置会被覆盖.有谁知道我可以让IIS Express通过Azure调试允许外部连接的方式?

Cor*_*ian 2

我花了很长时间才找到解决方案,但以下 URL 为我解决了问题:http ://fabriccontroller.net/blog/posts/remotely-accessing-the-windows-azure-compute-emulator/

总而言之,我的 Azure Web 角色托管在 localhost:12153 上。根据上述链接的说明,我使用以下命令添加端口转发:

netsh interface portproxy add v4tov4 listenport=8099 connectaddress=127.0.0.1 connectport=12153 protocol=tcp
Run Code Online (Sandbox Code Playgroud)

最后,我必须向 Windows 防火墙添加端口 8099 的进/出规则。我现在可以使用端口 8099 上的本地 IP 从本地网络上的其他计算机访问我的 Azure Web 角色。

无需搞乱 applicationhost.config 或所需的项目设置!