如何在IIS Express中启用远程请求?Scott Guthrie写道,这是可能的,但他没有说明如何实现。
当前回答
一个很好的资源是Scott Hanselman的IISExpress更容易在开发阶段使用SSL。
您要了解的是如何让IIS Express通过端口80为外部提供服务
其他回答
帮助我的是右键单击“IISExpress”图标,“显示所有应用程序”。然后选择网站,我看到哪个应用程序主机。它使用的配置,纠正进行得很完美。
我做了以下操作并成功连接:
1)将IIS快速配置绑定从本地主机更改为“*”
绑定协议="http" bindingInformation="*:8888:*"
2)在防火墙上定义入站规则,允许特定的端口用于协议类型:tcp
3)添加以下命令为您的端口添加网络配置: Netsh HTTP添加urlacl url=http://*:8888/ user=everyone
在IIS团队网站上有一篇博客文章解释了如何在IIS Express上启用远程连接。以下是那篇文章的相关部分总结:
在Vista和Win7上,在管理提示符下运行以下命令: Netsh HTTP添加urlacl url=http://vaidesg:8080/ user=everyone 对于XP系统,首先安装Windows XP Service Pack 2 Support Tools。然后在管理提示符下运行以下命令: httpcfg set urlacl /u http://vaidesg1:8080/ /a D:(a;;GX;;;WD)
如果你正在使用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
这个问题的公认答案是如何让IIS Express使用webmatrix的指南。我发现这个指南在使用VS 2010时更有用。
我只是按照步骤3和4(以管理员身份运行IIS Express),并且不得不暂时禁用我的防火墙才能让它工作。
推荐文章
- 实体框架核心:在上一个操作完成之前,在此上下文中开始的第二个操作
- 如何为构造函数定制Visual Studio的私有字段生成快捷方式?
- 如何使用JSON确保字符串是有效的JSON。网
- AppSettings从.config文件中获取值
- 通过HttpClient向REST API发布一个空体
- 如何检查IEnumerable是否为空或空?
- 自动化invokerrequired代码模式
- 在c#代码中设置WPF文本框的背景颜色
- 在c#中,什么是单子?
- c#和Java中的泛型有什么不同?和模板在c++ ?
- c#线程安全快速(est)计数器
- 如何将此foreach代码转换为Parallel.ForEach?
- 如何分裂()一个分隔字符串到一个列表<字符串>
- 如何转换列表<字符串>列表<int>?
- c#对象列表,我如何得到一个属性的和