0
votes

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).

1
the correct url should be the following what happens when you try to discover the webservice url using the following url webservicex.net/uszip.asmx I tried it and it brings up the USZip WebService with the following public methods GetInfoByAreaCode , GetInfoByCity ,GetInfoByState ,GetInfoByZIP can you show us how you are consuming the webservice via your C# CodeMethodMan
I'm not yet consuming the webservice. When I try to connect to the service host- webservicex, it gives my (403) Forbidden. It seems to be having fits because "_vti_bin/ListData.svc/$metadata" gets appended to the end, which I don't know how to prevent.Waffles
how are you trying to connect to it ..? try consuming it in a .net application and add a Web Reference.. see if you can call any of the methods that way..MethodMan
You need to use WSDL! webservicex.net/uszip.asmx?WSDL will work.Kami

1 Answers

-1
votes

Get you public IP whitelisted on the external web service hosting server.