Änderungen

This commit is contained in:
ja
2021-10-25 16:54:35 +02:00
parent 2ad86333c5
commit f0660e2b31

View File

@@ -18,10 +18,7 @@
void Application_End(object sender, EventArgs e) void Application_End(object sender, EventArgs e)
{ {
// Code, der beim Herunterfahren der Anwendung ausgeführt wird
Session.Remove("TokenforEmail");
Session.Remove("SessID");
Session.Remove("urltochangepw");
} }
void Application_Error(object sender, EventArgs e) void Application_Error(object sender, EventArgs e)
@@ -35,7 +32,7 @@
// Code, der ausgeführt wird, wenn eine neue Sitzung gestartet wird // Code, der ausgeführt wird, wenn eine neue Sitzung gestartet wird
FormsAuthenticationTicket formsAuthenticationTicket = new FormsAuthenticationTicket(2,"ticket",DateTime.Now,DateTime.Now.AddMinutes(-30),true,"Par1="+Session.SessionID.ToString()); FormsAuthenticationTicket formsAuthenticationTicket = new FormsAuthenticationTicket(2,"ticket",DateTime.Now,DateTime.Now.AddMinutes(-30),true,"Par1="+Session.SessionID.ToString());
FormsAuthentication.Encrypt(formsAuthenticationTicket); FormsAuthentication.Encrypt(formsAuthenticationTicket);
FormsAuthentication.RenewTicketIfOld(formsAuthenticationTicket);
} }
void Session_End(object sender, EventArgs e) void Session_End(object sender, EventArgs e)
@@ -44,6 +41,9 @@
// Hinweis: Das Ereignis "Session_End" wird nur ausgelöst, wenn der Modus "sessionstate" // Hinweis: Das Ereignis "Session_End" wird nur ausgelöst, wenn der Modus "sessionstate"
// in der Datei "Web.config" auf "InProc" festgelegt ist. Wenn der Sitzungsmodus auf "StateServer" // in der Datei "Web.config" auf "InProc" festgelegt ist. Wenn der Sitzungsmodus auf "StateServer"
// oder "SQLServer" festgelegt ist, wird das Ereignis nicht ausgelöst. // oder "SQLServer" festgelegt ist, wird das Ereignis nicht ausgelöst.
FormsAuthentication.SignOut();
Session.Remove("TokenforEmail"); Session.Remove("TokenforEmail");
Session.Remove("SessID"); Session.Remove("SessID");
Session.Remove("urltochangepw"); Session.Remove("urltochangepw");