WebException timeout Problem.
-
We are using a web service(asmx) to communicate with service provider. Problem: We are getting a web exception while sending and receiving response. Exception Details : 1) Exception Message : The request was aborted: The operation has timed out. 2) Exception Status : timeout We are getting this timeout status within 40 seconds whereas we have set webrequests timeout property to 180 seconds. Can anybody please suggest me the solution of this problem??
Vishal
-
We are using a web service(asmx) to communicate with service provider. Problem: We are getting a web exception while sending and receiving response. Exception Details : 1) Exception Message : The request was aborted: The operation has timed out. 2) Exception Status : timeout We are getting this timeout status within 40 seconds whereas we have set webrequests timeout property to 180 seconds. Can anybody please suggest me the solution of this problem??
Vishal
Double check your time again, the WebRequest class uses timeout in milliseconds, so if you did something like
webRequest.Timeout = 180;
That just means that it will expire in 180 milliseconds and not the expected 180 seconds. If your time is correct, then check with the server and make sure that the server does not close the connection after sometime without completing the request.
-
Double check your time again, the WebRequest class uses timeout in milliseconds, so if you did something like
webRequest.Timeout = 180;
That just means that it will expire in 180 milliseconds and not the expected 180 seconds. If your time is correct, then check with the server and make sure that the server does not close the connection after sometime without completing the request.
Thanks for reply friend, My timeout time is correct, I have set webRequest.Timeout = 180000; I am getting two types of webExceptions : 1) Exception Message : The request was aborted: The operation has timed out. Exception Status : timeout This timeout happens within 40 seconds, whereas I have set timeout 180 seconds for my webrequest. 2) Exception Message : The operation has timed out. Exception Status : timeout This is normal timeout. It happens after 180 seconds.
-
Thanks for reply friend, My timeout time is correct, I have set webRequest.Timeout = 180000; I am getting two types of webExceptions : 1) Exception Message : The request was aborted: The operation has timed out. Exception Status : timeout This timeout happens within 40 seconds, whereas I have set timeout 180 seconds for my webrequest. 2) Exception Message : The operation has timed out. Exception Status : timeout This is normal timeout. It happens after 180 seconds.
Thanks for reply friend, My timeout time is correct, I have set webRequest.Timeout = 180000; I am getting two types of webExceptions : 1) Exception Message : The request was aborted: The operation has timed out. Exception Status : timeout This timeout happens within 40 seconds, whereas I have set timeout 180 seconds for my webrequest. 2) Exception Message : The operation has timed out. Exception Status : timeout This is normal timeout. It happens after 180 seconds. Problem is in 1st exception case..... Please tell me the solution to this problem....