Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

count visits

0 views
Skip to first unread message

Alberto

unread,
Oct 30, 2003, 10:52:37 AM10/30/03
to
I'd like to count the number of visits of my page so I need find out an
event raised only when the app starts. I think this could be the
Session_OnStart but I don't know whats the object who send it.

Thank you.


Alvin Bruney

unread,
Oct 30, 2003, 12:37:01 PM10/30/03
to
No that doesn't happen when the application starts. It happens when the
session starts. Put a counter variable in there and increment it. It will
need to be stateful, that is it needs to remember the value. You can find
the session_start event in the global.asax.x file.

regards

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Alberto" <alb...@nospam.es> wrote in message
news:epi5g1vn...@tk2msftngp13.phx.gbl...

Alberto

unread,
Oct 30, 2003, 12:48:35 PM10/30/03
to
Could you tell me how to find it?
Actually I see the Global.asax and the Global.asax.cs. In the Global.asax.cs
I can see this events:
acquireRequestState
AuthenticatedRequest
BeginRequest
Disposed
Elapsed
EndRequest
Error
PostRequestHandlerExecute
PreRequestHandlerExecute
PreSendRequestContent
PreSendRequestHeaders
ReleaseRequestState
ResolvedRequestCache
UpdateRequestCache

Thank you for your help
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com> escribió en
el mensaje news:uroJ2xwn...@TK2MSFTNGP10.phx.gbl...

Scott M.

unread,
Oct 30, 2003, 4:32:16 PM10/30/03
to
Look in Global.aspx for Session_Start(). In addition to storing your
counter in some statefull way, you'll also need to store it in some long
term way (for when you have to re-boot the server for whatever reason).
I've found that saving the hit count in an Application variable
(incrementing it in the Session_Start) and storing the latest value in a
counter file on the server works well. It does mean that in the
Application_Start event of Global.aspx, you need to read that file and set
the Application variable to the value in that file.


"Alberto" <alb...@nospam.es> wrote in message

news:OhPSU2wn...@TK2MSFTNGP09.phx.gbl...

0 new messages