Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Detect/prevent multiple tab/browser...

Reply
Thread Tools

Detect/prevent multiple tab/browser...

 
 
James Hunter Ross
Guest
Posts: n/a
 
      06-03-2009
Friends,

Our application has a "session" concept, and it just cannot work reliably if
more than one browser instance (two tabs, or two IE8 instances on a single
workstation) refer to the same session. Cookies are involved apparently.

Anyway, is there any good technique we can use to notice that a second tab
or browser instance is accessing our application session. Right now, at the
server side we just don't have a distinction between on tab/instance and
another if they are all from the same workstation.

I may have phrased this poorly, I'm not actually on the web development
team, (I do SQL back-end stuff), but any words or thoughts you have will be
greatly appreciated.

James


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-04-2009
On Jun 4, 1:36*am, "James Hunter Ross" <james.r...@oneilsoft.com>
wrote:
> Friends,
>
> Our application has a "session" concept, and it just cannot work reliably if
> more than one browser instance (two tabs, or two IE8 instances on a single
> workstation) refer to the same session. *Cookies are involved apparently.
>
> Anyway, is there any good technique we can use to notice that a second tab
> or browser instance is accessing our application session. *Right now, at the
> server side we just don't have a distinction between on tab/instance and
> another if they are all from the same workstation.
>
> I may have phrased this poorly, I'm not actually on the web development
> team, (I do SQL back-end stuff), but any words or thoughts you have will be
> greatly appreciated.
>
> James


James,

I found following js-approach, see
http://www.codeproject.com/KB/aspnet...abWindows.aspx

You may also try to generate unique id by javascript and use Session
or cookies to track it. For example, at first window you will generate
id=0123456789, put it into session object (e.g. by using iframe). Then
you can always check if id is the same as in the Session or it is new.
When it's new - you can show message that only one window is allowed)

Hope this helps

 
Reply With Quote
 
 
 
 
Jesse Houwing
Guest
Posts: n/a
 
      06-04-2009
Hello James,

> Friends,
>
> Our application has a "session" concept, and it just cannot work
> reliably if more than one browser instance (two tabs, or two IE8
> instances on a single workstation) refer to the same session. Cookies
> are involved apparently.
>
> Anyway, is there any good technique we can use to notice that a second
> tab or browser instance is accessing our application session. Right
> now, at the server side we just don't have a distinction between on
> tab/instance and another if they are all from the same workstation.
>
> I may have phrased this poorly, I'm not actually on the web
> development team, (I do SQL back-end stuff), but any words or thoughts
> you have will be greatly appreciated.


It's usually better to code with multiple windows in mind (it isn't actually
that hard), but you run into problems once in a while (especially if multiple
windows weren't part of the scope, or the developers just disn't know about
it).

As a user I want to be able to use multiple tabs/windows. Your users might
also want to use them (seeing that you'rerunning into problems, my guess
is they're already using this feature). For future applications, make sure
this is a supported feature. By makign sure you're using a workflow per use
case (like windows workflow) to restrict page transitions and to keep the
current position, you can effectively support multiple workflows on the same
client. Within each workflow you'd do additional checking to make sure the
postback that is occuring is valid for the current position in the workflow.
If it isn't just notify the user and offer him 2 choices, one, go back and
start a new workflow with the same settings (if applicatble), two, jump to
the current position in the workflow you were posting back to and contuniue
from there (if the workflow is still active).

You can assign each workflow a unique id and store that ID in the viewstate
of your page. If needed you can pass the workflow id as a url parameter for
link based navigation. Store each workflow in the session based on this unique
id and you're all set.
--
Jesse Houwing
jesse.houwing at sogeti.nl


 
Reply With Quote
 
James Hunter Ross
Guest
Posts: n/a
 
      06-04-2009
....you guys are great, thanks so much.

James


 
Reply With Quote
 
Jeff Maus
Guest
Posts: n/a
 
      09-22-2009
James,

If you ever find a solution to this, I would appreciate you forwarding the solution, as we are also stuck w/ the same issue.

Regards,

Jeff



Posted as a reply to:

Detect/prevent multiple tab/browser...
03-Jun-09

Friends,

Our application has a "session" concept, and it just cannot work reliably if
more than one browser instance (two tabs, or two IE8 instances on a single
workstation) refer to the same session. Cookies are involved apparently.

Anyway, is there any good technique we can use to notice that a second tab
or browser instance is accessing our application session. Right now, at the
server side we just don't have a distinction between on tab/instance and
another if they are all from the same workstation.

I may have phrased this poorly, I'm not actually on the web development
team, (I do SQL back-end stuff), but any words or thoughts you have will be
greatly appreciated.

James

EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorials...l-view-vi.aspx
 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      09-22-2009
Not sure what is the problem but the user will always be able to use
multiple browser instance (though I've seen a script recently to detect
multiple tabs in a single browser instance, If I remember it just browses a
frame or window collections).

My personal preference would be to double check the problem it causes and
try to solve this rather than just trying to forbid the user to do this
(AFAIK it will be always possible in edge cases).



"Jeff Maus" a écrit dans le message de groupe de discussion :
...
> James,
>
> If you ever find a solution to this, I would appreciate you forwarding the
> solution, as we are also stuck w/ the same issue.
>
> Regards,
>
> Jeff
>
>
>
> Posted as a reply to:
>
> Detect/prevent multiple tab/browser...
> 03-Jun-09
>
> Friends,
>
> Our application has a "session" concept, and it just cannot work reliably
> if
> more than one browser instance (two tabs, or two IE8 instances on a single
> workstation) refer to the same session. Cookies are involved apparently.
>
> Anyway, is there any good technique we can use to notice that a second tab
> or browser instance is accessing our application session. Right now, at
> the
> server side we just don't have a distinction between on tab/instance and
> another if they are all from the same workstation.
>
> I may have phrased this poorly, I'm not actually on the web development
> team, (I do SQL back-end stuff), but any words or thoughts you have will
> be
> greatly appreciated.
>
> James
>
> EggHeadCafe - Software Developer Portal of Choice
> WPF And The Model View View Model Pattern
> http://www.eggheadcafe.com/tutorials...l-view-vi.aspx



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      09-22-2009
> Not sure what is the problem but the user will always be able to use
> multiple browser instance (though I've seen a script recently to detect
> multiple tabs in a single browser instance, If I remember it just browses
> a frame or window collections).


So it was :
http://groups.google.com/group/micro...lnk=raot&pli=1

It points to :
http://www.codeproject.com/KB/aspnet...abWindows.aspx

I must have confused with something else as this is not possible client side
(and makes senses as then my site could know what are the other sites you
opened so it would be a privacy issue).

--
Patrice



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple ISPs and Multiple IP Ranges from Each ISP Chennak Cisco 10 06-08-2005 09:29 PM
IP Address Scheme for Multiple DMZs on Multiple PIXs Scotchy Cisco 2 10-07-2004 03:35 PM
Preventing multiple form submissions (multiple postbacks) Diane Selby ASP .Net 4 06-25-2004 09:50 PM
multiple dropdown lists = multiple data readers??? Andrew Kidd ASP .Net 3 04-22-2004 03:23 PM
Re: One solution containing multiple projects and multiple hosts Stephen Miller ASP .Net 0 06-24-2003 12:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57