【问题标题】:SoapException: Host is not known, only when called from WebServiceSoapException:主机未知,仅在从 WebService 调用时
【发布时间】:2015-06-12 12:00:16
【问题描述】:

我有一个在 Azure 平台上运行 .NET 4.5 的 Web 应用程序。作为网络应用程序的一部分,我们将线索发送到第 3 方网络服务。决定让前端通过 JS AJAX 调用与本地 Web 服务 (.asmx) 交互,而后者又调用 3rd 方 Web 服务。

这在本地一切正常,但在移至 Azure 时出现“System.Web.Services.Protocols.SoapException: Host is not known”异常。

System.Web.Services.Protocols.SoapException: No such host is known

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

我已经测试了 Azure 和第 3 方 WebService 之间的连接,它们可以正常通信。

让我感到困惑的是,如果我调用从常规 .aspx 页面回发时触发的代码发送第 3 方请求的代码,它就可以工作。我假设 Azure 处理 .asmx 请求的方式与我无法理解的常规页面加载相反。

任何人都可以在这里阐明这个问题吗?

【问题讨论】:

    标签: asp.net web-services azure


    【解决方案1】:

    错误信息有点牵强。原来问题是外部网络服务抛出了 500。我们解决了这个问题,错误消失了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多