G
Genojoe
I have a Windows Service (VB.NET) that runs 24/7. It
contacts a Web Service (VB.NET on IIS). As long as we
send requests to the Web Service at least once every 15
minutes, everything works fine. We send the request
asynchronously and wait for the response. When there is
a 30 minute or greater gap between requests, we get the
following error message in the Windows service return
thread:
Error #: 5, Description: The underlying connection was
closed: An unexpected error occurred on a receive.
The problem seems to be with some type of connection
timeout that is controlled either by the client or the
host. We can't find any settings in the IIS server or the
VB.NET Windows service that controls connection timeout.
If we immediately resend the request, it works fine. Our
sending code is:
Dim oAsyncCallback As AsyncCallback
oAsyncCallback = New AsyncCallback(AddressOf
priCallbackLoyalty)
C.WebService.BeginATransaction(oDataSet, oAsyncCallback,
C.WebService)
(C.WebService points to a valid Web service on the
internet. ATransaction is the name of a method on the Web
service.)
Our return code is:
Private Sub priCallbackLoyalty(ByVal oResult As
IAsyncResult)
Dim oDataSet As DataSet
Try
C.WebService.EndATransaction(oResult, oDataSet)
Catch ex As Exception
C.Log("Error reading Asynch return: " & Err.Description)
End Try
Any help, feedback, or comments would be appreciated.
contacts a Web Service (VB.NET on IIS). As long as we
send requests to the Web Service at least once every 15
minutes, everything works fine. We send the request
asynchronously and wait for the response. When there is
a 30 minute or greater gap between requests, we get the
following error message in the Windows service return
thread:
Error #: 5, Description: The underlying connection was
closed: An unexpected error occurred on a receive.
The problem seems to be with some type of connection
timeout that is controlled either by the client or the
host. We can't find any settings in the IIS server or the
VB.NET Windows service that controls connection timeout.
If we immediately resend the request, it works fine. Our
sending code is:
Dim oAsyncCallback As AsyncCallback
oAsyncCallback = New AsyncCallback(AddressOf
priCallbackLoyalty)
C.WebService.BeginATransaction(oDataSet, oAsyncCallback,
C.WebService)
(C.WebService points to a valid Web service on the
internet. ATransaction is the name of a method on the Web
service.)
Our return code is:
Private Sub priCallbackLoyalty(ByVal oResult As
IAsyncResult)
Dim oDataSet As DataSet
Try
C.WebService.EndATransaction(oResult, oDataSet)
Catch ex As Exception
C.Log("Error reading Asynch return: " & Err.Description)
End Try
Any help, feedback, or comments would be appreciated.