3

我在使用 .NET 4.0、VS2010 和 WCF 向示例客户端项目添加服务引用时遇到问题。

WCF 服务部署到 IIS(目前为 6 个),我可以在http://myServer.myDomain.net:8083/myService/actualService.svc?wsdl浏览 IE 中 MEX 端点公开的 WSDL ;但是当我尝试“添加服务引用”并将其指向上述地址时 - 我在 VS 中收到以下错误:

下面是错误

Metadata contains a reference that cannot be resolved: 'http://myServer.myDomain.net:8083/myService/actualService.svc?wsdl'.
The remote server returned an unexpected response: (407) Proxy Authentication Required.
The remote server returned an error: (407) Proxy Authentication Required.
If the service is defined in the current solution, try building the solution and adding the service reference again.

该服务被配置为拒绝匿名访问,所以我猜我需要 VS 向该服务提供我的凭据,然后它才能让我看到 MEX/WSDL。

我用谷歌搜索了一下,发现人们一直在尝试类似的事情:

<system.net>
  <defaultProxy useDefaultCredentials="true" />
</system.net>

但这对我来说似乎没有什么不同,我还尝试确保将 Web 服务的 URL 配置为在 IE 设置中被绕过。

有任何想法吗?当您想使用 Web 服务并开始编写代码时,这很烦人。

谢谢皮特

4

0 回答 0