Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Cookies: Are they handled by HttpWebRequest and HttpWebResponse classes?

Reply
Thread Tools

Cookies: Are they handled by HttpWebRequest and HttpWebResponse classes?

 
 
Ulrich Sprick
Guest
Posts: n/a
 
      10-07-2004
Hi all,

I am beginnig to try out the exciting Web stuff in .NET, so please forgive
my perhaps silly question.
I am trying to communicate with a Web server using HttpWebRequest
and -Response classes from a WinForms application. The server may set and
read back cookies.

Do I have to support the server in a special way (like a browser), and if
so, where do I have to look for some documentation? Or are cookies handled
transparently?

Thanks in advance,
ulrich


 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      10-07-2004
You'll need to create an instance of the CookieContainer class and
attach the container to the Cookie property before sending each
request. The CookieContainer will manage the cookies for you then.

--
Scott
http://www.OdeToCode.com/

On Thu, 7 Oct 2004 21:52:43 +0200, "Ulrich Sprick"
<(E-Mail Removed)> wrote:

>Hi all,
>
>I am beginnig to try out the exciting Web stuff in .NET, so please forgive
>my perhaps silly question.
>I am trying to communicate with a Web server using HttpWebRequest
>and -Response classes from a WinForms application. The server may set and
>read back cookies.
>
>Do I have to support the server in a special way (like a browser), and if
>so, where do I have to look for some documentation? Or are cookies handled
>transparently?
>
>Thanks in advance,
>ulrich
>


 
Reply With Quote
 
 
 
 
Ulrich Sprick
Guest
Posts: n/a
 
      10-07-2004
Umm.... I must have had my dark sunglasses on while browsing though MSDN
last night, I simply overlooked the CookieContainer property. Sorry for
that. I am looking in the right direction, am I?

Ulrich


 
Reply With Quote
 
Ulrich Sprick
Guest
Posts: n/a
 
      10-07-2004
YES! I'm on the way! Thanks for the response!
ulrich

"Scott Allen" <bitmask@[nospam].fred.net> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> You'll need to create an instance of the CookieContainer class and
> attach the container to the Cookie property before sending each
> request. The CookieContainer will manage the cookies for you then.
>
> --
> Scott
> http://www.OdeToCode.com/



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send a client certificate by using the HttpWebRequest and HttpWebResponse classes in Microsoft Visual C# .NET Jesus Suarez ASP .Net 0 08-20-2007 08:29 AM
HttpWebRequest and HttpWebResponse Ashish, FL ASP .Net Web Services 2 11-02-2004 04:34 PM
HttpWebResponse/HttpWebRequest problem... Satinderpal Singh ASP .Net 2 06-04-2004 04:40 AM
problem with HttpWebRequest/HttpWebResponse... Satinderpal Singh ASP .Net 1 06-02-2004 03:18 PM
they turn, they power, they make nice pics Keith and Jenn Z. Digital Photography 0 09-21-2003 04:16 AM



Advertisments