我的Web服务托管在我的服务器上的IIS中,当我尝试下载服务的元数据时,它给我一个错误:无法解析远程名称:win2008x64(服务器名称)。在服务器上,我有2个绑定,一个http,另一个是https ..
我该如何解决这个问题呢?
修改
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://win2008x64:1668/Service.svc?xsd=xsd0'.
- The remote name could not be resolved: 'win2008x64'
Metadata contains a reference that cannot be resolved: 'http://89.x.x.x:166x/Service.svc?wsdl'.
Metadata contains a reference that cannot be resolved: 'http://89.x.x.x:166x/Service.svc?wsdl'.
If the service is defined in the current solution, try building the solution and adding the service reference again.
提前感谢。
答案 0 :(得分:2)
我在codeplex上使用WcfExtras(how to use)项目来处理这类问题。如果您的服务器位于某种代理之后,这也很有用。您只需定义位置属性并覆盖服务的网址:
<endpointBehaviors>
<behavior name="Sample.WsdlSampleEndpointBehavior">
<wsdlExtensions location="http://127.0.0.1/Sample/WsdlSample.svc" />
</behavior>
</endpointBehaviors>
答案 1 :(得分:1)
尝试使用服务器的IP地址生成wsdl。如果它是公共服务器使用外部ip(whatsmyip.org),可能只是一个Dns问题。