I have to maintain the user login and logout time in database. For login its easy but for logout , if I use Application_End () in global.asax for logging. It gives me exception.
My Code in asax file:
Application_End()
{
HttpCurrent.Context.Session.Abandon();
LogUserLogoutTimeToDatabase();
}