M
Mike Markiewicz
I would like to use WebClient on a page that requires a login before it can
be viewed. I want to be able to log in with IE and run my application from
there.
Is there a way, using System.Net.WebClient or something else, to make my web
requests using IE's cookies? I've already tried manually adding what I
think is the right cookie data to the header like so:
WebClient wc = new WebClient();
WebHeaderCollection head = new WebHeaderCollection();
head.Add("Cookie", "CFID=1312433; CFTOKEN=48763040");
wc.Headers = head;
byte[] data = wc.DownloadData(/* URI removed */);
Maybe I'm doing something wrong here?
Thanks,
Mike
be viewed. I want to be able to log in with IE and run my application from
there.
Is there a way, using System.Net.WebClient or something else, to make my web
requests using IE's cookies? I've already tried manually adding what I
think is the right cookie data to the header like so:
WebClient wc = new WebClient();
WebHeaderCollection head = new WebHeaderCollection();
head.Add("Cookie", "CFID=1312433; CFTOKEN=48763040");
wc.Headers = head;
byte[] data = wc.DownloadData(/* URI removed */);
Maybe I'm doing something wrong here?
Thanks,
Mike