无法在c项目中使用WCF服务-元数据错误

无法在c项目中使用WCF服务-元数据错误,wcf,Wcf,服务地点: 错误: The document was understood, but it could not be processed. - The WSDL document contains links that could not be resolved. - There was an error downloading 'http://mycompany.com/Test_Service/Service.SearchService.svc?xsd=xsd2'. - The

服务地点:

错误:

The document was understood, but it could not be processed.
  - The WSDL document contains links that could not be resolved.
  - There was an error downloading 'http://mycompany.com/Test_Service/Service.SearchService.svc?xsd=xsd2'.
  - The remote name could not be resolved: 'mycompany.com'
Metadata contains a reference that cannot be resolved: 'http://1.1.1.1:5670/Test_Service/Service.SearchService.svc?wsdl'.
There was no endpoint listening at http://1.1.1.1:5670/Test_Service/Service.SearchService.svc?wsdl that could accept the message. 
This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
If the service is defined in the current solution, try building the solution and adding the service reference again.
只有当我不在VPN上时才会发生这种情况。如果我在VPN上,事情会很顺利。此外,mycompany.com仅在内部提供


当未连接到VPN时,我可以查看WSDL。您的VPN可能会在公司网络内部的1.1.1.*子网中为您提供ip地址。因此,当您连接到VPN时,您可以访问服务器,而当您未连接时,您无法访问服务器,因为您在没有VPN的公司网络之外

除非您的公司愿意对外公开该服务器,否则可能无法解决此问题。只要使用你的VPN


根据注释:是的,您可以看到如下WSDL,但您需要加入VPN:

JP:如果我通过IE或Firefox访问我的服务,我可以查看该服务,也可以查看我公开的方法