【问题标题】:Soap Service Works in VS but not IISSoap 服务在 VS 中有效,但在 IIS 中无效
【发布时间】:2018-01-23 12:52:10
【问题描述】:

我有一个第三方 SOAP Web 服务,我在 WCF 应用程序中使用它

该服务在 Visual Studio 中运行并使用 WCF 调试器时工作正常,但在完整 IIS 中运行时出现以下错误

System.ServiceModel.EndpointNotFoundException
There was no endpoint listening at https:// ***.custhelp.com/cgi-
bin/ ***.cfg/services/soap This is often caused by an incorrect address or 
SOAP action. See InnerException, if present, for more details. ---> 
System.Net.WebException: Unable to connect to the remote server ---> 
System.Net.Sockets.SocketException: An attempt was made to access 
a socket in a way forbidden by its access permissions 74.117.207.64:443

我知道该服务会阻止 TLS 1.0,所以我已加入 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11(和...| Tls12)

我已确认它们都在 64 位模式下运行 Environment.Is64BitProcess = true

我也尝试在 WebApi 应用程序中使用相同的肥皂服务,但我得到了同样的错误。

【问题讨论】:

  • 错误是在服务运行时还是客户端尝试连接时出现的?该错误看起来像是来自客户端的错误,这是由于服务未正确启动。所以我怀疑该服务没有正确安装。除非网络库相同,否则您无法将可执行文件从一台 PC 移动到另一台 PC。我认为您需要使用 setup.exe 发布应用程序并安装在 IIS 服务器上。
  • 当我尝试调用 SOAP Web 服务的方法之一时发生错误,那是在 ServiceClient 类被实例化之后。我无法控制 SOAP 服务,但我的 WCF 服务已部署到本地计算机上的完整 IIS。
  • 在 iis 中托管时,您应该考虑许多必要的检查。检查是否为 wcf、重置 iis 等启用了 http 模块。

标签: c# wcf iis soap


【解决方案1】:

问题与内部代理问题有关

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-30
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 2020-01-23
    • 1970-01-01
    相关资源
    最近更新 更多