Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there...

After building a webservice, and deploying it to a server, randomly I am encountering the following error:

"the underlying connection was closed: a connection that was expected to be kept alive was closed by the server"

After searching the internet, I found that many would set the KeepAlive property of the WebRequest object to false. This solution requires overriding the GetWebRequest method in the Reference.vb file of the web service proxy class.

The problem - I think - is that I created the web service proxy class as a Service Reference, not as a Web Reference. For this reason I can not override the GetWebRequest method - or at least I don't know which class to modify.

I might be missing something, or accessing the wrong classes. Kindly advice.

Yours sincerely
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900