473,699 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1568
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********@dis cussions.micros oft.comwrote in message
news:C3******** *************** ***********@mic rosoft.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********@dis cussions.micros oft.comwrote in message
news:C3******** *************** ***********@mic rosoft.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.houwin g 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.houwin g 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
3229
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 go to is a login form, which will set several session variables with the name used to log in, appropriate security level and some other misc variables, and then will go to a main menu for each particular security level using Server.Transfer. ...
0
1178
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, label, and code to support populating and paging the datagrid. The dataset which contains the data displayed in the datagrid is stored in a session variable. The control displays a list of people. This control is used in two pages in an application. ...
2
2223
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 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid, label, and code to support populating and paging the datagrid. The dataset which contains the data displayed in the datagrid
14
2258
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 at a page.I have a search criteria to search the records based on the data range i give This is what i have done, in the !IsPostBack section. I am setting up the oracle connection, creating dataset object, datadapter and i aslo load the data...
9
5310
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 copy paste (I hear this will improve in ASP.Net 2 via master pages). When I navigate from one page to the next the header and footer user controls lose their state because they are effectively different instances of the user control. Is there...
7
2041
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, it retreives the Menu from session and assigns its reference to Menu1. Within the Page_Load event I can see its internal values which have been retreived for each menu item and so it looks good. However, when the Render method is called of...
8
5920
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 could provide me something but i can´t find any examples for it. I´d appreciate any help or clues that would bring me any further. Thanks in advance.
4
2871
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 session seems to be re-created and is an empty array. I have checked the session file and the variable is being stored against the session id, but I dont know why PHP is not picking up the session after I reload.. I have tried the usual suspects...
8
5352
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 dont wan't a single point of failure we use SQL Session State. I have setup a persistant sql session state database on a SQL 2000 server (this is a cluster in production, so no SPOF) I have setup our web.config files to include; " <sessionState...
2
3013
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 large datagrid or form), we store the grid or form in Session Object. On PostBack we grab the control from the session, add it to our main form. In VS 2003 (1.1), the page will fire any event called in the custom control, e.g, cmdSave_Click. ...
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7743
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4373
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3053
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 we have to send another system
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.