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

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

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
"br********************@yahoo.co.uk" wrote:
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
Jun 27 '08 #2

P: n/a
On Apr 21, 1:18*am, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
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://pet...a.blogspot.com
*http://ittyurl.net

"brendan_gallagher_2...@yahoo.co.uk" wrote:
HI
I am developog anASP.netsite (usingvb.net1.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,accessingthe samepageat 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 beforeaccessingthe 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- Hide quoted text -

- 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.
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.