I have a function that posts to a web service and handles a response. This web service has proven someone unreliable in that the server becomes unresponsive after transmitting several hundred posts (and handling the responses). As a result, I need to know how to handle the socket exception error (system.net.sockets.socketexception) so that it will try to post the record again. Here's a sample of the code I have;
Try 'For each item number in array, the following process is observed... For Each i As String In ItemData 'Post XML to web service post = "availability" _ & userid & "" & pass & "" _ & i & "" 'retreive txt/xml response & pass to appropriate function Response = EasyHttp.Send(xmlurl, post, HTTPMethod.HTTP_POST, "text/xml") Next Catch SocketEx As System.Net.Sockets.SocketException 'Socket Exception handler goes here Catch SockeetEx As Exception Throw Ex End Try
|
Replies
Know the answer? Post it — somebody with the same question will find it here.