Bob,
I have still an issue of session variables.
I have a web site that allows users access with different profiles
(different sets of session variables). When users start a new browser, each
login has its own set of session variables. There is an option that a user
can open multiple windows with different user’s profile (administrators), and
when the multiple windows are opened by a new browser separately, every thing
works well (i.e., no interaction between the sessions).
Now, there is an issue of session variables when users open multiple windows
from a parent page (providing a link to above web site), i.e., when open a
window with profile A, it’s OK, but when open another window with profile B,
all session variables within profile A are replaced by those of profile B.
And if a third window is opened with profile C, then all session variables in
profile A and B are replaced by those in profile C.
I put the statement “Session.Abandon” at the beginning of first page of the
web site, that changes the session ID after every login, but the interaction
between different sessions still happens.
Any ideal on that?
I appreciate your support.
"Bob Barrows [MVP]" wrote:
> Li Pang wrote:
> > Hi Bob,
> >
> > You said that "The session has already started". Is it still true if
> > the calling page and the called page are located at the different
> > servers?
>
> If they are on different servers, then, by definition, they cannot have the
> same session.
> There is no point in abandoning a session in Session_OnStart because that
> event only fires when a session is starting.
>
> >
> > How the session really works?
> > If the calling page A calls the called page B then the session of
> > page B started (from the server B).
>
> Correct. A new session starts on server B
>
> > If the calling page A calls second time the page B, how the asp or
> > iis knows that the session has been already started?
>
> Because the server B session cookie still exists on the user's machine.
>
> >
> > Is the session of page B depends on the parent page A?
>
> No. the session depends on a session cookie written to the user's machine by
> server B.
> The session cookies remain until all browser windows are closed
>
> > Is that possible to use the javascript function "window.open"
> > enforcing to open a new sessions?
> >
>
> Only by issuing a Session.Abandon call in the server-side code of the page
> being called.
>
> You could have a SessionAbandon.asp page to which you pass a querystring
> argument to control a Response.Redirect statement which is executed after
> the session is abandoned ...
>
> Bob Barrows
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>
|