Click here to Skip to main content
15,032,967 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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("https://www.codeproject.com/script/Membership/LogOn.aspx");

            request.Method = "POST";

            string postData = "email='[DELETED]@gmail.com',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);

            dataStream.Close();

            WebResponse response = request.GetResponse();

            Response.Write(((HttpWebResponse)response).StatusDescription);

            dataStream = response.GetResponseStream();

            StreamReader reader = new StreamReader(dataStream);

            string responseFromServer = reader.ReadToEnd();


            Response.Write(responseFromServer);

            reader.Close();
            dataStream.Close();
            response.Close();


[edit]Email and password removed - OriginalGriff[/edit]
Posted
Updated 23-Feb-13 4:21am
v2
Comments
OriginalGriff 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!
[no name] 23-Feb-13 12:55pm
   
oh sorry i forgot to change it , thanks
Jibesh 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)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900