Object reference not set to an instance of an object
This error happens when you try to use a property or call a method of an object that is null. More details:
here[
^]
A simple use of Visual studio DEBUGGER can tell you the object because of which it is happening. Just look at the stack trace and put a debugger on that line (Here line19). Check the objects of that line and see if any one is null and you are trying to use that objects property. Handle the same.
It looks like your session is getting timedout and hence when you try to use it, it throws an exception. 2 things:
1. You should always check for null with sessions before using as a good practice
2. if it is taking really such a long time (session timeout default time 20 min) then you need to increase the timeout in your web.config file, like:
Write under system.web section in web.config (for say 60 minutes):
<sessionState timeout="60" mode="InProc" />
Refer:
MSDN: sessionState Element (ASP.NET Settings Schema)[
^]