... wenn ich mir das "HttpContext.Current." spare dann funktioniert es
auch....
lg,
oskar
From: "Oskar O" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: [Asp.net] Session Ende
Date: Sun, 10 Jul 2005 15:04:45 +0200
hallo leute!
was stimmt an diesem code nicht?
global.asax:
void Application_OnStart(object source, EventArgs e)
{
HttpContext.Current.Application.Add("User", "0");
}
void Session_OnStart(object source, EventArgs e)
{
HttpContext.Current.Session.Add("Init", DateTime.Now.ToString());
HttpContext.Current.Application.Lock();
HttpContext.Current.Application["User"] =
(Convert.ToInt32(HttpContext.Current.Application["User"]) + 1).ToString();
HttpContext.Current.Application.UnLock();
}
void Session_OnEnd(object source, EventArgs e)
{
HttpContext.Current.Application.Lock();
HttpContext.Current.Application["User"] =
(Convert.ToInt32(HttpContext.Current.Application["User"]) - 1).ToString();
HttpContext.Current.Application.UnLock();
}
web.config:
<sessionState mode="InProc" cookieless="false" timeout="20" />
es wird zwar brav hinauf gezählt, jedoch nach dem ablauf des timeouts nicht
mehr hinunter...
habs auch mit der schreibweise "Session_End(object source, EventArgs e)"
versucht
danke + lg,
oskar
_________________________________________________________________
Highlight Viewer - heben Sie von Ihnen gesuchte Wörter auf Webseiten
hervor. http://toolbar.msn.at?DI=43&XAPID=2170
_______________________________________________
Asp.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net
_________________________________________________________________
Die besten Ergebnisse mit der großartigen Suchmaschine von MSN!
http://search.msn.at/
_______________________________________________
Asp.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net