how to track number of visitor in a website for past 1 hour?

Posted by Prabu_Spark under ASP.NET on 11/18/2014 | Points: 10 | Views : 997 | Status : [Member] | Replies : 1
Hi sir,

I need to track the number of visitor hit my website for the past 1 hour. How can i implement this?

[For example: I need to track my website for the past 1 hour. I need to know how many users can access my url for the last 1 hour]

Kindly give me the solution for this problem.,

With regards,


Posted by: Pavanandey on: 11/20/2014 [Member] Bronze | Points: 25

In Global.asax

<script runat="server">
public static int count = 0;
void Application_Start(object sender, EventArgs e)
Application["HitCount"] = count;

void Session_Start(object sender, EventArgs e)
count = Convert.ToInt32(Application["HitCount"]);
Application["HitCount"] = count + 1;


Master Page Load
int hits = Convert.ToInt32(Application["HitCount"]);

Pavan Kumar
Mark Answer if this fits the need

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response