473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

VB.NET Windows service and Web service that times out.

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.
Nov 20 '05 #1
2 6105
Cor
Genojoe,
I think this is the mainpart of your question

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.

Did you check this in the asp.net group?
Cor
Nov 20 '05 #2
(Duplicate of answer for previous question. Hope you see
one of these. You can watch to see if any results occur
at my alternate posting.

To Cor and Fergus:

Thank you for your comments. Here are some answers to
your comments.

(1) I am posting these questions to the
microsoft.public.dotnet.framework.webservices. Thanks for
the tip. I found that location by searching for "ASP.NET"
and finding the most frequently used site.

(2) Neither the Windows Service or Web Service has any
ASP.NET associated with them.

(3) I posted these separately because the problems are
independent of each other. In one case, it happens
whenever we go more than 30 minutes without a transaction
being sent by server. We have error trapping and the
system functions. It just causes an automatic
resubmission and a delay in the process (which makes the
end user wait longer than expected). During the busy time
of day there is no problem because the requests go every
10 or 15 minutes. During slower part of day, there can be
a 60 minute gap between requests.

The second problem happens sporatically perhaps once every
week or two at one location (out of 10). We have no idea
about what causes it. We have never seen it happen when
being closely monitored or tested. So far, our error
trapping has not yielded any clues and we have no idea of
how to duplicate the problem. (We only know how to fix it
(stop and restart windows service.) Who knows when it
will happen again?

Gene
-----Original Message-----
Genojoe,
I think this is the mainpart of your question

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.

Did you check this in the asp.net group?
Cor
.

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Fabio Papa | last post by:
I am trying to write a windows service that sends emails to clients at specific times based on information in a sql db. Since this is done for multiple cities, I start a thread for each city and...
11
by: Michael Riggio | last post by:
Is there a way to have a windows service instantiate a class that is a web service, which will then be accessible to clients via HTTP? Thanks, -Mike
2
by: MatthewRoberts | last post by:
Howdy All, I have a Windows Service that often stops in its tracks with no exception and no explanation on our QA system. During testing on the development machine, it can handle any workload,...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
7
by: Gene | last post by:
I have a Windows Service (VB.NET) that runs 24/7. It queries a Web service 5 to 10 times per hour. About 2 or 3 times a month, it fails. The log indicates that it sends the request to the Web...
7
by: Sunil Varma | last post by:
Hello all, I wrote a Windows Service in VC.NET 2005 I want to debug the solution. I tried as mentioned in the following link. ...
12
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
5
by: JM | last post by:
I have created a Windows Service which uses xml file as a data source. The service is running on .NET 2.0 and uses LocalSystem account. It was running fine but now it has started locking the xml...
5
by: =?Utf-8?B?cnZhbmdlbGRyb3A=?= | last post by:
Hello, I have a problem with our OnlineBackupService.exe. This is a Windows Service which is built in .Net 1.1 and basically grabs files from the file system and will try to upload them using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.