c# - asp.net mvc 5 sometimes forms authentication redirects to account/login instead of account/logon -


i using asp.net mvc 5.1.1 , facing weird issue. whenever deploy web app test server( having iis 8.5) current sessions become expired(which obvious) , redirects account/login instead of account/logon. normal log off or fresh page hit correctly takes user account/logon(and have set in configuration). after session expiration, shows weird behavior. checked , there no reference webmatrix.dll. this issue has not helped. please advice whats wrong. thanks

edit 1:

<authentication mode="forms">     <forms loginurl="~/account/logon" timeout="2880" />  </authentication> 

i had same issue, should check startupauth.cs

this answer helped me lot: http://coding.abel.nu/2014/11/using-owin-external-login-without-asp-net-identity/

also add of entry helped: https://stackoverflow.com/a/6081661/79379

for future reference include relevant code here:

<add key="loginurl" value="~/account/logon" />  public partial class startup {   private void configureauth(iappbuilder app)   {     var cookieoptions = new cookieauthenticationoptions       {         loginpath = new pathstring("/account/login")       };      app.usecookieauthentication(cookieoptions);   } } 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -