473,486 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

limit internal users open just one browser from the server

Hi all,
I am thinking about doing this since I got several cases that some of our
internal users open more than one browser at the same time from our server.
When one of the transactions was not completed finished, the second browser
jusk pick up some session variables from the first browser and process right
after that. It messed up everything.

I was thinking about use remote_addr, but it seems not working since we are
behind the firewall and every user's IP inside the company network to the
internet is the same.
It seems that I have to use internal userID and record this in the database
and when any page is requested, I have to check in the database to see if the
user is connected then decide if the page should be display or not.
Is there any better way?
Thank you.
--
Betty
Feb 9 '07 #1
6 2381
How would you tell which browser window they were connecting from?

Bob Lehmann

"c676228" <be****@community.nospamwrote in message
news:3C**********************************@microsof t.com...
Hi all,
I am thinking about doing this since I got several cases that some of our
internal users open more than one browser at the same time from our
server.
When one of the transactions was not completed finished, the second
browser
jusk pick up some session variables from the first browser and process
right
after that. It messed up everything.

I was thinking about use remote_addr, but it seems not working since we
are
behind the firewall and every user's IP inside the company network to the
internet is the same.
It seems that I have to use internal userID and record this in the
database
and when any page is requested, I have to check in the database to see if
the
user is connected then decide if the page should be display or not.
Is there any better way?
Thank you.
--
Betty

Feb 9 '07 #2

"c676228" <be****@community.nospamwrote in message
news:3C**********************************@microsof t.com...
Hi all,
I am thinking about doing this since I got several cases that some of our
internal users open more than one browser at the same time from our
server.
When one of the transactions was not completed finished, the second
browser
jusk pick up some session variables from the first browser and process
right
after that. It messed up everything.
Sounds to me like poor design, like maybe an entry point script that posts
to itself one or more times to perform successive segments of a
transactional process, while trying to use session data to track the
current/determine the next segment.

Session data is not a workable option for that purpose. Aside from the
multiple open browsers problem you're seeing, what if the browser is closed
after the first, but before the last segment? What if something holds-up
the flow between segments, and the session expires before the next segment
is executed?

If the process is transactional in nature, you should generate an ID value
for each one when you construct the page from which the user will launch it,
and then pass that ID to each segment as a URL parameter or hidden form
input. Use that ID to facilitate isolation logic, i.e., a positive
mechanism to prevent unrelated requests from the same user from interfering
with a transaction in progress.

You might also want split some segments of the process to separate script
files, but if not, pass the value that determines which segment to execute
as a hidden input, rather than storing that value in the session from one
segment, and reading it back from the session for each request, and
branching to a segment based thereupon.

I was thinking about use remote_addr, but it seems not working since we
are
behind the firewall and every user's IP inside the company network to the
internet is the same.
Even if that were not the case, multiple requests from a single given client
system will have the same client IP, and even if *that* were not the case,
identifying the client system does nothing to identify whether/if multiple
browser windows are open on that client.

It seems that I have to use internal userID and record this in the
database
and when any page is requested, I have to check in the database to see if
the
user is connected then decide if the page should be display or not.
Again, even if there is a flawless way to do this, in the purest sence, it's
irrelevant. Why does every incoming request from a given client need to
pertain to a single transaction in progress? (In absence of bad design, the
answer is: there is no reason.)

From a user's perspective I have to tell you, I litteraly despise sites that
impose such limits on my session. Case in point, the amtrak.com site.
Booking travel on amtrak.com is a text-book example of a multi-segment
transactional process, but in many cases the list of trains available to
service some segment of your desired itinerary is artificially limited -- it
doesn't give you a big-picture view. There may be multiple ways to reach
point B from point A, not all are equal to say the least!

The site used to allow the user to have multiple browsers interactively open
at once, which allowed "what if" queries, viewing route maps/schedules, etc,
without sacrificing all your input so far in your "real" reservation
process -- what if I left on Monday instead of Sunday? What if I travel
early in the morning instead of afternoon? It can make a huge difference.
(Example: San Diego, CA to San Luis Obispo, CA. One route takes 6 hours on
a single train; another takes 14 hours with 4 lay-overs and two connecting
bus segments -- and you can't check your baggage, *and* it costs $20 more!
Option A: fast, comfortable, stress-free; option B: trip from hell!)

In any case, before I ramble on forever, after they re-factored the site,
opening a new browser on the site blows any reservations in progress. Worse
yet, when reserved seats were selected in a reservation that gets blown-out,
those reserved seats are somehow encumbered for some irritatingly long
timeout...
For whatever it's worth...
-Mark
Is there any better way?
Thank you.
--
Betty

Feb 11 '07 #3
Hello Betty,

Mark has posted many suggestion on this.

IMO, there are two things you need to consider here:

**How do you distinguish the client requests. I don't think distinguish
client through browser a good idea. Is your web application required to get
the user/account info from client(the operation is based on per user
specific)? If so, you need a approach to correctly assocate each request
with a certain user. (one way is simply rely on session state to
distinguish client users).

** After you've determined which user each requests belongs to, you can
define how you will control the concurrent access to the resource(to
perform the certain operation). For example, you can store a session
variable for given user to indicate whether the operation is currently
being processed and not available. And when this operation has begun on a
given user, you set this flag variable to "false"(indicate that this
operation is unavailable) on this user. Then, any sequential requests
(associated with the same user) which want to perform the same operation
will be denied(based on checking that flag variable)

How do you think of this? Please feel free to post here if you have any
other questions or concerns.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 12 '07 #4
Mark,
Thank you very much for your detailed message and sensible comments with a
good exmaple, that definitely helps. I agree with you that we should not pose
that kind of limit. I will present my understanding in details below. You can
check if I get your points.
First of all, we did have some holes in our initial design. for example, our
ID is created by Javascript, which probably is not a best choice, I would
prefer server side script. Besides there is a big bug there which I think is
one of the reason how come the server pick up the same data. As you can see
when the first browser created the first Order_ID and if the second browser
was opened, it looks for the order_id in the cookie. So what I will do is
remove that part of the code and will enforce whenever a new page is opened,
a new order_id will be created.

2) The initial motivation to use session variables is before many of our
customers complained about the data disapearing problem after a form was
submitted and they click back button and the data they entered disappeared.
So I used the session variable to maintain the data in the data entry fields.
In this case in order to avoid second browser to pick up session data from
the first browser(traveling date), I always need to request field data
first(i.e., probably different traveling date) and then set session
variables. Is that good enough? I don't know how other companyies dealing
with the case if the page is in the middle of program segment and somehow is
expired, my program is just ask the user starts from the beginning.
If the user abandon a page in the middle, is there a good to clean the
resources likc object and database connection?

asCookie = (document.cookie).split (";");
for (i = 0; i < asCookie.length; i++)
{
pairs = asCookie [i].split ("=");
if (pairs [0].indexOf ("OrderId") != -1)
{
OrderID = pairs [1];
}
}
...
// Check if OrderID is within the acceptable range
if (nTISLength < 15 || nTISLength 18)
{
...
OrderID = CCFormatDateTime(dNow); // Create New Order ID
sDateAndPath = "path=/;expires=" + dExpire.toUTCString();
document.cookie = "OrderID=" + OrderID + ";" + sDateAndPath;
}
document.formname.order_id.value = OrderID;
--
Betty
"Mark McGinty" wrote:
>
"c676228" <be****@community.nospamwrote in message
news:3C**********************************@microsof t.com...
Hi all,
I am thinking about doing this since I got several cases that some of our
internal users open more than one browser at the same time from our
server.
When one of the transactions was not completed finished, the second
browser
jusk pick up some session variables from the first browser and process
right
after that. It messed up everything.

Sounds to me like poor design, like maybe an entry point script that posts
to itself one or more times to perform successive segments of a
transactional process, while trying to use session data to track the
current/determine the next segment.

Session data is not a workable option for that purpose. Aside from the
multiple open browsers problem you're seeing, what if the browser is closed
after the first, but before the last segment? What if something holds-up
the flow between segments, and the session expires before the next segment
is executed?

If the process is transactional in nature, you should generate an ID value
for each one when you construct the page from which the user will launch it,
and then pass that ID to each segment as a URL parameter or hidden form
input. Use that ID to facilitate isolation logic, i.e., a positive
mechanism to prevent unrelated requests from the same user from interfering
with a transaction in progress.

You might also want split some segments of the process to separate script
files, but if not, pass the value that determines which segment to execute
as a hidden input, rather than storing that value in the session from one
segment, and reading it back from the session for each request, and
branching to a segment based thereupon.

I was thinking about use remote_addr, but it seems not working since we
are
behind the firewall and every user's IP inside the company network to the
internet is the same.

Even if that were not the case, multiple requests from a single given client
system will have the same client IP, and even if *that* were not the case,
identifying the client system does nothing to identify whether/if multiple
browser windows are open on that client.

It seems that I have to use internal userID and record this in the
database
and when any page is requested, I have to check in the database to see if
the
user is connected then decide if the page should be display or not.

Again, even if there is a flawless way to do this, in the purest sence, it's
irrelevant. Why does every incoming request from a given client need to
pertain to a single transaction in progress? (In absence of bad design, the
answer is: there is no reason.)

From a user's perspective I have to tell you, I litteraly despise sites that
impose such limits on my session. Case in point, the amtrak.com site.
Booking travel on amtrak.com is a text-book example of a multi-segment
transactional process, but in many cases the list of trains available to
service some segment of your desired itinerary is artificially limited -- it
doesn't give you a big-picture view. There may be multiple ways to reach
point B from point A, not all are equal to say the least!

The site used to allow the user to have multiple browsers interactively open
at once, which allowed "what if" queries, viewing route maps/schedules, etc,
without sacrificing all your input so far in your "real" reservation
process -- what if I left on Monday instead of Sunday? What if I travel
early in the morning instead of afternoon? It can make a huge difference.
(Example: San Diego, CA to San Luis Obispo, CA. One route takes 6 hours on
a single train; another takes 14 hours with 4 lay-overs and two connecting
bus segments -- and you can't check your baggage, *and* it costs $20 more!
Option A: fast, comfortable, stress-free; option B: trip from hell!)

In any case, before I ramble on forever, after they re-factored the site,
opening a new browser on the site blows any reservations in progress. Worse
yet, when reserved seats were selected in a reservation that gets blown-out,
those reserved seats are somehow encumbered for some irritatingly long
timeout...
For whatever it's worth...
-Mark
Is there any better way?
Thank you.
--
Betty


Feb 13 '07 #5

Hi Steven,
Thank you for your suggestions. I believe both ways are doable.
Based on Mark's comment, maybe I should have reconsider it again. I just
posed a message to reply him and when I submitted it just gave me a blank
page, I have to check to see if I need to rewite that one.
Thank you so much.
Betty
"Steven Cheng[MSFT]" wrote:
Hello Betty,

Mark has posted many suggestion on this.

IMO, there are two things you need to consider here:

**How do you distinguish the client requests. I don't think distinguish
client through browser a good idea. Is your web application required to get
the user/account info from client(the operation is based on per user
specific)? If so, you need a approach to correctly assocate each request
with a certain user. (one way is simply rely on session state to
distinguish client users).

** After you've determined which user each requests belongs to, you can
define how you will control the concurrent access to the resource(to
perform the certain operation). For example, you can store a session
variable for given user to indicate whether the operation is currently
being processed and not available. And when this operation has begun on a
given user, you set this flag variable to "false"(indicate that this
operation is unavailable) on this user. Then, any sequential requests
(associated with the same user) which want to perform the same operation
will be denied(based on checking that flag variable)

How do you think of this? Please feel free to post here if you have any
other questions or concerns.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 13 '07 #6
Thanks for the reply.

No problem. Please feel free to post here whenever you've got any further
questions to discuss.

Good luck!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 14 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
4607
by: Paul | last post by:
Hi, I'd like to limit the number of selections a user can make in a multiple select listbox. I have a note on the interface to say that only x no. of items should be selected and I check the...
6
12331
by: Hannu | last post by:
Hi. In the ldb file you can see the users of the mdb-file. If you open the mdb-file your machine and username will be written in the lbd- file. Allthough you close the mdb-file your name won't...
8
9986
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
3
807
by: Niranjan Roy | last post by:
When trying to create Web application project from inside my Visual Studio.Net, I am getting the following error: --------------------------- Microsoft Development Environment ...
8
2665
by: DanB | last post by:
This is probably soooo simple but I can't seem to get it. I have a text file that I want users to download via a web page. I want the file to be saved to a default folder (or one that they...
4
10761
by: Bill | last post by:
Hi, I would be grateful if someone could clarify my rather confused ideas of the 10 connection limit on XP/2000 when its being used as a server. (I realise that XP is really a client op sys with...
25
11239
by: Matt Kruse | last post by:
According to HTTP/1.1 specs, a client should only have two connections open to the host at a time (which can be changed by browser users, of course). When using xmlHttpRequest connections, is...
1
6304
by: Gurpal | last post by:
I'm getting this error when I test this page. Here is the error: Response object error 'ASP 0251 : 80004005' Response Buffer Limit Exceeded /test/test4.asp, line 0 Execution of the ASP...
8
3726
by: Mike P | last post by:
What would be the best way of counting the number of users who are currently logged on to a website? I am making the users login against a database of valid users. Would the best way be to add a...
0
7105
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
6967
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
7180
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
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.