Click here to Skip to main content
16,004,882 members
Home / Discussions / C#
   

C#

 
GeneralRe: Check Registry for Key Pin
Anthony Mushrow8-Oct-07 8:37
professionalAnthony Mushrow8-Oct-07 8:37 
GeneralRe: Check Registry for Key Pin
andyr20058-Oct-07 9:06
andyr20058-Oct-07 9:06 
GeneralRe: Check Registry for Key Pin
Scott Dorman8-Oct-07 9:13
professionalScott Dorman8-Oct-07 9:13 
GeneralRe: Check Registry for Key Pin
andyr20058-Oct-07 9:24
andyr20058-Oct-07 9:24 
GeneralRe: Check Registry for Key Pin
Scott Dorman8-Oct-07 9:47
professionalScott Dorman8-Oct-07 9:47 
GeneralRe: Check Registry for Key Pin
andyr20058-Oct-07 10:06
andyr20058-Oct-07 10:06 
GeneralRe: Check Registry for Key Pin
Scott Dorman8-Oct-07 10:13
professionalScott Dorman8-Oct-07 10:13 
QuestionHttpwebrequest 0 cookies from any site?? Pin
atj8858-Oct-07 7:32
atj8858-Oct-07 7:32 
I copied a piece of sample code dealing with cookies from MS site here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetHttpWebRequestClassCookieContainerTopic.asp

But this code doesn't work for some reason, no matter which URL I use, there is no cookies come back. Am I insane or what? Here is my code:

string L_URL = @"http://www.yahoo.com"; //@"http://www.amazon.com";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(L_URL);
request.CookieContainer = new CookieContainer();

HttpWebResponse response = (HttpWebResponse) request.GetResponse();
response.Cookies = request.CookieContainer.GetCookies(request.RequestUri);

//this line always return 0
MessageBox.Show(response.Cookies.Count.ToString());

This is such a straight forward piece of sample code from microsoft, anyone can tell me what is wrong with it?
AnswerRe: Httpwebrequest 0 cookies from any site?? Pin
Guffa8-Oct-07 7:47
Guffa8-Oct-07 7:47 
GeneralRe: Httpwebrequest 0 cookies from any site?? Pin
atj8858-Oct-07 8:18
atj8858-Oct-07 8:18 
GeneralRe: Httpwebrequest 0 cookies from any site?? Pin
Guffa8-Oct-07 9:50
Guffa8-Oct-07 9:50 
GeneralRe: Httpwebrequest 0 cookies from any site?? Pin
Pete O'Hanlon8-Oct-07 10:13
mvePete O'Hanlon8-Oct-07 10:13 
GeneralRe: Httpwebrequest 0 cookies from any site?? Pin
atj8858-Oct-07 10:18
atj8858-Oct-07 10:18 
AnswerRe: Httpwebrequest 0 cookies from any site?? Pin
Guffa8-Oct-07 13:17
Guffa8-Oct-07 13:17 
GeneralRe: Httpwebrequest 0 cookies from any site?? Pin
atj8858-Oct-07 15:17
atj8858-Oct-07 15:17 
AnswerRe: Httpwebrequest 0 cookies from any site?? Pin
Guffa8-Oct-07 21:27
Guffa8-Oct-07 21:27 
GeneralRe: Httpwebrequest 0 cookies from any site?? Pin
Pete O'Hanlon8-Oct-07 21:56
mvePete O'Hanlon8-Oct-07 21:56 
QuestionCustom Wizard in C# Pin
kaminem8-Oct-07 7:20
kaminem8-Oct-07 7:20 
AnswerRe: Custom Wizard in C# Pin
TJoe10-Oct-07 9:00
TJoe10-Oct-07 9:00 
Questionproblem in CD insetrtion and CD removel in windows vista Pin
sumd8-Oct-07 7:06
sumd8-Oct-07 7:06 
Questionrich text box problem Pin
EvilProject8-Oct-07 5:50
EvilProject8-Oct-07 5:50 
QuestionCannot send all mails by SmtpClient.Send method until process is killed Pin
debnarayan8-Oct-07 5:19
debnarayan8-Oct-07 5:19 
AnswerRe: Cannot send all mails by SmtpClient.Send method until process is killed Pin
Andrei Ungureanu8-Oct-07 5:24
Andrei Ungureanu8-Oct-07 5:24 
GeneralRe: Cannot send all mails by SmtpClient.Send method until process is killed Pin
debnarayan8-Oct-07 5:33
debnarayan8-Oct-07 5:33 
AnswerRe: Cannot send all mails by SmtpClient.Send method until process is killed Pin
PIEBALDconsult8-Oct-07 5:42
mvePIEBALDconsult8-Oct-07 5:42 

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.