473,397 Members | 2,099 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,397 software developers and data experts.

SessionId and New Window in IE

Hi,

When a user of Web application makes "File - New - Window" or Ctrl+N in IE,
the user obtains 2 windows IE having the same SessionId. This generates a
problem when, in one Web form, we use a variable of session to store a
dataset. The fact that the user browses with 2 windows on the same
application and the same session can give unexpected results.

Is it possible to have Id of window which would enable to name the variable
of session with this Id and, then, have a single name by opened window with
the same SessionId?

Thank you
Nov 19 '05 #1
4 1840
Is the problem with syncronous writes to the dataset? If so you could write
'lock(Session) { ... }' for c# or 'SyncLock Session ... End SyncLock' for VB
around the code that does the writes.

"Patrick Paquin" <pp******@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP14.phx.gbl...
Hi,

When a user of Web application makes "File - New - Window" or Ctrl+N in IE, the user obtains 2 windows IE having the same SessionId. This generates a
problem when, in one Web form, we use a variable of session to store a
dataset. The fact that the user browses with 2 windows on the same
application and the same session can give unexpected results.

Is it possible to have Id of window which would enable to name the variable of session with this Id and, then, have a single name by opened window with the same SessionId?

Thank you

Nov 19 '05 #2
No, It doesn't this. I use dataset to do the all the operations that can
require reload page, and finally save the result in the database. If the
user browses in the new opened window, he can modify the value in the
dataset. And after, if the user uses the first window, the data in the
dataset can doesn't match with the state of the web form.

"Matt Dockerty" <Ps reply to group> a écrit dans le message de
news:O9**************@tk2msftngp13.phx.gbl...
Is the problem with syncronous writes to the dataset? If so you could write 'lock(Session) { ... }' for c# or 'SyncLock Session ... End SyncLock' for VB around the code that does the writes.

Nov 19 '05 #3
Don't fully get it but I think something you could do is get a new GUID on
the first visit to the page and suffix that to the name of the session
variable. Would that help? (haven't tested this)...

if(!this.IsPostBack) {
string suffix = Guid.NewGuid().ToString();
ViewState.Add("Suffix", suffix);
} else {
string suffix = (string)ViewState["Suffix"];
}
DataSet userDataSet = (DataSet)Session["UserDataSet" + suffix];
"Patrick Paquin" <pp******@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP14.phx.gbl...
No, It doesn't this. I use dataset to do the all the operations that can
require reload page, and finally save the result in the database. If the
user browses in the new opened window, he can modify the value in the
dataset. And after, if the user uses the first window, the data in the
dataset can doesn't match with the state of the web form.

"Matt Dockerty" <Ps reply to group> a écrit dans le message de
news:O9**************@tk2msftngp13.phx.gbl...
Is the problem with syncronous writes to the dataset? If so you could write
'lock(Session) { ... }' for c# or 'SyncLock Session ... End SyncLock'

for VB
around the code that does the writes.


Nov 19 '05 #4
I have run into this issue.
It is because Ctrl-N starts IE in the same process space.
If they start it from the desktop icon then it gets its own process.
(Firefox does not though - it always runs inthe same process.)

This issue is bigger than just session.
Your cookies are shared too - including the forms authentication ticket.

Your app should still work correctly in either window though.
Not sure why you are having unexpected results. All of the same data is
available to that user.
Now if that user logs off one screen the other should still have him logged
in.
--
Joe Fallon


"Patrick Paquin" <pp******@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP14.phx.gbl...
Hi,

When a user of Web application makes "File - New - Window" or Ctrl+N in
IE,
the user obtains 2 windows IE having the same SessionId. This generates a
problem when, in one Web form, we use a variable of session to store a
dataset. The fact that the user browses with 2 windows on the same
application and the same session can give unexpected results.

Is it possible to have Id of window which would enable to name the
variable
of session with this Id and, then, have a single name by opened window
with
the same SessionId?

Thank you

Nov 19 '05 #5

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

Similar topics

8
by: Brad Simon | last post by:
I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping...
4
by: Andy Fish | last post by:
Hi, I have an asp.net application that is using Forms Authentication and maintaining http session state using cookies in the normal way. when the user clicks the logout button I do this: ...
0
by: ashvartsman | last post by:
Hi all, I need to start from my ASP.NET web application a new browser that will work with the same application but with new SessionID. It worked fine in "cookieless" mode for session state. But...
3
by: dotnettester | last post by:
Hi, Is there a way, I can get a new sessionid without user closing the browser window? I have a webpage, which logs user input and sessionid. If the user does not close the browser and if...
11
by: rayala | last post by:
Hi all, I am having very weird problem in my Outlook I am running my web application from with in Outlook.I found a strange problem that it is creating different sessionId if i open a new...
6
by: Rob Meade | last post by:
Hi all, I've just put some code together (cobbled is a phrase I like to use) - to handle a secure login to a web based application. It's not exactly rocket science, a session is created, its...
3
by: Rolf Welskes | last post by:
Hello, the following sample application in ASp.net 2.0 / VS2005 (Webproject). in an testPage.aspx ................ <P><A href="01Test01A.aspx">Link to 01Test01 A</A></P> <P><A...
4
by: Jerad Rose | last post by:
I have searched high and low, and I can't find anybody having this problem, so I'm sure it's something really simple I'm overlooking. In fact, I've seen many posts of people trying to set up the...
4
by: GaryDean | last post by:
Bringing up a new browser instance when using an asp.net application using forms authentication, of course, initiates a new session with a new sessionID and requires authentication again. But, I...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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,...

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.