调用外部Web服务时出现403错误ASP.NET

时间:2016-04-11 20:53:34

标签: c# asp.net web-services

我无法访问webservicex上的网络服务 尝试添加服务引用时,我收到以下错误消息。

“下载'http://www.webservicex.net/uszip.asmx/_vti_bin/ListData.svc/ $元数据'时出错。

请求失败,并显示错误消息:

System.InvalidOperationException:_vti_bin / ListData.svc / $ metadata Web服务方法名称无效。    在System.Web.Services.Protocols.HttpServerProtocol.Initialize()    在System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,HttpContext context,HttpRequest request,HttpResponse response,Boolean& abortProcessing)

- 元数据包含无法解析的引用:“http://www.webservicex.net/uszip.asmx”。 客户端身份验证方案“匿名”禁止HTTP请求。 远程服务器返回错误:(403)禁止。 如果在当前解决方案中定义了服务,请尝试构建解决方案并再次添加服务引用。“

这是什么原因?我怎么能绕过它呢?我尝试添加的所有外部Web服务似乎都会发生这种情况(不仅仅是来自webservicex.net)。

1 个答案:

答案 0 :(得分:-1)

在外部Web服务托管服务器上将公共IP列入白名单。

相关问题