Session Expire and Forms Authentication

A

Asim Qazi

Hi All
i m using Forms authentication, its works very fine except on problem,
i-e if i m logged in my application and i reset the IIS it should kill the
session and throw me to the login sceen as the session and expired. but it
gives me unhandled exception.


Server Error in '/HostingController' Application.
----------------------------------------------------------------------------
----

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an
object.]
HostingController.UserManager.UserManager.Page_Load(Object sender,
EventArgs e) +143
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750




----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032



PLease Help.


aSIM
 
G

Guest

Hi All
i m using Forms authentication, its works very fine except on
problem,
i-e if i m logged in my application and i reset the IIS it should kill
the session and throw me to the login sceen as the session and
expired. but it gives me unhandled exception.

Forms login does not use sessions to store the authentication cookies.

So depending on your setup, forms auth can outlast your session variables.

Couple things you can do... check for the existence of session variables
before you access them... Or in the global.asax, handle the new session
event and process accordingly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top