使用 WCFTestClient 工具时无法获取元数据
Cannot obtain Metadata when using WCFTestClient tool
我有一个 WCF 服务 https://payments.acompany.com/WebBridge10/WebBridge10.svc?
。
我可以在浏览器中打开它,现在我想用 WCFTestClient 工具测试它。在我添加 wsdl 路径后,我得到:
Error: Cannot obtain Metadata from https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl Metadata contains a reference that cannot be resolved: 'https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl'. An error occurred while making the HTTP request to https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream.HTTP GET Error URI: https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl There was an error downloading 'https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl'. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream.
我还添加了对 Visual Studio 项目的服务引用,节点(ValidateBTNandProceePayment)显示 + 号左边。但其他服务显示的是储物柜图标。见下图。
为什么?
最后,因为是https服务。我们需要在 Fiddler 中设置 tls 1.2。所以解决方案是下载Fiddler并点击"Tools"=>"Fiddler options"=>"https".
这个问题似乎已经有人自己回答了,但对于那些不想使用 Fiddler 作为解决方法的人来说,这个解决方案可能是相关的:
我有一个 WCF 服务 https://payments.acompany.com/WebBridge10/WebBridge10.svc?
。
我可以在浏览器中打开它,现在我想用 WCFTestClient 工具测试它。在我添加 wsdl 路径后,我得到:
Error: Cannot obtain Metadata from https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl Metadata contains a reference that cannot be resolved: 'https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl'. An error occurred while making the HTTP request to https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream.HTTP GET Error URI: https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl There was an error downloading 'https://payments.acompany.com/WebBridge10/WebBridge10.svc?wsdl'. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream.
我还添加了对 Visual Studio 项目的服务引用,节点(ValidateBTNandProceePayment)显示 + 号左边。但其他服务显示的是储物柜图标。见下图。
为什么?
最后,因为是https服务。我们需要在 Fiddler 中设置 tls 1.2。所以解决方案是下载Fiddler并点击"Tools"=>"Fiddler options"=>"https".
这个问题似乎已经有人自己回答了,但对于那些不想使用 Fiddler 作为解决方法的人来说,这个解决方案可能是相关的: