473,498 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

windows server timeout

Hi,
I have a question:
I made a windows service (using VS wizard). All it does is to connect to my
site every X seconds and check if there is anything new to download. If
there is- it downloads a big file (using WebClient.Download() ). On MY
computer it doesn't take a ling time, but on other computers it may take
some time (lets say 10 minutes). Is there any chance that after a while .net
will raise an exception that the server is not responding or a similar
exception (I remember this from COM...) ?
If I will get an exception, is there anyway to avoid it by increasing the
timeout somehow?
Regards,
Ram.
Nov 16 '05 #1
4 1741
Ram,

I am not sure which timeout you are referring to? Do you mean the call,
or the download timeout? You don't have to worry about the call timing out
(unless it is a remoted call, possibly).

As for a download timeout, I don't think that the WebClient will give
you the flexibility you need in setting the timeout. You might want to use
the HttpWebRequest and HttpWebResponse classes, as they will allow you to
set timeouts for the download (or eliminate them, I think).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
I have a question:
I made a windows service (using VS wizard). All it does is to connect to my site every X seconds and check if there is anything new to download. If
there is- it downloads a big file (using WebClient.Download() ). On MY
computer it doesn't take a ling time, but on other computers it may take
some time (lets say 10 minutes). Is there any chance that after a while ..net will raise an exception that the server is not responding or a similar
exception (I remember this from COM...) ?
If I will get an exception, is there anyway to avoid it by increasing the
timeout somehow?
Regards,
Ram.

Nov 16 '05 #2
Hi,
What I meant is the time that WebClient.Download() takes- I don't care it
takes a lot of time, all I care is that I won't get any exceptions for it
when it does take a long period of time.
Regards,
Ram.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O%****************@TK2MSFTNGP11.phx.gbl...
Ram,

I am not sure which timeout you are referring to? Do you mean the call, or the download timeout? You don't have to worry about the call timing out (unless it is a remoted call, possibly).

As for a download timeout, I don't think that the WebClient will give
you the flexibility you need in setting the timeout. You might want to use the HttpWebRequest and HttpWebResponse classes, as they will allow you to
set timeouts for the download (or eliminate them, I think).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
I have a question:
I made a windows service (using VS wizard). All it does is to connect to

my
site every X seconds and check if there is anything new to download. If
there is- it downloads a big file (using WebClient.Download() ). On MY
computer it doesn't take a ling time, but on other computers it may take
some time (lets say 10 minutes). Is there any chance that after a while

.net
will raise an exception that the server is not responding or a similar
exception (I remember this from COM...) ?
If I will get an exception, is there anyway to avoid it by increasing the timeout somehow?
Regards,
Ram.


Nov 16 '05 #3
Ram,

As long as you are still getting content, I don't see why an exception
would be thrown. If you were waiting, and no content was received, then I
would expect it to be thrown.

Once again, if you need control over this timeout, then I would
recommend using the HttpWebRequest class, where you have more fine-grained
control over this.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:u4**************@TK2MSFTNGP09.phx.gbl...
Hi,
What I meant is the time that WebClient.Download() takes- I don't care it
takes a lot of time, all I care is that I won't get any exceptions for it
when it does take a long period of time.
Regards,
Ram.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:O%****************@TK2MSFTNGP11.phx.gbl...
Ram,

I am not sure which timeout you are referring to? Do you mean the

call,
or the download timeout? You don't have to worry about the call timing

out
(unless it is a remoted call, possibly).

As for a download timeout, I don't think that the WebClient will give
you the flexibility you need in setting the timeout. You might want to

use
the HttpWebRequest and HttpWebResponse classes, as they will allow you to set timeouts for the download (or eliminate them, I think).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
I have a question:
I made a windows service (using VS wizard). All it does is to connect to
my
site every X seconds and check if there is anything new to download.
If there is- it downloads a big file (using WebClient.Download() ). On MY
computer it doesn't take a ling time, but on other computers it may take some time (lets say 10 minutes). Is there any chance that after a

while .net
will raise an exception that the server is not responding or a similar
exception (I remember this from COM...) ?
If I will get an exception, is there anyway to avoid it by increasing

the timeout somehow?
Regards,
Ram.



Nov 16 '05 #4
Ok, thanks very much for the 'super-quick' help!!!!
Ram.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ea**************@TK2MSFTNGP10.phx.gbl...
Ram,

As long as you are still getting content, I don't see why an exception
would be thrown. If you were waiting, and no content was received, then I
would expect it to be thrown.

Once again, if you need control over this timeout, then I would
recommend using the HttpWebRequest class, where you have more fine-grained
control over this.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:u4**************@TK2MSFTNGP09.phx.gbl...
Hi,
What I meant is the time that WebClient.Download() takes- I don't care it
takes a lot of time, all I care is that I won't get any exceptions for it when it does take a long period of time.
Regards,
Ram.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O%****************@TK2MSFTNGP11.phx.gbl...
Ram,

I am not sure which timeout you are referring to? Do you mean the

call,
or the download timeout? You don't have to worry about the call timing
out
(unless it is a remoted call, possibly).

As for a download timeout, I don't think that the WebClient will give you the flexibility you need in setting the timeout. You might want
to use
the HttpWebRequest and HttpWebResponse classes, as they will allow you to set timeouts for the download (or eliminate them, I think).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Hi,
> I have a question:
> I made a windows service (using VS wizard). All it does is to
connect to my
> site every X seconds and check if there is anything new to download. If > there is- it downloads a big file (using WebClient.Download() ). On
MY > computer it doesn't take a ling time, but on other computers it may

take > some time (lets say 10 minutes). Is there any chance that after a while .net
> will raise an exception that the server is not responding or a similar > exception (I remember this from COM...) ?
> If I will get an exception, is there anyway to avoid it by

increasing the
> timeout somehow?
> Regards,
> Ram.
>
>



Nov 16 '05 #5

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

Similar topics

5
12883
by: Isaac Raway | last post by:
Hello. I'm writing a Python program that connects to servers through telnetlib to execute a few commands. I've discovered that some of the servers that I have to connect to with this program run...
0
1059
by: Elbert Lev | last post by:
Python 2.3 Windows NT 4.0 (512M, PIII-500) Here are results of performance comparison of several strategies of multiple socket handling (server side). To do this comparison I've written 3...
2
393
by: Dave | last post by:
I have developed a VB.net application that transfers a SOAP wrapped message to another server securely(using SSL and sever/client certificates). When I run this app from a Windows 2000...
0
1066
by: Tom Smit | last post by:
We're having a problem where our application is timing out after 60 minutes no matter what type of activity is occuring. A user can be in the middle of a server call and it will timeout after 60...
0
1648
by: Seth | last post by:
For some reason my service works fine except that it will create the file in my c drive, but will not write to the file. Sorry if this is a duplicate post, i have found some that ask the same...
3
7468
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
2
2365
by: WB | last post by:
Hi, I have a Windows Application in C# that has some long-running codes. When I tried to run the program in debug mode, it eventually gave an error: Timeout expired. The timeout period elapsed...
14
6994
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
0
8253
by: =?Utf-8?B?QWRyaWFuIENvbGU=?= | last post by:
I have written a simple WCF service hosted in a Windows console application and a simple WCF client console application that connects successfully to that service and retrieves data. I then ported...
0
7167
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,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.