title: C# SDK version 6.0.20 - (OAuthException - #190) Error validating access token
body: <p>I am using Facebook C# SDK version 6.0.20 to authenticate the user.</p>
  
  <p>It worked fine for me and I was able to get the user's first and last names. But when I tried at a later time, I am getting the access token, but <code>fbClient.Get(“me”)</code> is failing with the following error:</p>
  
  <blockquote>
    <p>(OAuthException – #190) Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons.</p>
  </blockquote>
  
  <p>Please help.</p>
  
  <p>I run the following code when user is redirected back from the <strong>auth dialog</strong>:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (Request.Params["code"] != null)
      {
        Facebook.FacebookClient fbClient = new Facebook.FacebookClient(GetAccessToken());
  
          dynamic me = fbClient.Get("me");
  
          string firstName = me.first_name;
          string lastName = me.last_name;
          string email = me.email;
          string userID = me.id;
          string gender = me.gender;
          string dob = me.birthday;
          string locale = me.locale;
          string mStatus = me.relationship_status;            
      }
  
  }
  
  private string GetAccessToken()
  {
      if (HttpRuntime.Cache["access_token"] == null)
      {
          Dictionary&lt;string, string&gt; args = GetOauthTokens(Request.Params["code"]);
          HttpRuntime.Cache.Insert("access_token", args["access_token"], null, DateTime.Now.AddMinutes(Convert.ToDouble(args["expires"])), TimeSpan.Zero);
      }
  
      return HttpRuntime.Cache["access_token"].ToString();
  }
  
  private Dictionary&lt;string, string&gt; GetOauthTokens(string code)
  {
      Dictionary&lt;string, string&gt; tokens = new Dictionary&lt;string, string&gt;();
  
      string clientId = "xxxxxxxxxxxxxxxxxx";
      string redirectUrl = "http://localhost:51215/TestFBWebSite/FacebookRedirect.aspx";
      string clientSecret = "xxxxxxxxxxxxxxxxxxxxxx";
  
      string url = string.Format("https://graph.facebook.com/oauth/access_token?  client_id={0}&amp;redirect_uri={1}&amp;client_secret={2}&amp;code={3}",
                      clientId, redirectUrl, clientSecret, code);
  
      HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
      using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
      {
          StreamReader reader = new StreamReader(response.GetResponseStream());
          string retVal = reader.ReadToEnd();
  
          foreach (string token in retVal.Split('&amp;'))
          {
              tokens.Add(token.Substring(0, token.IndexOf("=")),
                  token.Substring(token.IndexOf("=") + 1, token.Length - token.IndexOf("=") - 1));
          }
      }
  
      return tokens;
  }
  </code></pre>