WebBrowser.Navigate overload doesn't add cookies

Posted by kaharas on Stack Overflow See other posts from Stack Overflow or by kaharas
Published on 2010-12-26T18:20:07Z Indexed on 2010/12/26 18:54 UTC
Read the original article Hit count: 157

Filed under:
|
|

Hi guys, I'm experimenting with C#, and right now I'm trying to get a web page that needs cookies. Since I had no success doing it, I wrote this little PHP script ( directly from php.net):

<?php   
    foreach (getallheaders() as $name => $value) {
        echo "$name: $value\n";
    }
?>

but, when i run:

this.WBro.Navigate("http://localhost/cookie.php", null,null,"Cookie: foo=bar");

the foo cookie isn't there, and all I got is a page displaying the "usual" headers ( except the cookie one). Does somebody has any idea of why this happens?

Thanks a lot!

© Stack Overflow or respective owner

Related posts about c#

Related posts about cookies