Click here to Skip to main content
14,774,396 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to know total visters of this application but the following code shows only 20 times then after that the count again starts from 1. What's wrong with it?
How should I count total visiters. :-\

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
       ' Code that runs on application startup
       Application("tusers") = 0
   End Sub

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs when a new session is started
        Dim tusers As Integer
        tusers = Convert.ToInt32(Application("tusers").ToString)
        Application("tusers") = tusers + 1
    End Sub

1) Title (Always use a meaningful name for your question - your username does not us give any idea what your problem is)
2) Use a "code block" around code fragments: It preserves formatting and makes it easier to read.
3) Grammar, punctuation and upper case (Don't use all lower case, it is considered "childish" like ALL UPPER CASE is considered "SHOUTING"
- OriginalGriff[/edit]
Updated 13-Sep-10 2:23am
Kunal Chowdhury «IN» 13-Sep-10 6:45am
"venubabu k" Is it a Question or your name? Put a proper question as the Subject line, so that, one can understand it.

1 solution

How did you test it ? Is your application hosted on IIS ? Is there any chance of Application pool recycling ?
venubabu k 13-Sep-10 7:45am
No need IIS We can count how many times Application loaded.any how i Found solution.
thanking you.
Abhijit Jana 13-Sep-10 10:03am
"No need IIS We can count how many times Application loaded" . That I know. I was just asking, if there is any with IIS recycling .
Thanks !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900