Several Time Authorization with MvcAuthorizer

Apr 1, 2015 at 2:25 AM
I would like to several times Authorization with MvcAuthorizer on my mvc application (actually I would like to gather Tokens some Twitter Accounts). First time I can do Authorization and get Tokens of user without problem. When I try to second time Authorization I get
<?xml version="1.0" encoding="UTF-8"?><errors><error code="32">Could not authenticate you.</error></errors> - Please visit the LINQ to Twitter FAQ (at the HelpLink) for help on resolving this error.
When I restart my application I can Authorization without problem. I have removed OAuthConsumerKey,OAuthConsumerSecret,,OAuthToken,ScreenNameToken,UserIdToken variables from Session but I could not solve problem.

Thank you!
Apr 2, 2015 at 12:39 AM

There are a couple things you can do that help with ASP.NET credentials:
  1. Set sessionState in Web.config to state server or SQL server to avoid loosing your credentials when IIS recycles your app.
  2. Save credentials after CompleteAuthorizeAsync. Then, check your authorizer for credentials and re-add them from your stored credentials if they aren't already present.