HttpWebRequest with session cookies

Discussion in 'ASP .Net' started by =?Utf-8?B?am9obiBjb253ZWxs?=, Feb 9, 2006.

  1. I'm trying to programatically mine newsgroups like yahoo (among others), but
    need to be able to sign into the site first. my assumption is that when i
    sign in, a session cookie is created and is used to verify my identity for
    each http request after that.

    Does anyone have an example of using the HttpWebRequest with a URL that
    requires a logon web page first, before accessing the content pages?

    Thanks
     
    =?Utf-8?B?am9obiBjb253ZWxs?=, Feb 9, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?am9obiBjb253ZWxs?=

    Scott Allen Guest

    On Wed, 8 Feb 2006 16:18:27 -0800, john conwell
    <> wrote:

    >
    >Does anyone have an example of using the HttpWebRequest with a URL that
    >requires a logon web page first, before accessing the content pages?
    >


    You'll need a CookieContainer object around, and attach the
    CookieContainer object to your HttpWebRequest objects to send and save
    cookies.

    This might help, too:
    http://odetocode.com/Articles/162.aspx

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/
     
    Scott Allen, Feb 9, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ulrich Sprick
    Replies:
    3
    Views:
    506
    Ulrich Sprick
    Oct 7, 2004
  2. Luis Esteban Valencia Muñoz

    Using HttpWebRequest to post form data with cookies

    Luis Esteban Valencia Muñoz, Jun 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,075
    Buddy Ackerman
    Jun 13, 2005
  3. Andy Fish
    Replies:
    3
    Views:
    1,209
    Andy Fish
    Aug 23, 2005
  4. Andy Fish
    Replies:
    3
    Views:
    6,539
    Fredrik Lindner
    Nov 6, 2003
  5. _Who
    Replies:
    7
    Views:
    2,686
Loading...

Share This Page