首页 > 解决方案 > 使用同一 LAN 上的不同机器连接到 ASP.NET Core 托管服务器

问题描述

在运行我的 ASP.NET Core Web 应用程序时,我能够完成所需的工作。
我想在同一个局域网上使用不同的机器做同样的事情,<ip-address>:<port-number>/
我试图修改我applicationhost.config看到这篇文章Connecting to Visual Studio debugging IIS Express server over the lan但没有运气。

 <site name="WebSite1" id="1" serverAutoStart="true">
        <application path="/">
          <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
        </application>
        <bindings>
          <binding protocol="http" bindingInformation="*:8080:" />
        </bindings>
      </site>

文件路径是(solutionFolder)\.vs\config

尝试使用 bindingInformationbindingInformation=":8080:*" 我也禁用了我的防火墙。
我正在尝试在 Visual Studio 2017 上完成这项工作。

我也尝试使用 ngrok 来隧道我的本地主机。

有什么帮助吗?

This seems to be like an error connecting to http://<ip-address>:<port-number>. The response status was 0从不同的系统使用时得到这个。

平正在工作。

标签: c#.netasp.net-coreiisngrok

解决方案


推荐阅读