我在作为 LocalSystem 运行的 Windows 服务中有一个 WCF 服务(自托管)。此 Windows 服务在云中的虚拟环境 (OVH) 上运行 此服务可通过带有真实 X509 证书(来自 CA)的 https 访问。我在传输级别使用 TransportWithMessageCredentials,在消息级别使用用户名身份验证。
我的 WCF 客户端在https://wcfserver.domain.com上的 Internet 上运行良好。当我尝试从 Intranet 运行我的 WCF 客户端时,他无法连接到https://wcfserver.domain.com。
我从 Intranet 调查以下测试:
服务器上没有记录 WCF 跟踪
Internet explorer (network diag) : 您尝试访问的网络服务暂时不可用。原因可能是网关和 Web 服务之间的通信问题。代理或网关返回 502 错误。所以我删除了 SOAP 消息中的时间戳,但问题仍然存在......
提琴手的回应是:
Headers: HTTP/1.1 502 Fiddler - Connection Failed Date: Tue, 20 Sep 2016 16:14:07 GMT Content-Type: text/html; charset=UTF-8 Connection: close Cache-Control: no-cache, must-revalidate Timestamp: 18:14:07.000 Caching: Under RFC2616, HTTP/502 responses will not be cached regardless of what caching headers may be present. HTTP/1.1 Cache-Control Header is present: no-cache, must-revalidate no-cache: This response MUST NOT be reused without successful revalidation with the origin server.This response contains neither an ETAG nor a Last-Modified time. This will prevent a Conditional Revalidation of this response.
我还注意到https://wcfserver.domain.com或其公共 IP 无法访问 Web 服务页面,但如果我使用本地 IP https://192.168.XXX.XXX ,我可以打开它(但我必须手动接受证书警告)......
任何帮助或建议将不胜感激!:) 我被困住了!
问候,弗朗索瓦