ASP.net (vb.net) session query - preventing a user from accessing a

ASP.net (vb.net) session query - preventing a user from accessing a

am 21.04.2008 00:19:09 von 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

RE: ASP.net (vb.net) session query - preventing a user from accessing

am 21.04.2008 02:18:00 von pbromberg

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


"brendan_gallagher_2001@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
>

Re: ASP.net (vb.net) session query - preventing a user from accessing

am 22.04.2008 18:57:14 von brendan_gallagher_2001

On Apr 21, 1:18=A0am, Peter Bromberg [C# MVP]
wrote:
> The best-practices method to handle concurrency issues is to use a TimeSta=
mp
> column in the database table that is to be updated, not to fiddle around w=
ithSession; that is one step removed from the problem area. There is plenty =
of
> documentation on how to prevent users from changing something in the datab=
ase
> when somebody else has "beat them to it", so to speak. The timestamp colum=
n
> 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.blogsp ot.com
> =A0http://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. =A0At 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. =A0I
> > 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? =A0I 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.