ASP.net (vb.net) session query - preventing a user from accessing apage while another user is viewin

  • Thread starter brendan_gallagher_2001
  • Start date
B

brendan_gallagher_2001

HI

I am developog an ASP.net site (using vb.net 1.1) which will be
accessed by a number of different office locations, where certain
users will be assigned a authoriser profile, and others will be
assigned a verifier profile. At least two authoriser, and multiple
verifiers exist per office.

I need to be able to prevent two users with the same profile, and from
the same office location, accessing the same page at the same time. I
need this to work for two pages out of the the five pages on the site.

I know could be done by using the Session_Start and Session_End in
global.asax.vb to update a flag on a database, then having sessions
check the value of the flag before accessing the pages, but that seems
kind of awkward.

Application (HttpApplicationState) variables perhaps?

Does anyone have any ideas? I would very much appreciate your help
with this.

Brendan
 
P

Peter Bromberg [C# MVP]

The best-practices method to handle concurrency issues is to use a TimeStamp
column in the database table that is to be updated, not to fiddle around with
Session; that is one step removed from the problem area. There is plenty of
documentation on how to prevent users from changing something in the database
when somebody else has "beat them to it", so to speak. The timestamp column
will have changed and if the appropriate SQL statement is included, this
allows you to notify the user that somebody else has changed a row before
they submitted their own changes. Hope that gets you on the right track.
-- Peter
To be a success, arm yourself with the tools you need and learn how to use
them.

Site: http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://ittyurl.net
 
B

brendan_gallagher_2001

The best-practices method to handle concurrency issues is to use a TimeStamp
column in the database table that is to be updated, not to fiddle around withSession; that is one step removed from the problem area. There is plenty of
documentation on how to prevent users from changing something in the database
when somebody else has "beat them to it", so to speak. The timestamp column
will have changed and if the appropriate SQL statement is included, this
allows you to notify theuserthat somebody else has changed a row before
they submitted their own changes. Hope that gets you on the right track.
-- Peter
To be a success, arm yourself with the tools you need and learn how to use
them.

Site:http://www.eggheadcafe.comhttp://petesbloggerama.blogspot.com
 http://ittyurl.net











- Show quoted text -

This is not really what I'm looking to do. I am looking to prevent
users accessing the page at the same time Any help is appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,736
Latest member
zacharyharris

Latest Threads

Top