You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从远程计算机访问Windows 11上的IIS Express站点?

如何从远程计算机访问Windows 11上的IIS Express站点?

我曾在搭载Intel芯片、运行MacOS Monterey的MacBook Pro上,通过Parallel Desktop 15运行Windows 10,按照相关步骤成功实现了远程访问。但在公司搭载M1芯片、运行MacOS Monterey的MacBook Pro上,通过Parallel Desktop 18运行Windows 11时,执行相同操作却无法成功,推测问题出在Windows 11上。

以下是我在Windows 10上成功实现远程访问的步骤,供参考:

1. 将应用绑定到公网IP地址

  • 以管理员权限打开Windows命令提示符,输入ipconfig,记录IPv4地址(示例值:xx.xxx.xx.5)
  • 打开/{project folder}/.vs/config/applicationhost.config,在<binding protocol="http" bindingInformation="*:41036:localhost" />行下方,添加一行配置:
    <binding protocol="http" bindingInformation="*:41036:xx.xxx.xx.5" />
    

2. 允许传入连接

执行以下命令:

netsh http add urlacl url=http://xx.xxx.xx.5:41036/ user=everyone
netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=41036 profile=private remoteip=localsubnet action=allow

完成上述步骤后,我可以在MacOS中通过http://xx.xxx.xx.5:41036/weatherforecast访问该站点。

内容的提问来源于stack exchange,提问作者Tuan van Duong

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 09:30:38