c# - Asp.net MVC Oauth session expiring quickly -
i learning open authentication in asp.net mvc app. login via facebook, google working fine on deployment session expiring quickly. due application pool recycle. in local system working fine.
i faced same issue earlier form authentication, changing session state mode "state server" "in proc" worked it. how same open auth?
i have set high values session timeout
app.usecookieauthentication(new cookieauthenticationoptions { authenticationtype = defaultauthenticationtypes.applicationcookie, loginpath = new pathstring("/account/login"), provider = new cookieauthenticationprovider { onvalidateidentity = securitystampvalidator.onvalidateidentity<applicationusermanager, applicationuser>( validateinterval: timespan.fromminutes(30), regenerateidentity: (manager, user) => user.generateuseridentityasync(manager)) }, expiretimespan = new timespan(1, 2, 30), slidingexpiration = true });
in many cases, shared web servers not allow long session expiration times! have tried saving sessions in sql server?
Comments
Post a Comment