Results 1 to 4 of 4

Thread: WebClient .net 2.0

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    WebClient .net 2.0

    When I use WebClient to download a file, it bypasses the cookies. I need to download files from a site that I am logged in to. When I download the file, it says that I'm not logged in, even though I am. So, I assume that its bypassing the cookies.

    How can I force WebClient to use the cookies?

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142

    Re: WebClient .net 2.0

    use HttpWebRequest / HttpWebResponse
    you can add cookies, use all the methods such as GET POST etc...
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    Re: WebClient .net 2.0

    Would you have an example? I'm looking in MSDN but cant find any examples.

  4. #4
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142

    Re: WebClient .net 2.0

    take a look @ this article on the codeproject, it describes how to use HttpWebRequest to authenticate with msn messenger / shows you how to set parameters like adding cookies to the Header.
    Link to Article
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width