none
unable to login to code project using webrequest RRS feed

  • Question

  • 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();


    Thank You , Shan Ali Khan

    Saturday, February 23, 2013 6:26 PM

Answers

All replies

  • anyone please reply. i am waiting

    Thank You , Shan Ali Khan

    Sunday, February 24, 2013 11:30 AM
  • Hi Shan,

    I would like to redirect you to appropriate forum for better responses. 


    Bob Shen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 25, 2013 7:23 AM
  • Hi,

    You can refer the code in this post, using WebBrowser control or using HttpWebRequest.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 25, 2013 9:59 AM
    Moderator
  • Hi,

    You can refer the code in this post, using WebBrowser control or using HttpWebRequest.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thank you , now im able to login , i want to post question to code project , can you please help me also how i can post question , i have made another thread here :

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d4205c3e-e284-4c56-a696-f1b30105bc99


    Thank You , Shan Ali Khan

    Monday, February 25, 2013 10:06 AM
  • Hi,

    To help other community members who have similar questions, I will change the thread type to Question. If my reply helped you resolving the issue in this thread, please mark the reply as an answer.

    >>i have made another thread here :http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d4205c3e-e284-4c56-a696-f1b30105bc99

    You may check the replies in that thread and give feedback if the issue resolved or not.

    Thanks.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 26, 2013 5:11 AM
    Moderator