Changing the default value of session's variable timeout in asp.net mvc

前端 未结 5 1016
半阙折子戏
半阙折子戏 2020-12-30 03:31

I have an Asp.net Mvc application with razor views engine , in which i used a variable Session[\'user\'] : when an user log on the application Session[\'u

5条回答
  •  时光取名叫无心
    2020-12-30 04:00

    I had a similar problem earlier and it was not about the Session Timeout value. Hence, Sometimes its now about the Timeout period. This Session Timeout may be set to 20 mins or more but if the hosting server or your computer is VERY LOW on MEMORY. The Session values are then cleared and the user will have to sometimes login again.

    This low memory is sometimes caused by STORING IMAGES or BINARY VALUES in the Database instead of storing as Files on the Server and access them using System.IO.File procedure. So when you attempt to fetch some records, their IMAGES DATA on the TABLE will also be fetched, resulting in a SIGNIFICANT reduction in performance and also OVER-CONSUMPTION of available MEMORY.

    IT MAY BE THAT YOUR COMPUTER OR HOSTING IS VERY LOW ON MEMORY (Not Storage Space)

    Hope this helps.

提交回复
热议问题