Saturday, March 24, 2012

Please help ! Problem about HttpWebRequest - GetResponse()

Hi all,
I have problem when I use HttpWebRequest and take long time to call to my
service server. If at that time there are many request comes in
semultaneous, I will get this exception
System.Net.WebException: The underlying connection was closed: The request
was canceled. --> System.IO.IOException: Unable to read data from the
transport connection. --> System.ObjectDisposedException: Cannot access a
disposed object named "System.Net.TlsStream".
Object name: "System.Net.TlsStream".
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.TlsStream.AsyncReceiveComplete(IAsyncResult result)
-- End of inner exception stack trace --
at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
-- End of inner exception stack trace --
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at MFEC.DealerServices.Service.PaymentGateway.CallPaymentGateway(String
serviceName, GeneralParameterCollection inputParam)
Does anybody know how to solve this problem ?Have you seen this?
http://support.microsoft.com/defaul...kb;en-us;884537
- slightly different scenario, but you might be hitting the same bug.
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 22 Apr 2005 10:10:02 GMT, "japslam japslam via
webservertalk.com" <forum@.nospam.webservertalk.com> wrote:

>Hi all,
>I have problem when I use HttpWebRequest and take long time to call to my
>service server. If at that time there are many request comes in
>semultaneous, I will get this exception
>System.Net.WebException: The underlying connection was closed: The request
>was canceled. --> System.IO.IOException: Unable to read data from the
>transport connection. --> System.ObjectDisposedException: Cannot access a
>disposed object named "System.Net.TlsStream".
>Object name: "System.Net.TlsStream".
> at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
> at System.Net.TlsStream.AsyncReceiveComplete(IAsyncResult result)
> -- End of inner exception stack trace --
> at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
> at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
> -- End of inner exception stack trace --
> at System.Net.HttpWebRequest.CheckFinalStatus()
> at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
> at System.Net.HttpWebRequest.GetResponse()
> at MFEC.DealerServices.Service.PaymentGateway.CallPaymentGateway(String
>serviceName, GeneralParameterCollection inputParam)
>
>Does anybody know how to solve this problem ?

0 comments:

Post a Comment