Last post Apr 13, 2018 06:53 AM by Edward Z
Apr 09, 2018 06:34 AM|bernova|LINK
I was adding a web service via "Add Web Reference" to my project. The web service was only accessible on https with a client certificate.When I did "Add Web Reference" I got a "The underlying connection was closed: An unexpected error occurred on a send". I found an other way to add the web service via "Add Web Reference" but i don't know how to use this way ??
1-Save the WSDL to a location on your machine.
2-Copy the path.
3-Go to the Add Web Reference in your project.
4-Paste the path you copied into the URL.
6-Click on Add Reference
should i change all of addresses in the wsdl file to https ?Thanks a lot.
Apr 09, 2018 01:37 PM|mgebhard|LINK
The following error usually means the service is not running or the client is not sending the proper credentials.
The underlying connection was closed: An unexpected error occurred on a send
should i change all of addresses in the wsdl file to https ?
The WSDL is used to generate the client proxy code. Make sure you're web.config or client is pointing to HTTPS.
I suggest that you contact the service owner and ask for assistance.
Apr 09, 2018 02:13 PM|PatriceSc|LINK
If you can't even access the WSDL, will you be able to access the actual service ?
https://stackoverflow.com/questions/22627977/the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send it could occur if you don't agree on which kind of encryption should be used for the https connection.
Apr 13, 2018 06:53 AM|Edward Z|LINK
>> should i change all of addresses in the wsdl file to https ?
There is no need to change the address. The client code is generated based on the wsdl which describes the endpoint address at the service side.
Could you access the wsdl address from the web browser? Will you receive any error?
>> I found an other way to add the web service via "Add Web Reference" but i don't know how to use this way ??
Without changing the address, will you receive any error by this way?