Re: WebRequest question
From: J M (JM_at_jm.biz)
Date: 10/24/04
- Next message: Jack Hanebach: "Re: VS.NET 2005 Beta"
- Previous message: Scott Allen: "Re: Exporting Data to Excel and Word"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: WebRequest question"
- Next in thread: Scott Allen: "Re: WebRequest question"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 24 Oct 2004 22:31:14 GMT
No, there is no reason however I am sending http web request to multiple
(hardware embeded) web servers with limited features. Some servers do not
close the connection after first web-request and web response complets (with
webresponse.close() command) and I have to keep retrying until (default time
out 90 seconds for connection) expires for second web request to be started.
The same back to back web requests works fine on some http servers (hardware
embeded). So I am trying common sloution acceptable for both behaviours.
The time out of 90 seconds is kind of not accepatble in my environment since
my code is making several request to several http servers 24x7. Fortunetly
the code works fine except this nagging issue.
I am closing the web response with webresponse.close() for both web
requests however seeing different behaviours in some remote http severs
(hardware embeded).
Any suggestions? TIA!
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in
message news:%23wreZvDuEHA.2788@TK2MSFTNGP09.phx.gbl...
>J M,
>
> Is there any particular reason why you want to keep the connection
> open? The only way that this will work is if the server is supporting HTTP
> 1.1. If it is not, then storing the connection is pointless. Also, you
> won't be saving any state information based on the connection (at least
> you shouldn't be).
>
> If you want to keep the connection open, then set the KeepAlive
> property to true. However, if not connecting to a 1.1 server, this would
> be pointless, and the header will not be sent.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
> "J M" <JM@jm.biz> wrote in message
> news:rC7ed.9276$Al3.3272@newssvr30.news.prodigy.com...
>> How do I make one WebRequest with following:
>>
>> WebRequest
>> Send data
>> Receive response
>> process
>> Send data II
>> Receive response II
>> close connection
>>
>> If response is in timeout keep trying 5 times and quit.
>>
>> TIA!
>>
>
>
- Next message: Jack Hanebach: "Re: VS.NET 2005 Beta"
- Previous message: Scott Allen: "Re: Exporting Data to Excel and Word"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: WebRequest question"
- Next in thread: Scott Allen: "Re: WebRequest question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|