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).
USZip WebService
with the following public methodsGetInfoByAreaCode , GetInfoByCity ,GetInfoByState ,GetInfoByZIP
can you show us how you are consuming the webservice via yourC# Code
– MethodMan