473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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
2 1730
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a...
3
by: qwerty | last post by:
I have two User controls in a page. Them ID-propertys are example UC1 and UC2. In code behind file they are declared: Public UC1 As UC1 Public UC1 As UC1 From the page I can call them with...
0
by: StraussGuy | last post by:
I have a user control that I've created the function of which is simply to handle data retrieval from an access database. (FWIW, it implements IListSource so that I can bind the control to the...
1
by: King Kong | last post by:
Hi All, We need a mechanism that can glue events from one user control to another user control is there any way to achieve this mechanism. Regards Moid Iqbal
2
by: DJ | last post by:
Hi, I have a user control that produces and maintains a student form for test enrollment. It contains all functionality such as adding, editing, suspending, etc., a student from a selected test...
2
by: momo898 | last post by:
I have a big problem. Most case it's working well but sometime the below happens. User A on computer B gets session object created by user X on computer Y instead of getting session object saved...
2
by: kumarpappu | last post by:
hello - I am newbie in winforms and c#. i have a mainform.cs and it has 2 user controls - leftView and rightView. In leftView.cs i am instantiating a new clientLeftView(another user control)...
1
by: mcfly1204 | last post by:
I have created two users controls, uconn1 and uconn2, that I have dropped onto a form, form1. From form one, I can access either user control with a line such as: uconn1.Show(); My question...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.