Hi
I have one application built in ASP.NET.
On login page I have taken user id and stored it in one Session Variable Session["user_id"].
I am using it throught the application as we want to know that which user has added that particular record.
We are storing added by field in every table of database.
Many users get logged in in the system at a particular time.
Sometimes the session gets expired automatically and we does not get the Session["user_id"].
It gives the following error and comes to the login page as we have redirected to login page when session expires.
System.NullReferenceException: Object reference not set to an instance of an object.
We have given Session TimeOut 120 minutes in web.config but session is getting expired frequently.
Can any one tell what can I do so that Session does not get expire before 120 minutes.
Help is greatly appreciated.
Thanks and Regards,
Rahul Rathi