简体   繁体   中英

403 error when calling an external web service ASP.NET

I'm unable to access a web service at webservicex When trying to add the service reference, I got the following error message.

"There was an error downloading ' http://www.webservicex.net/uszip.asmx/_vti_bin/ListData.svc/ $metadata'.

The request failed with the error message:

System.InvalidOperationException: _vti_bin/ListData.svc/$metadata Web Service method name is not valid. at System.Web.Services.Protocols.HttpServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

--. Metadata contains a reference that cannot be resolved: ' http://www.webservicex.net/uszip.asmx '. The HTTP request was forbidden with client authentication scheme 'Anonymous'. The remote server returned an error: (403) Forbidden. If the service is defined in the current solution, try building the solution and adding the service reference again."

What is the cause of this? How can I get around it? It seems to happen with all external web services I attempt to add (not just from webservicex.net).

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM