windows server timeout

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

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.
 
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]
- (e-mail address removed)

Ram Baruch said:
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.

message news:O%[email protected]...
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]
- (e-mail address removed)

Ram Baruch said:
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.
 
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.
 
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 said:
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]
- (e-mail address removed)

Ram Baruch said:
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.
 
Ok, thanks very much for the 'super-quick' help!!!!
Ram.


Nicholas Paldino said:
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]
- (e-mail address removed)

Ram Baruch said:
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.

message news:O%[email protected]...
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]
- (e-mail address removed)

Hi,
I have a question:
I made a windows service (using VS wizard). All it does is to
connect
to increasing
the
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top