Users log out very quickly

前端 未结 1 608
我寻月下人不归
我寻月下人不归 2020-12-01 17:17

I am using ASP.NET identity membership. This is the Startup.Auth.cs code:

 app.CreatePerOwinContext(EFDbContext.Create);
        app.CreatePerOwinContext<         


        
1条回答
  •  青春惊慌失措
    2020-12-01 17:56

    The reason for users logging off is because of error in validation of forms-authentication data and view-state data. It could happen for different reasons including using web farm in hosting services.You should check in your project webconfig. Check here for details about that. If you don't havein your webconfig, try adding this piece of code after in your webconfig:

        
    

    The other option is using generated ASP.NET Machine Key inside webconfig. There are some online tools which my recommended ones are this and this.

    0 讨论(0)
提交回复
热议问题