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