How to Count Online Visitors in ASP.NET 2.0 ?
-
Hi I want to count my website online visitors . then I used these codes and set the
< sessionState >
element mode to "InProc" in web.config. but when a user exits from site the counter dosent decrease !!!! in fact the event Session_End doesnt raise!!!! plz help me!void Application_Start(object sender, EventArgs e) { Application["accesses"] = 0; Application["users"] = 0; } void Application_BeginRequest(Object sender, EventArgs e) { Application.Lock(); Application["accesses"] = (int)Application["accesses"] + 1; Application.UnLock(); } void Session_Start(object sender, EventArgs e) { Application.Lock(); Application["users"] = (int)Application["users"] + 1; Application.UnLock(); } void Session_End(object sender, EventArgs e) { Application.Lock(); Application["UsersOnline"] = (int)Application["UsersOnline"] - 1; Application.UnLock(); }
-
Hi I want to count my website online visitors . then I used these codes and set the
< sessionState >
element mode to "InProc" in web.config. but when a user exits from site the counter dosent decrease !!!! in fact the event Session_End doesnt raise!!!! plz help me!void Application_Start(object sender, EventArgs e) { Application["accesses"] = 0; Application["users"] = 0; } void Application_BeginRequest(Object sender, EventArgs e) { Application.Lock(); Application["accesses"] = (int)Application["accesses"] + 1; Application.UnLock(); } void Session_Start(object sender, EventArgs e) { Application.Lock(); Application["users"] = (int)Application["users"] + 1; Application.UnLock(); } void Session_End(object sender, EventArgs e) { Application.Lock(); Application["UsersOnline"] = (int)Application["UsersOnline"] - 1; Application.UnLock(); }
Here is an article about detecting session timeouts. I hope it helps. http://aspalliance.com/520
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06