Use a web service from the class library

I have successfully created an ASP.net website for calls to the Soap web service.

Now I need to turn it into a class library, which I can call through Com from the classic ASP.

This post in Consuming a web service in an asp.net application from the class library says that I need to add a web service, how to use "Add a service link" instead of "Add a web link" to add a link to the web service.

When I try to do this, I get an error:

The metadata contains a link that cannot be resolved: ' http://theURL.com:8008/asmx/publicServiceAddress.asmx?wsdl '.
An error occurred while loading ' http://theURL.com:8008/asmx/publicServiceAddress.asmx?wsdl '.
Unable to connect to remote server Connection attempt failed. the related party did not respond properly after a certain period of time or the connection was not established because the connected host could not respond 77.95.80.35:8008 Metadata contains a link that cannot be resolved: ' http://theURL.com/asmx/ publicServiceAddress.asmx '. Metadata contains a link, cannot be resolved: ' http://theURL.com/asmx/publicServiceAddress.asmx '.
If the service is defined in the current solution, try building the solution and adding the link service again.

... but when I click on advanced and then add "Add Web Link", I can add it in order.

Questions:

1) Do I need to use "Add link to service" instead of "Add web link"?
2) Why, what's the difference?
3) What are the potential causes of this error and how can I understand it, for example, I don’t know why this will happen with port 8080 to search for WSDL http://theURL.com:8008/asmx/reguspublic.asmx?wsdl when it should go to http://theURL.com/asmx/reguspublic.asmx?wsdl

+3
source share
2 answers

Windows Communication Foundation (WCF) WCF, - - "legacy" asmx.

, 'asmx' , .

http://alexduggleby.com/2008/08/24/add-web-reference-instead-of-service-reference-in-visual-studio-2008/

:
WCF , ..NET 2.0 asmx webservices @SOAP. , - asmx , - .

+5

no it does not need, webservice , webservice , , webservice .exe.config,

URL- webservice , ,

  AC.CCRS.WebService.MyWebServices c = new AC.CCRS.WebService.MyWebServices ();
            c.Url =... "the webservice host url
+1

All Articles