In ASP.NET you can set the session timeout in several places:
web.config:
<authentication mode="Forms">
<forms loginUrl="Login" defaultUrl="Index" timeout="480"/>
</authentication>
<sessionState timeout="480" />
And in IIS.
When is which session timeout used?
<sessionState timeout="480" />NullReferenceExceptionwhen accessing Session[“object”].