Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: An exception thrown that I can't figure out how to fix Pin
Darrall30-Jan-10 7:12
Darrall30-Jan-10 7:12 
AnswerRe: An exception thrown that I can't figure out how to fix Pin
Dan Mos28-Jan-10 14:31
Dan Mos28-Jan-10 14:31 
QuestionIterating through MatchCollection Pin
uglyeyes28-Jan-10 12:54
uglyeyes28-Jan-10 12:54 
AnswerRe: Iterating through MatchCollection Pin
Luc Pattyn28-Jan-10 15:12
sitebuilderLuc Pattyn28-Jan-10 15:12 
QuestionHow to get cookies from CookieContainer? Pin
hello_amigo28-Jan-10 10:54
hello_amigo28-Jan-10 10:54 
AnswerRe: How to get cookies from CookieContainer? Pin
Luc Pattyn28-Jan-10 12:02
sitebuilderLuc Pattyn28-Jan-10 12:02 
AnswerRe: How to get cookies from CookieContainer? Pin
Mycroft Holmes28-Jan-10 12:03
professionalMycroft Holmes28-Jan-10 12:03 
GeneralRe: How to get cookies from CookieContainer? Pin
hello_amigo28-Jan-10 13:32
hello_amigo28-Jan-10 13:32 
Ok, just simple exsample:

CookieContainer cc = new CookieContainer();  

HttpWebRequest r1 = (HttpWebRequest)WebRequest.Create("URI1");
            r1.AllowAutoRedirect = false;
            r1.CookieContainer = cc;
            HttpWebResponse h1 = (HttpWebResponse)r1.GetResponse();
            foreach (Cookie c in h1.Cookies)
                cc.Add(c);

HttpWebRequest r2 = (HttpWebRequest)WebRequest.Create("URI2");
            r2.AllowAutoRedirect = false;
            r2.CookieContainer = cc;
            HttpWebResponse h2 = (HttpWebResponse)r2.GetResponse();
            foreach (Cookie c in h2.Cookies)
                cc.Add(c);

After this we have some cookies, which we got in the fist and secont responses. And cc contained this cookies.
Unfortunally, information on MSDN Link don`t explain how to get cookies from CookieContainer, just how to get cookies from concrete response.
AnswerRe: How to get cookies from CookieContainer? Pin
Not Active28-Jan-10 13:37
mentorNot Active28-Jan-10 13:37 
AnswerRe: How to get cookies from CookieContainer? Pin
hello_amigo29-Jan-10 5:43
hello_amigo29-Jan-10 5:43 
GeneralRe: How to get cookies from CookieContainer? Pin
Lasha874-Mar-10 1:37
Lasha874-Mar-10 1:37 
QuestionUsing TaskScheduler 2.0 Pin
Bob Nona28-Jan-10 9:23
Bob Nona28-Jan-10 9:23 
AnswerRe: Using TaskScheduler 2.0 Pin
OriginalGriff28-Jan-10 10:24
mveOriginalGriff28-Jan-10 10:24 
GeneralConverting a project to target x64 platform Pin
SimulationofSai28-Jan-10 8:33
SimulationofSai28-Jan-10 8:33 
GeneralRe: Converting a project to target x64 platform [modified] Pin
harold aptroot28-Jan-10 9:07
harold aptroot28-Jan-10 9:07 
QuestionHow to work on Devices using C#? Pin
CoderForEver28-Jan-10 7:35
CoderForEver28-Jan-10 7:35 
AnswerRe: How to work on Devices using C#? Pin
Luc Pattyn28-Jan-10 7:37
sitebuilderLuc Pattyn28-Jan-10 7:37 
GeneralRe: How to work on Devices using C#? Pin
CoderForEver28-Jan-10 7:51
CoderForEver28-Jan-10 7:51 
GeneralRe: How to work on Devices using C#? Pin
Luc Pattyn28-Jan-10 8:05
sitebuilderLuc Pattyn28-Jan-10 8:05 
GeneralRe: How to work on Devices using C#? Pin
OriginalGriff28-Jan-10 8:17
mveOriginalGriff28-Jan-10 8:17 
GeneralRe: How to work on Devices using C#? Pin
Luc Pattyn28-Jan-10 8:34
sitebuilderLuc Pattyn28-Jan-10 8:34 
GeneralRe: How to work on Devices using C#? Pin
DaveyM6928-Jan-10 10:43
professionalDaveyM6928-Jan-10 10:43 
GeneralRe: How to work on Devices using C#? Pin
CoderForEver29-Jan-10 8:17
CoderForEver29-Jan-10 8:17 
GeneralRe: How to work on Devices using C#? Pin
DaveyM6929-Jan-10 13:16
professionalDaveyM6929-Jan-10 13:16 
QuestionWorking on ListViewItem Pin
CoderForEver28-Jan-10 7:26
CoderForEver28-Jan-10 7:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.