Connecting Tech Pros Worldwide Forums | Help | Site Map

windows server timeout

Ram Baruch
Guest
 
Posts: n/a
#1: Nov 16 '05
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.



Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
#2: Nov 16 '05

re: windows server timeout


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]
- mvp@spam.guard.caspershouse.com

"Ram Baruch" <ram_ba_ruch@newsgroups.nospam> wrote in message
news:%230mDmoWSEHA.1544@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi,
> I have a question:
> I made a windows service (using VS wizard). All it does is to connect to[/color]
my[color=blue]
> 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[/color]
..net[color=blue]
> 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.
>
>[/color]


Ram Baruch
Guest
 
Posts: n/a
#3: Nov 16 '05

re: windows server timeout


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]" <mvp@spam.guard.caspershouse.com> wrote in
message news:O%23PKftWSEHA.3812@TK2MSFTNGP11.phx.gbl...[color=blue]
> Ram,
>
> I am not sure which timeout you are referring to? Do you mean the[/color]
call,[color=blue]
> or the download timeout? You don't have to worry about the call timing[/color]
out[color=blue]
> (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[/color]
use[color=blue]
> 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]
> - mvp@spam.guard.caspershouse.com
>
> "Ram Baruch" <ram_ba_ruch@newsgroups.nospam> wrote in message
> news:%230mDmoWSEHA.1544@TK2MSFTNGP09.phx.gbl...[color=green]
> > Hi,
> > I have a question:
> > I made a windows service (using VS wizard). All it does is to connect to[/color]
> my[color=green]
> > 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[/color]
> .net[color=green]
> > 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[/color][/color]
the[color=blue][color=green]
> > timeout somehow?
> > Regards,
> > Ram.
> >
> >[/color]
>
>[/color]


Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
#4: Nov 16 '05

re: windows server timeout


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]
- mvp@spam.guard.caspershouse.com

"Ram Baruch" <ram_ba_ruch@newsgroups.nospam> wrote in message
news:u4gF2wWSEHA.1472@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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]" <mvp@spam.guard.caspershouse.com> wrote[/color]
in[color=blue]
> message news:O%23PKftWSEHA.3812@TK2MSFTNGP11.phx.gbl...[color=green]
> > Ram,
> >
> > I am not sure which timeout you are referring to? Do you mean the[/color]
> call,[color=green]
> > or the download timeout? You don't have to worry about the call timing[/color]
> out[color=green]
> > (unless it is a remoted call, possibly).
> >
> > As for a download timeout, I don't think that the WebClient will[/color][/color]
give[color=blue][color=green]
> > you the flexibility you need in setting the timeout. You might want to[/color]
> use[color=green]
> > the HttpWebRequest and HttpWebResponse classes, as they will allow you[/color][/color]
to[color=blue][color=green]
> > set timeouts for the download (or eliminate them, I think).
> >
> > Hope this helps.
> >
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - mvp@spam.guard.caspershouse.com
> >
> > "Ram Baruch" <ram_ba_ruch@newsgroups.nospam> wrote in message
> > news:%230mDmoWSEHA.1544@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > Hi,
> > > I have a question:
> > > I made a windows service (using VS wizard). All it does is to connect[/color][/color][/color]
to[color=blue][color=green]
> > my[color=darkred]
> > > site every X seconds and check if there is anything new to download.[/color][/color][/color]
If[color=blue][color=green][color=darkred]
> > > 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[/color][/color][/color]
take[color=blue][color=green][color=darkred]
> > > some time (lets say 10 minutes). Is there any chance that after a[/color][/color][/color]
while[color=blue][color=green]
> > .net[color=darkred]
> > > 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[/color][/color]
> the[color=green][color=darkred]
> > > timeout somehow?
> > > Regards,
> > > Ram.
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Ram Baruch
Guest
 
Posts: n/a
#5: Nov 16 '05

re: windows server timeout


Ok, thanks very much for the 'super-quick' help!!!!
Ram.


"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in
message news:eaGNA2WSEHA.2908@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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]
> - mvp@spam.guard.caspershouse.com
>
> "Ram Baruch" <ram_ba_ruch@newsgroups.nospam> wrote in message
> news:u4gF2wWSEHA.1472@TK2MSFTNGP09.phx.gbl...[color=green]
> > Hi,
> > What I meant is the time that WebClient.Download() takes- I don't care[/color][/color]
it[color=blue][color=green]
> > takes a lot of time, all I care is that I won't get any exceptions for[/color][/color]
it[color=blue][color=green]
> > when it does take a long period of time.
> > Regards,
> > Ram.
> >
> > "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote[/color]
> in[color=green]
> > message news:O%23PKftWSEHA.3812@TK2MSFTNGP11.phx.gbl...[color=darkred]
> > > Ram,
> > >
> > > I am not sure which timeout you are referring to? Do you mean the[/color]
> > call,[color=darkred]
> > > or the download timeout? You don't have to worry about the call[/color][/color][/color]
timing[color=blue][color=green]
> > out[color=darkred]
> > > (unless it is a remoted call, possibly).
> > >
> > > As for a download timeout, I don't think that the WebClient will[/color][/color]
> give[color=green][color=darkred]
> > > you the flexibility you need in setting the timeout. You might want[/color][/color][/color]
to[color=blue][color=green]
> > use[color=darkred]
> > > the HttpWebRequest and HttpWebResponse classes, as they will allow you[/color][/color]
> to[color=green][color=darkred]
> > > set timeouts for the download (or eliminate them, I think).
> > >
> > > Hope this helps.
> > >
> > >
> > > --
> > > - Nicholas Paldino [.NET/C# MVP]
> > > - mvp@spam.guard.caspershouse.com
> > >
> > > "Ram Baruch" <ram_ba_ruch@newsgroups.nospam> wrote in message
> > > news:%230mDmoWSEHA.1544@TK2MSFTNGP09.phx.gbl...
> > > > Hi,
> > > > I have a question:
> > > > I made a windows service (using VS wizard). All it does is to[/color][/color][/color]
connect[color=blue]
> to[color=green][color=darkred]
> > > my
> > > > site every X seconds and check if there is anything new to download.[/color][/color]
> If[color=green][color=darkred]
> > > > there is- it downloads a big file (using WebClient.Download() ). On[/color][/color][/color]
MY[color=blue][color=green][color=darkred]
> > > > computer it doesn't take a ling time, but on other computers it may[/color][/color]
> take[color=green][color=darkred]
> > > > some time (lets say 10 minutes). Is there any chance that after a[/color][/color]
> while[color=green][color=darkred]
> > > .net
> > > > will raise an exception that the server is not responding or a[/color][/color][/color]
similar[color=blue][color=green][color=darkred]
> > > > exception (I remember this from COM...) ?
> > > > If I will get an exception, is there anyway to avoid it by[/color][/color][/color]
increasing[color=blue][color=green]
> > the[color=darkred]
> > > > timeout somehow?
> > > > Regards,
> > > > Ram.
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Closed Thread