I have a asp.net application connecting to a .net web service, whenever i login &开发者_如何学运维; reach the main page, web services returns me back the data.
But if i login for may be more than 1 or 2hrs, when i click any of the links i get:
"System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
What is the fix for this? Thanks.
That is probably because your session gets expired. You will have to check whether the user is still connected to the webserver hosting webservice or not before making any call to that server.
精彩评论