Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > WebClient.DownloadFile() plus cookie?

Reply
Thread Tools

WebClient.DownloadFile() plus cookie?

 
 
Chip
Guest
Posts: n/a
 
      09-14-2006
Hi,
How do I add a required cookie to my WebClient.DownloadFile() request?
Chip


 
Reply With Quote
 
 
 
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      09-14-2006
I've not done it with downloadfile, but I expect you would use the
cookiecontainer
http://msdn2.microsoft.com/en-us/lib...container.aspx

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com


"Chip" <> wrote in message
news:%...
> Hi,
> How do I add a required cookie to my WebClient.DownloadFile() request?
> Chip
>



 
Reply With Quote
 
 
 
 
Chip
Guest
Posts: n/a
 
      09-14-2006
OK, I guess that answers my question indirectly. I will need to use
HttpWebRequest instead of WebClient.
Thanks,
Chip

"John Timney (MVP)" <> wrote in message
news:...
> I've not done it with downloadfile, but I expect you would use the
> cookiecontainer
> http://msdn2.microsoft.com/en-us/lib...container.aspx
>
> --
> --
> Regards
>
> John Timney (MVP)
> VISIT MY WEBSITE:
> http://www.johntimney.com
>
>
> "Chip" <> wrote in message
> news:%...
>> Hi,
>> How do I add a required cookie to my WebClient.DownloadFile() request?
>> Chip
>>

>
>



 
Reply With Quote
 
Joerg Jooss
Guest
Posts: n/a
 
      09-16-2006
Thus wrote Chip,

> OK, I guess that answers my question indirectly. I will need to use
> HttpWebRequest instead of WebClient.


In .NET 2.0, you have more control over WebClient. You might want to consider
subclassing WebClient and overriding GetWebRequest(). This would allow you
to attach your CookieContainer each time WebClient creates a HttpWebRequest.

Cheers,
--
Joerg Jooss
news-


 
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
c plus plus code comparator furqan shaikh C++ 6 11-12-2008 06:14 AM
Invoking c function in a c plus plus function... Rahul C++ 9 03-25-2008 05:24 PM
Why would anyone newgroup a "alt.a-plus.certification" when there is already a "alt.certification.a-plus" group? Skip Hendrix A+ Certification 1 11-12-2003 05:58 AM
C plus plus vs C Sharp The LoxFather C Programming 23 08-14-2003 03:51 AM
C plus plus vs C Sharp The LoxFather C++ 23 08-14-2003 03:51 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57