By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,665 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,665 IT Pros & Developers. It's quick & easy.

ASP Page Counter

P: n/a
I have written a hit counter, which I believe counts the times my page is
hit by a user for each unique session by the user.

The relevant part of my code is below:
If IsEmpty(Session("TotalCount")) Then

' Increment or reset the count
If Weekday(Date(),vbSunday) = 1 And dtDate <Date then
iCount = 1
Else
iCount = iCount + 1
End If
dtDate = Date

End If

Session("TotalCount")= iCount

The page is www.middlesexccl.com
My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.

When I first go to the URL I see the count increased by one, but it does not
incredment if I reload the page.

Is there any techniques that the clubs involved could be using, i.e. some
sort of 'fancy' linking to the page from their web site which might be
causing the count to be incremented unduely? I am sorry if that sounds a
little vague but I cannot udnerstand where the hits are coming from.

If anyone has any other odeas on how to test this please let me have
details.

Many thanks to all those who give this isue their attention.

Paul Smith
Aug 15 '08 #1
Share this Question
Share on Google+
30 Replies


P: n/a
"Paul W Smith" <pw*@NOSPAM.twelve.me.ukwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...

[snip]
My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.
Check your raw Web log files.

They'll identify the date, time, and ip address of each "hit".

FTP into your site; if you can't find them then ask your Web host.
Aug 15 '08 #2

P: n/a
>My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.

Check your raw Web log files.

They'll identify the date, time, and ip address of each "hit".

FTP into your site; if you can't find them then ask your Web host.
Thank for that great advice - found some explainations of web pages on web,
and after some integration of the log files for the week, I can see that my
hit count is actually pretty accurate!
Aug 15 '08 #3

P: n/a
Paul W Smith wrote on 15 aug 2008 in
microsoft.public.inetserver.asp.general:
If IsEmpty(Session("TotalCount")) Then

' Increment or reset the count
If Weekday(Date(),vbSunday) = 1 And dtDate <Date then
iCount = 1
Else
iCount = iCount + 1
End If
dtDate = Date

End If

Session("TotalCount")= iCount
This will only increment iCount once every session.

Seems to me the above is not the whole story.

Please show a minimal working example.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 15 '08 #4

P: n/a
Paul wrote on Fri, 15 Aug 2008 11:53:57 +0100:
I have written a hit counter, which I believe counts the times my page
is hit by a user for each unique session by the user.
The relevant part of my code is below:
If IsEmpty(Session("TotalCount")) Then
' Increment or reset the count
If Weekday(Date(),vbSunday) = 1 And dtDate <Date then iCount
= 1
Else iCount = iCount + 1
End If dtDate = Date
End If
Session("TotalCount")= iCount
The page is www.middlesexccl.com
My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.
When I first go to the URL I see the count increased by one, but it
does not incredment if I reload the page.
Is there any techniques that the clubs involved could be using, i.e.
some sort of 'fancy' linking to the page from their web site which
might be causing the count to be incremented unduely? I am sorry if
that sounds a little vague but I cannot udnerstand where the hits are
coming from.
If anyone has any other odeas on how to test this please let me have
details.
Many thanks to all those who give this isue their attention.
Paul Smith

The Session object is a per-session object, so you'll only see a TotalCount
value for your own session. Also, as you only increment if
Session("TotalCount") is empty, it will only increment once. Looking at the
code you posted, there is no way that could be the only code handling the
counter on that site.

For a counter that tracks sessions for you site, look into using the
Application object in the Session_OnStart event in global.asa. This would
allow you to increment the counter by 1 for each new Session that is
created, and is visible to any page that can read the Application object.

For instance, look at this: http://www.asptutorial.info/script/activeuserscounter/

However, note that this only records the number of active sessions - to get
the total number of sessions since reset, drop the Session_OnEnd event code.
If you want actual hits to pages, you will need to add code into every ASP
page on your site to increment an Application variable, eg.

Application.Lock
If IsEmpty(Application("TotalHits")) then
Application("TotalHits") = 1
Else
Application("TotalHits") = Applicaton("TotalHits") + 1
End If
Application.Unlock

You could then, if you wanted, display the number of sessions and the number
of hits as counters on your site. You might want to combine this with the
Application_OnStart even in global.asa to initialise the "TotalHits" value,
then you only need the incrementing line in each page rather than the entire
If ... End If block.

Don't forget that the figures will be lost if the IIS process is
recycled/stopped/started though.

--
Dan
Aug 18 '08 #5

P: n/a
Daniel Crichton wrote on 18 aug 2008 in
microsoft.public.inetserver.asp.general:
Application.Lock
If IsEmpty(Application("TotalHits")) then
Application("TotalHits") = 1
Else
Application("TotalHits") = Applicaton("TotalHits") + 1
End If
Application.Unlock
I do not think a lock will be usefull/neccesary for a single statement.
Don't forget that the figures will be lost if the IIS process is
recycled/stopped/started though.
So it is not usefull at all, methinks,
better use a database or a single file.

---------------

The application stored counter could be used for counting the number of
"active" visitors, since they are zero at a new application start anyway.

The count up and count down could be put in the global asa session subs.

Perha[s the OP wanted that.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 18 '08 #6

P: n/a
Evertjan. wrote on 18 Aug 2008 15:47:38 GMT:
Daniel Crichton wrote on 18 aug 2008 in
microsoft.public.inetserver.asp.general:
>Application.Lock
If IsEmpty(Application("TotalHits")) then
Application("TotalHits") = 1
Else
Application("TotalHits") = Applicaton("TotalHits") + 1
End If
Application.Unlock
I do not think a lock will be usefull/neccesary for a single statement.
Probably not, but it's been a while since I looked into the effects of
locking.
>Don't forget that the figures will be lost if the IIS process is
recycled/stopped/started though.
So it is not usefull at all, methinks, better use a database or a
single file.
It's useful if you only need a rough idea of what's going on.
---------------
The application stored counter could be used for counting the number of
"active" visitors, since they are zero at a new application start
anyway.
The count up and count down could be put in the global asa session
subs.
Perha[s the OP wanted that.
Which is what I linked to :)

--
Dan
Aug 18 '08 #7

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Daniel Crichton wrote on 18 aug 2008 in
microsoft.public.inetserver.asp.general:
Application.Lock
If IsEmpty(Application("TotalHits")) then
Application("TotalHits") = 1
Else
Application("TotalHits") = Applicaton("TotalHits") + 1
End If
Application.Unlock

I do not think a lock will be usefull/neccesary for a single statement.


Request A arrives
Request B arrices

Thread handling A reads Totalhits (its 10)
Thread handling B reads TotalHits (its still 10)
Thread handling B assigns 11 to TotalHits
Thread handling A also assigns 11 to TotalHits

Technically then the Lock is necessary although in reality it might not
actually matter.

--
Anthony Jones - MVP ASP/ASP.NET
Aug 20 '08 #8

P: n/a
Anthony Jones wrote on 20 aug 2008 in
microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>Daniel Crichton wrote on 18 aug 2008 in
microsoft.public.inetserver.asp.general:
Application.Lock
If IsEmpty(Application("TotalHits")) then
Application("TotalHits") = 1
Else
Application("TotalHits") = Applicaton("TotalHits") + 1
End If
Application.Unlock

I do not think a lock will be usefull/neccesary for a single statement.

Request A arrives
Request B arrices

Thread handling A reads Totalhits (its 10)
Thread handling B reads TotalHits (its still 10)
Thread handling B assigns 11 to TotalHits
Thread handling A also assigns 11 to TotalHits

Technically then the Lock is necessary although in reality it might not
actually matter.
That could be true, but it also could be,
that ASP in singlethreaded on a per statement basis.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 21 '08 #9

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 20 aug 2008 in
microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Daniel Crichton wrote on 18 aug 2008 in
microsoft.public.inetserver.asp.general:

Application.Lock
If IsEmpty(Application("TotalHits")) then
Application("TotalHits") = 1
Else
Application("TotalHits") = Applicaton("TotalHits") + 1
End If
Application.Unlock


I do not think a lock will be usefull/neccesary for a single statement.
Request A arrives
Request B arrices

Thread handling A reads Totalhits (its 10)
Thread handling B reads TotalHits (its still 10)
Thread handling B assigns 11 to TotalHits
Thread handling A also assigns 11 to TotalHits

Technically then the Lock is necessary although in reality it might not
actually matter.

That could be true, but it also could be,
that ASP in singlethreaded on a per statement basis.
The only time that would be true is if the whole site is single threaded due
to debugging being enabled.
--
Anthony Jones - MVP ASP/ASP.NET
Aug 21 '08 #10

P: n/a
Anthony Jones wrote on 21 aug 2008 in
microsoft.public.inetserver.asp.general:
Technically then the Lock is necessary although in reality it might
not actually matter.
>That could be true, but it also could be,
that ASP in singlethreaded on a per statement basis.
The only time that would be true is if the whole site is single
threaded due to debugging being enabled.
Why?

There is no advantage to multithread a single "let" statement,
and in global.asa it even is detrimental.
So it is just the choice of the VBS interpreter programmer.

Do we know, or can we test this?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 22 '08 #11

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 21 aug 2008 in
microsoft.public.inetserver.asp.general:
Technically then the Lock is necessary although in reality it might
not actually matter.
That could be true, but it also could be,
that ASP in singlethreaded on a per statement basis.
The only time that would be true is if the whole site is single
threaded due to debugging being enabled.

Why?

There is no advantage to multithread a single "let" statement,
and in global.asa it even is detrimental.
So it is just the choice of the VBS interpreter programmer.

Do we know, or can we test this?
I don't think you've quite grasped the concept yet.

Let me step you through my earlier example more slowly (to keep things
simple I'll assume one cpu)

Request A arrives
ASP takes a session object matching the Session cookie
ASP takes an existing scripting context not currently in use
ASP takes the script that the path indicates
ASP takes an idle thread from a thread pool (we'll give this thread an
ID of 1)
ASP puts this lot together and starts executing the script on thread 1

Request B arrives

ASP takes a session object matching the Session cookie
ASP takes an existing scripting context not currently in use
ASP takes the script that the path indicates
ASP takes an idle thread from a thread pool (we'll give this thread an
ID of 2)
ASP puts this lot together and starts executing the script on thread 2
Thread 1 handling A reads Totalhits (its 10)
Dispite what may seem the line:-
Application("TotalHits") = Applicaton("TotalHits") + 1
is not a single atomic operation
There is a read, there is an add and there is a write (with plenty in
between)
all of which may be pre-empted at any time.
At this point thread 1 has merely read the value then its pre-empted
and the scheduler starts executing Thread 2

Thread 2 handling B reads TotalHits (its still 10)
Here thread 2 has read the same value neither thread has written yet.
Hence it has read the same value

Thread 2 handling B assigns 11 to TotalHits
The addition is performed and the value written back to the application
object
Thread 2 completes in the knowledge of a job well done.

Thread 1 handling A also assigns 11 to TotalHits
Thread 1 resumes where it left off
It has just read the value it has no idea that it has changed since
It performs the addition and writes the value 11 back to the application
Thread 2 complete in the knowledge of a job well done.

Do you see it now?
--
Anthony Jones - MVP ASP/ASP.NET
Aug 22 '08 #12

P: n/a
Anthony Jones wrote on 22 aug 2008 in
microsoft.public.inetserver.asp.general:
Thread 1 handling A reads Totalhits (its 10)
Dispite what may seem the line:-
Application("TotalHits") = Applicaton("TotalHits") + 1
is not a single atomic operation
There is a read, there is an add and there is a write (with plenty in
between)
all of which may be pre-empted at any time.
At this point thread 1 has merely read the value then its pre-empted
and the scheduler starts executing Thread 2
[ etc ]
You are so wrong in thinking,
that because it is logical,
it is implemented that way.

While it could very well be the case,
the logic does not prove the factual implementation.

Ony the source code or the testing can prove it.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 22 '08 #13

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 22 aug 2008 in
microsoft.public.inetserver.asp.general:
Thread 1 handling A reads Totalhits (its 10)
Dispite what may seem the line:-
Application("TotalHits") = Applicaton("TotalHits") + 1
is not a single atomic operation
There is a read, there is an add and there is a write (with plenty
in
between)
all of which may be pre-empted at any time.
At this point thread 1 has merely read the value then its pre-empted
and the scheduler starts executing Thread 2
[ etc ]
You are so wrong in thinking,
that because it is logical,
it is implemented that way.

While it could very well be the case,
the logic does not prove the factual implementation.

Ony the source code or the testing can prove it.

Here is a fact the VBScript engine has no idea what an application object
is.

Here is another fact VBScript does not compile to native code.

Here is another fact VBScript doesn't create a zillion critical sections
around simple assignment statements.

You can lead a horse to water but you can't make it drink.
--
Anthony Jones - MVP ASP/ASP.NET
Aug 22 '08 #14

P: n/a
Anthony Jones wrote on 22 aug 2008 in
microsoft.public.inetserver.asp.general:
Here is a fact the VBScript engine has no idea what an application object
is.

Here is another fact VBScript does not compile to native code.

Here is another fact VBScript doesn't create a zillion critical sections
around simple assignment statements.

You can lead a horse to water but you can't make it drink.
All these things are circumstancial,
and do not prove a thing.

It still might be that a let statement in global.asa is internally
singlethreaded, because it was felt convenient.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 22 '08 #15

P: n/a
Anthony Jones wrote on 23 aug 2008 in
microsoft.public.inetserver.asp.general:
I'm sorry you seem to me to be pre-disposed to reject any reason or
facts I present to you.
I am not, I constantly say that your idea is probably true,
but it is not true, simply because you say so.
I have debugged at the machine level VB and VBScript applications.
I have built applications which act as scripting hosts (ASP is such an
application).
Good for you, I have not read your c.v., you did not tell me your
credentials till now, you either are well versed in VB ans VBS, or at least
you think you are.

That all does not mean that others like me should believe you an your word.
I do not think for a moment that you are dishonest, btw.
I have sufficient insight into what is going on under-the-hood to know
that what I've stated is a fact.
Oh, Anthony, it is not about what you yourself think to be a fact,
that you have proved beond reasonable doubt.

However, your stand that that is enough reason to require that others
believe you, is, perhaps also because of your self expressed infallability,
unreasonable.

You did not express, that you tested the let assignment line in
interpreting global.asa to be internally multitreaded, or have looked at
the assembly or intermediate code for that.

You only express fact from inference that you believe it is generally that
way.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 23 '08 #16

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 23 aug 2008 in
microsoft.public.inetserver.asp.general:
>I'm sorry you seem to me to be pre-disposed to reject any reason or
facts I present to you.

I am not, I constantly say that your idea is probably true,
but it is not true, simply because you say so.
>I have debugged at the machine level VB and VBScript applications.
I have built applications which act as scripting hosts (ASP is such an
application).

Good for you, I have not read your c.v., you did not tell me your
credentials till now, you either are well versed in VB ans VBS, or at
least
you think you are.

That all does not mean that others like me should believe you an your
word.
I do not think for a moment that you are dishonest, btw.
>I have sufficient insight into what is going on under-the-hood to know
that what I've stated is a fact.

Oh, Anthony, it is not about what you yourself think to be a fact,
that you have proved beond reasonable doubt.

However, your stand that that is enough reason to require that others
believe you, is, perhaps also because of your self expressed
infallability,
unreasonable.

You did not express, that you tested the let assignment line in
interpreting global.asa to be internally multitreaded, or have looked at
the assembly or intermediate code for that.

You only express fact from inference that you believe it is generally that
way.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
http://msdn.microsoft.com/en-us/library/ms525184.aspx

From the Application.Lock documentation:
"A page does not need to lock the application object to edit the application
collection. If one page tries to edit the application collection without
locking and a second page also tries to edit the collection, no error is
sent by IIS and the Application object ends up in an inconsistent state."
Aug 27 '08 #17

P: n/a
Chris Hohmann wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
http://msdn.microsoft.com/en-us/library/ms525184.aspx

From the Application.Lock documentation:
"A page does not need to lock the application object to edit the
application collection. If one page tries to edit the application
collection without locking and a second page also tries to edit the
collection, no error is sent by IIS and the Application object ends up
in an inconsistent state."
One would need to know what they mean by "not need" in this case, Chris.
How can a state ever be inconsistent?

And I doubt the documentation writers of MS always know what past
implementors did manage to put in the code. Remember the still present
"endif" allowance bug in VBS single line if-else-then?

The next interesting Q is, how we could ever test this inconsistency,
and more so prove the possible absense of such inconsistency.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 27 '08 #18

P: n/a
Responses inline.

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Chris Hohmann wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
>http://msdn.microsoft.com/en-us/library/ms525184.aspx

From the Application.Lock documentation:
"A page does not need to lock the application object to edit the
application collection. If one page tries to edit the application
collection without locking and a second page also tries to edit the
collection, no error is sent by IIS and the Application object ends up
in an inconsistent state."

One would need to know what they mean by "not need" in this case, Chris.
I assume they meant that no error is thrown if you attempt to modify the
application object without using lock/unlock. There's a contact link at the
bottom of the page if you'd like to request clarification.
How can a state ever be inconsistent?
Anthony already gave an example of inconsistent state.
And I doubt the documentation writers of MS always know what past
implementors did manage to put in the code. Remember the still present
"endif" allowance bug in VBS single line if-else-then?
No way to know for sure unless you ask. I don't remember the still present
"endif" allowance.
The next interesting Q is, how we could ever test this inconsistency,
and more so prove the possible absense of such inconsistency.
Use the hit count example without the lock/unlock and send 100 simultaneous
requests.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Aug 27 '08 #19

P: n/a
Chris Hohmann wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
>One would need to know what they mean by "not need" in this case,
Chris.

I assume they meant that no error is thrown if you attempt to modify
the application object without using lock/unlock. There's a contact
link at the bottom of the page if you'd like to request clarification.
>How can a state ever be inconsistent?

Anthony already gave an example of inconsistent state.
A state is a state, [because a computer is a state machine].
so it can never be inconsistent.
>And I doubt the documentation writers of MS always know what past
implementors did manage to put in the code. Remember the still
present "endif" allowance bug in VBS single line if-else-then?
No way to know for sure unless you ask.
No, in such an organisation, no one will know what happened years before.
I don't remember the still present "endif" allowance.
"We" talked about it a few? years ago on usenet:

if bool then do() end if

should give an error because it should have been just:

if bool then do()

as "end if" is only defined for the [younger] multiline if statement:

if bool then
do()
end if

And is was said by MS that the error was recognized and corrected before,
and then the great corporation websites protested, as their sites had to
much "inconsistent" ;-) pages to change them overnight.

So the error was reintroduced.
>The next interesting Q is, how we could ever test this inconsistency,
and more so prove the possible absense of such inconsistency.

Use the hit count example without the lock/unlock and send 100
simultaneous requests.
Simultaneous? How would you do that?

From one machine, they would necessarily not be simultaneous,
and for 100 machines, well, I doubt you could synchronize with some
precision.

And if no strange things happen, as I expect also in the case of absesne
of implied lock, because you cannot do the simultaneous job. would that
prove anything?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 27 '08 #20

P: n/a

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Chris Hohmann wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
>>One would need to know what they mean by "not need" in this case,
Chris.

I assume they meant that no error is thrown if you attempt to modify
the application object without using lock/unlock. There's a contact
link at the bottom of the page if you'd like to request clarification.
>>How can a state ever be inconsistent?

Anthony already gave an example of inconsistent state.

A state is a state, [because a computer is a state machine].
so it can never be inconsistent.
Just because you say it doesn't make it so.
>>And I doubt the documentation writers of MS always know what past
implementors did manage to put in the code. Remember the still
present "endif" allowance bug in VBS single line if-else-then?
No way to know for sure unless you ask.

No, in such an organisation, no one will know what happened years before.
You are making a blind assertion here. Have you interviewed every single
person Microsoft?
>
>I don't remember the still present "endif" allowance.

"We" talked about it a few? years ago on usenet:

if bool then do() end if

should give an error because it should have been just:

if bool then do()

as "end if" is only defined for the [younger] multiline if statement:

if bool then
do()
end if

And is was said by MS that the error was recognized and corrected before,
and then the great corporation websites protested, as their sites had to
much "inconsistent" ;-) pages to change them overnight.

So the error was reintroduced.
None of the above changes the fact that I do not recall this discussion. And
more to the point, I do not understand what the argument is. Are you saying
that one error in the ASP documentation/code calls into question ASP in it's
entirety?
>>The next interesting Q is, how we could ever test this inconsistency,
and more so prove the possible absense of such inconsistency.

Use the hit count example without the lock/unlock and send 100
simultaneous requests.

Simultaneous? How would you do that?

From one machine, they would necessarily not be simultaneous,
and for 100 machines, well, I doubt you could synchronize with some
precision.
Why don't you try it and let us know how it goes?
And if no strange things happen, as I expect also in the case of absesne
of implied lock, because you cannot do the simultaneous job. would that
prove anything?
No.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Aug 27 '08 #21

P: n/a
"Chris Hohmann" <no******@anonymous.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Simultaneous? How would you do that?

From one machine, they would necessarily not be simultaneous,
and for 100 machines, well, I doubt you could synchronize with some
precision.

Why don't you try it and let us know how it goes?
And if no strange things happen, as I expect also in the case of absesne
of implied lock, because you cannot do the simultaneous job. would that
prove anything?

No.

You could create a repro with just two machines. Have both hammer the
server in large but finite loop. The resulting accumulated count in the
application object should be the sum of loops for both machines. It would
be interesting to see how large the loop would need to be before an
inconsistency would become clear. Or how many additional machines would be
needed.

I grant though in such a simplistic test, conditions may still consipire to
serialise the requests.

(Actually such a test could be produced on a single machine using WinHTTP to
simulate several machines).

I've actually given up trying to convince Evertjan, this sort of thread
hasn't cropped in quite sometime, I'm disappointed that is has now.

--
Anthony Jones - MVP ASP/ASP.NET
Aug 27 '08 #22

P: n/a
Anthony Jones wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
I've actually given up trying to convince Evertjan, this sort of thread
hasn't cropped in quite sometime, I'm disappointed that is has now.
Antony,

Why disappointed ?

Are you disappointed not being able to convince someone due to non
convincing arguments?

All the time I stated that you are probably right in your assertion,
but that does not mean it is a fact, as you claimed.

That is why it is theoretically interesting to conceive a test.

In practice it is unimportant, as the exact number of user hits will be
contaminated by the number of bot/crawler hits that no one wants to include
in such count.

Possibly you [general you] can show in such a test, that events are lost,
but the opposite, that no event counts can be lost seems unreachable.

I doubt you [general you] can get enough semiconcurrent page requests where
there is no loss due to a sort of denial of service to test it reliably.

The only way would be reseaching and analyzing the source code. Seems an
hypothetical possiblility.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 27 '08 #23

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn*******************@194.109.133.242...
Anthony Jones wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
>I've actually given up trying to convince Evertjan, this sort of thread
hasn't cropped in quite sometime, I'm disappointed that is has now.

Antony,

Why disappointed ?

Are you disappointed not being able to convince someone due to non
convincing arguments?

All the time I stated that you are probably right in your assertion,
but that does not mean it is a fact, as you claimed.
"All the time" -hyperbole
That is why it is theoretically interesting to conceive a test.
Unsupported statement of fact.
In practice it is unimportant, as the exact number of user hits will be
contaminated by the number of bot/crawler hits that no one wants to
include
in such count.
Unsupported statement of fact.
Possibly you [general you] can show in such a test, that events are lost,
but the opposite, that no event counts can be lost seems unreachable.
Says you.
I doubt you [general you] can get enough semiconcurrent page requests
where
there is no loss due to a sort of denial of service to test it reliably.
Says you.
The only way would be reseaching and analyzing the source code. Seems an
hypothetical possiblility.
Hyperbole and unsupported statement of fact.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Wouldn't it be easier to admit you were wrong and move on?
Aug 28 '08 #24

P: n/a
Chris Hohmann wrote on 28 aug 2008 in
microsoft.public.inetserver.asp.general:
Says you.
[..]
>
Says you.
[..]
>
Hyperbole and unsupported statement of fact.
[please do not quote signatures on usenet]
Wouldn't it be easier to admit you were wrong and move on?
Says you. Sorry I take that back, such childish words.

Wrong in what?

What is wrong with you guys?

I do not state facts, I state lack of facts.

I state a hypothesis, that it is not easy and probably not possible to test
an asp behavour by the suggested method.

But please move on, I am done with you two on this subject.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 28 '08 #25

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
But please move on, I am done with you two on this subject.
I win.
Aug 28 '08 #26

P: n/a
Chris Hohmann wrote on 28 aug 2008 in
microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>But please move on, I am done with you two on this subject.

I win.
My childeren loved that too, when they were young.
I am glad to have been of service.

Have a wonderful weekend.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 29 '08 #27

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Chris Hohmann wrote on 28 aug 2008 in
microsoft.public.inetserver.asp.general:
>"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>>But please move on, I am done with you two on this subject.

I win.

My childeren loved that too, when they were young.
I am glad to have been of service.

Have a wonderful weekend.
Thank you. I had a lovely weekend. I hope you and your family had a pleasant
weekend as well. I'm glad to see you haven't given up on this thread.
Looking forward to your reply.

--
Chris "The Thread Winner" Hohmann
Sep 2 '08 #28

P: n/a
Chris Hohmann wrote on 02 sep 2008 in
microsoft.public.inetserver.asp.general:
Thank you. I had a lovely weekend. I hope you and your family had a
pleasant weekend as well. I'm glad to see you haven't given up on this
thread. Looking forward to your reply.
Well we were quite busy, I am a voluntary guide, and had a large group of
people that as children had been in hiding during the German occupation.
They are elderly now, but have their regular trips together.

And I did some programming and we skyped with our children in two different
continents [from ours].

Time flies like an arrow, and we like this time.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 2 '08 #29

P: n/a

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Chris Hohmann wrote on 02 sep 2008 in
microsoft.public.inetserver.asp.general:
>Thank you. I had a lovely weekend. I hope you and your family had a
pleasant weekend as well. I'm glad to see you haven't given up on this
thread. Looking forward to your reply.

Well we were quite busy, I am a voluntary guide, and had a large group of
people that as children had been in hiding during the German occupation.
They are elderly now, but have their regular trips together.

And I did some programming and we skyped with our children in two
different
continents [from ours].

Time flies like an arrow, and we like this time.
Please start a new thread for off-topic posts. Preferably in an appropriate
newsgroup.

--
Chris "I'm right. You're wrong." Hohmann
Sep 2 '08 #30

P: n/a
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Chris Hohmann wrote on 27 aug 2008 in
microsoft.public.inetserver.asp.general:
>http://msdn.microsoft.com/en-us/library/ms525184.aspx

From the Application.Lock documentation:
"A page does not need to lock the application object to edit the
application collection. If one page tries to edit the application
collection without locking and a second page also tries to edit the
collection, no error is sent by IIS and the Application object ends up
in an inconsistent state."

One would need to know what they mean by "not need" in this case, Chris.
How can a state ever be inconsistent?
Hi guys!
I'm not expert but let me see if I can answer that question by what the
documentation meant. If anything it will help me know if I am following this
correctly.

"not need" = means the value can be altered even if the application is not
locked [implied: even though it is a bad idea]

resulting "inconsistant" = two processes, unaware or each other due to the
absents of a lock, can set the value causing an inconsistancy. For example
each process add "1" to the value, but the final resulting value can end up
incremented by 1 from the original value rather than being incremented by
1,...and then be incremented by 1 again against the resulting value of the
first incrementation. The inconsistancy is that you have a final value of
"1" over the original value instead of "2" over the original value.

Basically the same problem of two users writing to the same field in the
same record of a poorly designed database that results in either incorrect
values in the field, or at worst a corrupt databse?

--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------
Sep 12 '08 #31

This discussion thread is closed

Replies have been disabled for this discussion.