Dealing with cookies with WebRequest and WebResponse

Last post 01-29-2008 5:08 PM by gunteman. 1 replies.

Sort Posts:

  • Dealing with cookies with WebRequest and WebResponse

    01-29-2008, 4:51 PM
    • Loading...
    • acsimsek
    • Joined on 01-29-2008, 9:40 PM
    • Posts 3

    Hi there,

    I need to make http request to a webpage and another webpage because i cant get the needed data from the second page

    because it needs my session information which is stored on my computer in a cookie when i entered the first page

    authomatically.



    you know this basic session thing with browsers.



    But what i want to know and actually want to do is http requesting the first page with the c# code, get the session info from

    first page and then http requesting the second page pretending i am a browser and i have the cookie which has session info

    in it but i am actually not a browser but a c# code.




    please help i'll appreciate any advise

  • Re: Dealing with cookies with WebRequest and WebResponse

    01-29-2008, 5:08 PM
    Answer
    • Loading...
    • gunteman
    • Joined on 07-11-2007, 8:57 AM
    • Norrköping, Sweden
    • Posts 2,327

    Assign a CookieContainer instance to the first request, and then set the same instance to the second request, 

    -- "Mark As Answer" if my reply helped you --
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter