Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET ASP.NET4.0
im unable to login to codeproject when i try to login using webrequest it redirects me login page again. please hava look on this site :

WebRequest request = WebRequest.Create("");
            request.Method = "POST";
            string postData = "email='[DELETED]',password='[DELETED]'";
            byte[] byteArray = Encoding.UTF8.GetBytes(postData);
            request.ContentType = "application/x-www-form-urlencoded";
            request.ContentLength = byteArray.Length;
            Stream dataStream = request.GetRequestStream();
            dataStream.Write(byteArray, 0, byteArray.Length);
            WebResponse response = request.GetResponse();
            dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();

[edit]Email and password removed - OriginalGriff[/edit]
Posted 23-Feb-13 4:17am
Edited 23-Feb-13 4:21am
OriginalGriff at 23-Feb-13 10:22am
Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
And to post your login email and your password in a forum is just stupid! Go to "My Settings" right now, and change it, before it gets used and changed for you!
shanalikhan at 23-Feb-13 12:55pm
oh sorry i forgot to change it , thanks
Jibesh at 24-Feb-13 15:39pm
what are you trying to do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 645
1 OriginalGriff 560
2 CPallini 294
3 Peter Leow 185
4 RyanDev 146
0 OriginalGriff 6,034
1 Sergey Alexandrovich Kryukov 4,838
2 Peter Leow 3,129
3 Maciej Los 3,079
4 DamithSL 2,465

Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100