Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > save settings on browser close

Reply
Thread Tools

save settings on browser close

 
 
Jaco Bregman
Guest
Posts: n/a
 
      12-08-2003
Hi all,

I've been trying to save some user settings when the
browser closes, but with little success. What I want to do
is count a users' resource usage, and write it to a
database when the user closes the browser. I tried to use
the 'Session_End' event handler in global.asax, but that
doesn't seem to work.

Any Ideas?
 
Reply With Quote
 
 
 
 
CJM
Guest
Posts: n/a
 
      12-08-2003
Session_OnEnd is very unreliable.

I would also forget about trying to pin down when a user entered the system
and when a user left the system, as you might have done with a traditional
client-server application.

It is much more practical to record what pages a user calls, and when...
You can determine that user left within 20 mins of the last page request
(assuming you leave the default timeout).

What do you mean by resource usage?

Time on the system, I assume?

Chris


"Jaco Bregman" <> wrote in message
news:054a01c3bd6d$0387c420$...
> Hi all,
>
> I've been trying to save some user settings when the
> browser closes, but with little success. What I want to do
> is count a users' resource usage, and write it to a
> database when the user closes the browser. I tried to use
> the 'Session_End' event handler in global.asax, but that
> doesn't seem to work.
>
> Any Ideas?



 
Reply With Quote
 
 
 
 
Jaco Bregman
Guest
Posts: n/a
 
      12-09-2003
Our website uses a third party Internet service for which
we have to pay. In order to bill our customers for usage
of this service, we count the number of times this service
is used, and store this in a Session object. When the
browser closes, we want to write the usage count to our
database.

If the user leaves our website, can I still retrieve the
information from the session object?

Jaco

>-----Original Message-----
>Session_OnEnd is very unreliable.
>
>I would also forget about trying to pin down when a user

entered the system
>and when a user left the system, as you might have done

with a traditional
>client-server application.
>
>It is much more practical to record what pages a user

calls, and when...
>You can determine that user left within 20 mins of the

last page request
>(assuming you leave the default timeout).
>
>What do you mean by resource usage?
>
>Time on the system, I assume?
>
>Chris
>
>
>"Jaco Bregman" <>

wrote in message
>news:054a01c3bd6d$0387c420$...
>> Hi all,
>>
>> I've been trying to save some user settings when the
>> browser closes, but with little success. What I want to

do
>> is count a users' resource usage, and write it to a
>> database when the user closes the browser. I tried to

use
>> the 'Session_End' event handler in global.asax, but that
>> doesn't seem to work.
>>
>> Any Ideas?

>
>
>.
>

 
Reply With Quote
 
Roji. P. Thomas
Guest
Posts: n/a
 
      12-09-2003
Yes.
use the Seeion_onEnd event.


--
Roji. P. Thomas
SQL Server Programmer
--------------------------------------
"Jaco Bregman" <> wrote in message
news:0a2601c3be41$d3219150$...
> Our website uses a third party Internet service for which
> we have to pay. In order to bill our customers for usage
> of this service, we count the number of times this service
> is used, and store this in a Session object. When the
> browser closes, we want to write the usage count to our
> database.
>
> If the user leaves our website, can I still retrieve the
> information from the session object?
>
> Jaco
>
> >-----Original Message-----
> >Session_OnEnd is very unreliable.
> >
> >I would also forget about trying to pin down when a user

> entered the system
> >and when a user left the system, as you might have done

> with a traditional
> >client-server application.
> >
> >It is much more practical to record what pages a user

> calls, and when...
> >You can determine that user left within 20 mins of the

> last page request
> >(assuming you leave the default timeout).
> >
> >What do you mean by resource usage?
> >
> >Time on the system, I assume?
> >
> >Chris
> >
> >
> >"Jaco Bregman" <>

> wrote in message
> >news:054a01c3bd6d$0387c420$...
> >> Hi all,
> >>
> >> I've been trying to save some user settings when the
> >> browser closes, but with little success. What I want to

> do
> >> is count a users' resource usage, and write it to a
> >> database when the user closes the browser. I tried to

> use
> >> the 'Session_End' event handler in global.asax, but that
> >> doesn't seem to work.
> >>
> >> Any Ideas?

> >
> >
> >.
> >



 
Reply With Quote
 
CJM
Guest
Posts: n/a
 
      12-09-2003
No. don't use the Session_OnEnd event.

Each time the user access the service, increment the usage count IN THE
DATABASE.

What happens if their machine crashes? What happens if your server crashes?
What do you do if one of the other 101 events that stop your Session_OnEnd
code from running occurs? It will be as if your user has not used the
service at all... in which case, you pay the bills!

Log each use of the service, directly to the DB, immediately before or
immediately after using the service.. (you chose which)

hth

CHris


 
Reply With Quote
 
news.microsoft.com
Guest
Posts: n/a
 
      12-09-2003
hi CJM,
WHY donīt you use trigger on sql server?
take a look at sql server help!
the trigger always starts running when update or delete or insert are
detected in a table.
may be your solution.

REGARDS,
Vilmar
Brazil
"CJM" <> escreveu na mensagem
news:...
> No. don't use the Session_OnEnd event.
>
> Each time the user access the service, increment the usage count IN THE
> DATABASE.
>
> What happens if their machine crashes? What happens if your server

crashes?
> What do you do if one of the other 101 events that stop your Session_OnEnd
> code from running occurs? It will be as if your user has not used the
> service at all... in which case, you pay the bills!
>
> Log each use of the service, directly to the DB, immediately before or
> immediately after using the service.. (you chose which)
>
> hth
>
> CHris
>
>



 
Reply With Quote
 
CJM
Guest
Posts: n/a
 
      12-09-2003
Hi Vilmar,

First of all the OP might not have access to SQL Server.

Second, I don't see how triggers help in this situation.

Chris

"news.microsoft.com" <> wrote in message
news:...
> hi CJM,
> WHY donīt you use trigger on sql server?
> take a look at sql server help!
> the trigger always starts running when update or delete or insert are
> detected in a table.
> may be your solution.
>
> REGARDS,
> Vilmar
> Brazil



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) IÃąaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
Settings.settings file with settings for multiple regions donet programmer ASP .Net 3 11-20-2009 03:05 PM
Browser close event (MSIE and FF): how to detect browser close ? pamelafluente@libero.it Javascript 0 01-23-2007 12:44 AM
JavaMail POP3 folder.close() method close also store! Daniel Albisser Java 1 04-07-2004 03:45 PM
How to close child browser while parent close? Denon ASP .Net 1 11-14-2003 08:14 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57