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

Discussion in 'ASP .Net' started by brendan_gallagher_2001@yahoo.co.uk, Apr 20, 2008.

  1. Guest

    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
     
    , Apr 20, 2008
    #1
    1. Advertising

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

    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


    "" 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
    >
     
    Peter Bromberg [C# MVP], Apr 21, 2008
    #2
    1. Advertising

  3. Guest

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

    On Apr 21, 1:18 am, Peter Bromberg [C# MVP]
    <> wrote:
    > 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
    >
    >
    >
    > "" 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.
     
    , Apr 22, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    384
    William LaMartin
    Sep 23, 2006
  2. Replies:
    2
    Views:
    1,026
  3. Andy Fish

    accessing another user's session state

    Andy Fish, Jan 23, 2009, in forum: ASP .Net
    Replies:
    6
    Views:
    1,535
    Larry Bud
    Jan 26, 2009
  4. Dax Westerman
    Replies:
    1
    Views:
    186
    Dax Westerman
    Aug 19, 2003
  5. Steveo
    Replies:
    2
    Views:
    96
Loading...

Share This Page