get site source code as register user(c#)

Posted by nir143 on Stack Overflow See other posts from Stack Overflow or by nir143
Published on 2010-04-15T00:09:17Z Indexed on 2010/04/15 0:13 UTC
Read the original article Hit count: 603

Filed under:
|
|

hi. i downloaded a sourcecode of a site,but i downloaded it i saw it identify my program as a guest,i search at google and figure out that i can send a cookie when i "ask" the source code. that what i have managed to do and it still dont identify me as register user:

CookieContainer cj = new;

CookieContainer();

        string all = "";
        HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Url);
        req.CookieContainer = cj;
        HttpWebResponse res = (HttpWebResponse)req.GetResponse();
        CookieCollection cs=cj.GetCookies(req.RequestUri);
        CookieContainer cc = new CookieContainer();
        cc.Add(cs);
        req.CookieContainer = cc;
        StreamReader read = new StreamReader(res.GetResponseStream());
        all = read.ReadToEnd();
        read.Close();             
        return all;

what is wrong here? tyvm for help:)

© Stack Overflow or respective owner

Related posts about c#

Related posts about source