473,378 Members | 1,319 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,378 software developers and data experts.

Session data and Control-N issue

Hi

Our application was using Session variables to store business object for our
Web Forms successfully until someone opened a cloned IE window using
Control-N key press.

The cloned window ends up sharing the same business object as the original
window which results in interesting behaviour. For example, if you modify the
business object in one window, it is also effectively modified in the other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use JavaScript
on our pages, so I need solutions that do not rely on JavaScript.

Thanks in advance
Nov 8 '07 #1
6 1550
Hello Amir,
Hi

Our application was using Session variables to store business object
for our Web Forms successfully until someone opened a cloned IE window
using Control-N key press.

The cloned window ends up sharing the same business object as the
original window which results in interesting behaviour. For example,
if you modify the business object in one window, it is also
effectively modified in the other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use
JavaScript on our pages, so I need solutions that do not rely on
JavaScript.

Thanks in advance
You basically have two options

1) Don't use the session only, but a page specific storage, like viewstate
to identify which object to modify. You can still store th eobject in the
session, but use a key stored in the viewstate to retrieve it.

2) switch to cookieless sessions. That way you can start a seperate session
by entering a clean URL. That URL will the automatically get a new SessionID
assigned.

--
Jesse Houwing
jesse.houwing at sogeti.nl
Nov 8 '07 #2
LVP
Do not use cloned Windows.
Just start a new instance of your Browser.
You can not have the cake and eat it too.
"Amir Tohidi" <Am********@discussions.microsoft.comwrote in message
news:C3**********************************@microsof t.com...
Hi

Our application was using Session variables to store business object for
our
Web Forms successfully until someone opened a cloned IE window using
Control-N key press.

The cloned window ends up sharing the same business object as the original
window which results in interesting behaviour. For example, if you modify
the
business object in one window, it is also effectively modified in the
other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use
JavaScript
on our pages, so I need solutions that do not rely on JavaScript.

Thanks in advance

Nov 8 '07 #3
Hi Jesse

Thanks for the reply.

1) Our business objects can be quite big so sending them down to the
browser is not option (e.g. ViewState). In fact, we are looking at caching
our objects to disk on our servers to free up memory and just storing a
"pointer" to them in the Session.

2) Even with this approach the user can still press Cntrl+N can't they?
Wouldn't I still get the same problem?

Thanks
Amir

"Jesse Houwing" wrote:
Hello Amir,
Hi

Our application was using Session variables to store business object
for our Web Forms successfully until someone opened a cloned IE window
using Control-N key press.

The cloned window ends up sharing the same business object as the
original window which results in interesting behaviour. For example,
if you modify the business object in one window, it is also
effectively modified in the other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use
JavaScript on our pages, so I need solutions that do not rely on
JavaScript.

Thanks in advance

You basically have two options

1) Don't use the session only, but a page specific storage, like viewstate
to identify which object to modify. You can still store th eobject in the
session, but use a key stored in the viewstate to retrieve it.

2) switch to cookieless sessions. That way you can start a seperate session
by entering a clean URL. That URL will the automatically get a new SessionID
assigned.

--
Jesse Houwing
jesse.houwing at sogeti.nl
Nov 8 '07 #4
Hi LVP

Thanks

I wish I could tell my users not to use cloned windows!

If we can't find a no-JavaScript solution we may well have to explore this
route.

"LVP" wrote:
Do not use cloned Windows.
Just start a new instance of your Browser.
You can not have the cake and eat it too.
"Amir Tohidi" <Am********@discussions.microsoft.comwrote in message
news:C3**********************************@microsof t.com...
Hi

Our application was using Session variables to store business object for
our
Web Forms successfully until someone opened a cloned IE window using
Control-N key press.

The cloned window ends up sharing the same business object as the original
window which results in interesting behaviour. For example, if you modify
the
business object in one window, it is also effectively modified in the
other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use
JavaScript
on our pages, so I need solutions that do not rely on JavaScript.

Thanks in advance


Nov 8 '07 #5
you need a little more work. you store a request guid on the page. as
pages postback, you save the guid. if a postback happens for an existing
guid, you redirect to a new session.

you can use the same technique with standard sessions. the request guid
is an index into the session.

-- bruce (sqlwork.com)

Amir Tohidi wrote:
Hi Jesse

Thanks for the reply.

1) Our business objects can be quite big so sending them down to the
browser is not option (e.g. ViewState). In fact, we are looking at caching
our objects to disk on our servers to free up memory and just storing a
"pointer" to them in the Session.

2) Even with this approach the user can still press Cntrl+N can't they?
Wouldn't I still get the same problem?

Thanks
Amir

"Jesse Houwing" wrote:
>Hello Amir,
>>Hi

Our application was using Session variables to store business object
for our Web Forms successfully until someone opened a cloned IE window
using Control-N key press.

The cloned window ends up sharing the same business object as the
original window which results in interesting behaviour. For example,
if you modify the business object in one window, it is also
effectively modified in the other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use
JavaScript on our pages, so I need solutions that do not rely on
JavaScript.

Thanks in advance
You basically have two options

1) Don't use the session only, but a page specific storage, like viewstate
to identify which object to modify. You can still store th eobject in the
session, but use a key stored in the viewstate to retrieve it.

2) switch to cookieless sessions. That way you can start a seperate session
by entering a clean URL. That URL will the automatically get a new SessionID
assigned.

--
Jesse Houwing
jesse.houwing at sogeti.nl
Nov 8 '07 #6
Hello Amir,
Hi Jesse

Thanks for the reply.

1) Our business objects can be quite big so sending them down to the
browser is not option (e.g. ViewState). In fact, we are looking at
caching our objects to disk on our servers to free up memory and just
storing a "pointer" to them in the Session.
That wasn't what I meant. I meant, add a hashtable of business objects (or
pointers to business objects) to the session and place the key to that specific
object in the viewstate. Thatw ay you can get the correct object from the
session for each and every page. It even makes it possible to prevent a user
from opening the same object twice (though that will probably not be fool
proof).
2) Even with this approach the user can still press Cntrl+N can't
they? Wouldn't I still get the same problem?
They can, but if they the navigate to teh site (don't copy/paste the link)
it will start a new session.

The best way would be to make sure you check if the object has changes and
notify the user he/she is doing somethign illegal. That solves your problem
altogether. You could use a timestamp to check that. Which would be option
3. The timestamp can then be added to the Viewstate.

And ofcourse you can all three options ;)

Jesse
>
Thanks
Amir
"Jesse Houwing" wrote:
>Hello Amir,
>>Hi

Our application was using Session variables to store business object
for our Web Forms successfully until someone opened a cloned IE
window using Control-N key press.

The cloned window ends up sharing the same business object as the
original window which results in interesting behaviour. For example,
if you modify the business object in one window, it is also
effectively modified in the other.

Our users do not want this behaviour.

What is the recommended approach for addressing this issue.

Please note that because of DDA rules, we are not allowed to use
JavaScript on our pages, so I need solutions that do not rely on
JavaScript.

Thanks in advance
You basically have two options

1) Don't use the session only, but a page specific storage, like
viewstate to identify which object to modify. You can still store th
eobject in the session, but use a key stored in the viewstate to
retrieve it.

2) switch to cookieless sessions. That way you can start a seperate
session by entering a clean URL. That URL will the automatically get
a new SessionID assigned.

--
Jesse Houwing
jesse.houwing at sogeti.nl
--
Jesse Houwing
jesse.houwing at sogeti.nl
Nov 8 '07 #7

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

Similar topics

14
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you...
0
by: Paul | last post by:
Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid,...
2
by: Paul | last post by:
Tried to post this hours ago, but it still isn't visible. If it's a repeat, sorry for the inconvenience. Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0...
14
by: Venkat Chellam | last post by:
I have a peculiar problem. I have a simple web application which loads some data from the oracle table and display in the datagrid in the webpage and datagrid has page enabled which shows 10 rows...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
7
by: Mr Newbie | last post by:
I have written a Custom Control Menu. Its fairly simple but it works well enough. In order to simplify things I decided to store the Menu1 custom control in Session. In the page load event below,...
8
by: Azrael | last post by:
Hi, I have an SSLStream and i want to resume the SSL-Session for another connection to this server. How can i do this? I haven´t found any clues for it in SSLStream, perhaps Negotiatestream...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
8
by: Andrew Teece | last post by:
Hope someone can help. We are trying to deploy an ASP.Net 2.0 application to a 3-node webfarm. The application uses the ReportViewer control in local mode, hence we need session state. Because we...
2
by: HammRadio | last post by:
I am exploring converting my web app (current Framework 1.1) to Framework 2.0. Everything went smoothly save for one item. To reduce the trips to the database, when loading user controls (like a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.