Re: Session data and Control-N issue

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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



.



Relevant Pages

  • Re: PHP MySQL object question
    ... In more complicated applications I layer a business object on top of the database objects. ... For instance, a business object may get information from several different tables, and when you update the data in the business object, it updates the underlying tables. ... Since I am only dealing with one composite record at a time I was planning to store the original field data for before and after comparison to determine when and where updates are needed. ... I could do it as separate session variables, but since each table record will have an associated object, why not just store them that way? ...
    (comp.lang.php)
  • Re: Storing a datatable (or arraylist )on ASP.NET Session
    ... Perhaps your ArrayList store smth which can't be casted to object. ... If exactly that code u shown didn't work (emply arraylists) that I recomment to re-register asp.net 2.0 calling aspnet_regiis,exe - i ... Team blog: http://devkids.blogspot.com/ ... b> session variables is stored on web server's local sql database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: LISP for web
    ... >>Ideas on how to store this information centrally for all of the app ... > ucw's form handling code (to make sure session ids are always ... > can deal with hardware failures an the app servers but this ...
    (comp.lang.lisp)
  • Re: Problem with asp.net app only allowing 1 user at a time
    ... from the client to the server), Application (an object that can store ... Now in your case you are reading and writing everything to the database, ... there is the Session object. ... To retrieve this you would do something like: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: LISP for web
    ... > Ideas on how to store this information centrally for all of the app ... the risk of losing data and sessions if one of the machines goes ... ucw's form handling code (to make sure session ids are always ...
    (comp.lang.lisp)