none
Your browser's cookie functionality is turned off. Please turn it on.

    Question

  • i am tring to get login to gmail by posting data...
                

                HttpWebRequest hi = (HttpWebRequest)HttpWebRequest.Create("https://www.google.com/accounts/ServiceLoginAuth?service=mail");
                
                Cookie myCookie = new Cookie(HttpRequestHeader.CacheControl.ToString(), "no-cache=set-cookie");
                CookieCollection a = new CookieCollection();
                a.Add(myCookie);
                hi.Method = "POST";
                    
                
                hi.CookieContainer = new CookieContainer();
     
                string PostData = "continue=https%3A%2F%2Fmail.google.com%2Fmail%2F%3Ftab%3Dwm&service=mail&rm=false&dsh=-28214021908461826&ltmpl=default&scc=1&GALX=6-CDla8snug&pstMsg=1&dnConn=&checkConnection=youtube%3A1271%3A1&checkedDomains=youtube&timeStmp=&secTok=&Email=youremail&Passwd=password&signIn=Sign+in&rmShown=1";
                
                hi.ContentType = "application/x-www-form-urlencoded";
                byte[] post = UnicodeEncoding.UTF8.GetBytes(PostData);
                Stream stream = await hi.GetRequestStreamAsync();
                stream.Write(post, 0, PostData.Length);
                

                WebResponse response = await hi.GetResponseAsync();
                response.GetResponseStream();
              
                string pageSource;   
                using (StreamReader sr = new StreamReader(response.GetResponseStream()))
                {
                    pageSource = sr.ReadToEnd();
                }
                b.NavigateToString(pageSource);
               
               
                
                b.NavigateToString(pageSource);
                t.Text = pageSource;
                
    when i run this i get an error "Your browser's cookie functionality is turned off. Please turn it on."

              
    Wednesday, September 19, 2012 7:53 AM

Answers

  • Hi iamheran4u,

      Welcome to MSDN Forum Support.

      I have reproduced your scenario via provided code blocks. You are more likely to get more efficient responses to WPF issues at http://social.msdn.microsoft.com/forums/en/wpf/threads/ where you can contact WPF experts. Although that is outside the scope, I have found out its solution,and it is not relevant to programming issues but applied issues. For more information, you can redirect to http://support.google.com/mail/bin/answer.py?hl=en&answer=9525.

      The first step is to close the setting on Content Advisor.

      • Open Internet Explorer, and click Tools along the top of your browser1 window.
      • Select Internet Options... and click the Content tab at the top of the dialogue box. If the Content Advisor is enabled, please disable it.
      • Click OK.

      The next step is to clear the cookies depending on the corresponding menu settings based on different IE version.

      

       Sincerely,

      Jason Wang


    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, September 20, 2012 3:43 AM
    Moderator

All replies

  • Hi iamheran4u,

      Welcome to MSDN Forum Support.

      I have reproduced your scenario via provided code blocks. You are more likely to get more efficient responses to WPF issues at http://social.msdn.microsoft.com/forums/en/wpf/threads/ where you can contact WPF experts. Although that is outside the scope, I have found out its solution,and it is not relevant to programming issues but applied issues. For more information, you can redirect to http://support.google.com/mail/bin/answer.py?hl=en&answer=9525.

      The first step is to close the setting on Content Advisor.

      • Open Internet Explorer, and click Tools along the top of your browser1 window.
      • Select Internet Options... and click the Content tab at the top of the dialogue box. If the Content Advisor is enabled, please disable it.
      • Click OK.

      The next step is to clear the cookies depending on the corresponding menu settings based on different IE version.

      

       Sincerely,

      Jason Wang


    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, September 20, 2012 3:43 AM
    Moderator
  • Please check this below article link, i got my problem resolved from here. hope it would work for you !
    http://www.techsupportall.com/solved-your-browser-cookies-functionality-turned-off-please-turn-on/
    Thursday, January 10, 2013 9:21 AM