【问题标题】:Unable to access to a nancy webservice form external connections无法从外部连接访问 nancy Web 服务
【发布时间】:2019-11-07 05:06:43
【问题描述】:

我有一个 nancy (2.0.0-clinteastwood) 网络服务,但无法从外部连接。

我尝试了以下解决方案但没有成功:

我已经有一个边界规则指向指定的服务,允许所有连接到 Web 服务端口。

我尝试了以下配置:

   _uri = new Uri(url);
   _hostConfigs = new HostConfiguration();
   _hostConfigs.UrlReservations.CreateAutomatically = true;
   _hostConfigs.EnableClientCertificates = true;
   _uri = new Uri(url);
   _hostConfigs = new HostConfiguration();
   _hostConfigs.RewriteLocalhost = true;
   _hostConfigs.UrlReservations.CreateAutomatically = true;
   _hostConfigs.EnableClientCertificates = true;

这些都没有用。

我也试过 netsh 命令,但没有用。

Web 服务完美响应本地请求,问题出在外部请求上。 在使用 .net 标准创建这个 nancy web 服务之前,我有一个带有 .net 框架的 nancy 服务和一个响应外部请求的 .net 核心 web 服务(我遇到了一些问题,因为它们并不总是响应)。

【问题讨论】:

    标签: c# .net nancy .net-standard-2.0


    【解决方案1】:

    你绑定的url是什么?

    【讨论】:

    • 你的机器上有防火墙吗?您还需要允许5000
    • 是的,我已经这样做了,我也尝试禁用防火墙,但它不起作用
    猜你喜欢
    • 2018-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 1970-01-01
    • 2012-08-04
    • 2019-05-03
    • 2016-08-03
    相关资源
    最近更新 更多