S
Selden
I have a web service that copies and archives a database. Depending on the
size, it takes anywhere from 1 minute to 8 minutes to complete.
So I call the method asynchronously, and have a callback.
If the archive takes 4 minutes, it DOES call the callback routine, but
throws an error when the callback is called.
Here's the gist of the code on the calling side: (WFS is the web service
proxy generated by WSDL)
Dim callback As New AsyncCallback(AddressOf FinishArchiveWeb)
Dim ar As IAsyncResult
Dim sResults as String
WFS.BeginArchiveShoot(<some params>, sResults, callback, ar)
Here's the callback:
Private Sub FinishArchiveWeb(ByVal ar As IAsyncResult)
Dim sResults As String
Try
WFS.EndArchiveShoot(ar, sResults)
<some processing goes here>
Catch ex As Exception
<examine the exception here>
End Try
End Sub
If the call takes 4 minutes or longer, the callback throws an exception:
"The underlying connection was closed: An unexpected error occurred on a
receive."
But if the archive takes 2 minutes or less, it succeeds without any error.
I've tried increasing the .Timeout property of the proxy, but that didn't
seem to make any difference.
Any ideas or suggestions?
Thanks,
---Selden McCabe
size, it takes anywhere from 1 minute to 8 minutes to complete.
So I call the method asynchronously, and have a callback.
If the archive takes 4 minutes, it DOES call the callback routine, but
throws an error when the callback is called.
Here's the gist of the code on the calling side: (WFS is the web service
proxy generated by WSDL)
Dim callback As New AsyncCallback(AddressOf FinishArchiveWeb)
Dim ar As IAsyncResult
Dim sResults as String
WFS.BeginArchiveShoot(<some params>, sResults, callback, ar)
Here's the callback:
Private Sub FinishArchiveWeb(ByVal ar As IAsyncResult)
Dim sResults As String
Try
WFS.EndArchiveShoot(ar, sResults)
<some processing goes here>
Catch ex As Exception
<examine the exception here>
End Try
End Sub
If the call takes 4 minutes or longer, the callback throws an exception:
"The underlying connection was closed: An unexpected error occurred on a
receive."
But if the archive takes 2 minutes or less, it succeeds without any error.
I've tried increasing the .Timeout property of the proxy, but that didn't
seem to make any difference.
Any ideas or suggestions?
Thanks,
---Selden McCabe