Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Create a sessionless window off of a session window.

Posted on 2004-09-11
21
260 Views
Last Modified: 2007-12-19
ok, there's a training page in the website that only logged in users can see, once a user logs in it stores information into session variables. Inside the training page there are links to other interfaces. My boss wants whoever's in the training page to be able to log into the other interfaces so that they can sample those interfaces, I've already created dummy accounts for those interfaces but, in order for the user to use the other interfaces he'd have to open another IE window (without using CTRL+N) and then log in. Is there a way to open a sessionless window off of a session window?
0
Comment
Question by:kyo3eb
  • 8
  • 5
  • 5
  • +1
21 Comments
 
LVL 3

Expert Comment

by:Sleepyhead_NO
ID: 12033964
open a new window using anchor tag and target="_blank" or window.open() with Javascript.

In the page that opens in the new window, include this at the top:
<%@ EnableSessionState=False %>

http://support.microsoft.com/default.aspx?scid=kb;EN-US;244465
0
 
LVL 1

Author Comment

by:kyo3eb
ID: 12034022
well, here's the problem:

I have 4 links (names of each interface) that redirect to the same page (the login page) but since the user is already logged in the page instead of asking for user name and password it automatically redirects them to their interface.

I need to recreate the same effect as if you're double clicking the IE shortcut on the desktop but from a web page that already has a session started.

for a temp fix, I'm opening a new window with each link with instructions on what to do. but I'd still like to know if this is possible or not.
0
 
LVL 31

Accepted Solution

by:
alorentz earned 250 total points
ID: 12034085
>>I need to recreate the same effect as if you're double clicking the IE shortcut on the desktop but from a web page that already has a session started.

Not possible, each instance of IE, or any browser, is independent of any existing sesssion.  Only way to do it will be with cookies, and then the new windows will look for cookies instead of session values.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 31

Expert Comment

by:alorentz
ID: 12034966
Any progress?
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 12041519
if ur new application has different domains .. ie. even if the virtual directories r different, then it will create a new session for these applications .. but if r from the same domain, the session would be shared .. one way of doing what u require if the domains are same is to use session.abandon in ur code .. but this will abandon the session for the current application too ...
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 12041526
>>for a temp fix, I'm opening a new window with each link with instructions on what to do. but I'd still like to know if this is possible or not.

u could use this page to abandon the session and then redirect to the login page of the new applicaiton
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12042824
Rejojohny - please read the question more carefully....the question is "Can a session be maintained in a new instance of IE, or some browser."  You're answer has nothing to do with that...
0
 
LVL 1

Author Comment

by:kyo3eb
ID: 12072387
Actually alorentz, it's the total oppsite. Here's what I need:

-User logs into site
-user clicks on a link
-New window opens with a new session started.....


hmm....


I could probably use client script to open a new instance of internet explorer, problem is:

-what  if their default browser is Netscape (yuk!!!) or opera (yuk!!) or something worse.
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 12072431
kyo3eb,
just as i said .. using client scripts u could open a new window . but then if the new window opens a page in the same domain, then the session would be maintained .. so when the new window opens .. u have to write in ur server script "session.abandon"  .. this will abandon the current session .. but then it will abandon the session of the parent window too ...
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12073553
Yes, I know what you meant....and you cannot do that.  A session, as you know, is maintained throughout the existence of the session within the browser state.  

You can use session.abandon, like rejojohny stated.....but again, you will loose the entire session.

I guess I don't understand why you log in and then cancel the session.  Doesn't make sense.
0
 
LVL 1

Author Comment

by:kyo3eb
ID: 12077374
I'm not talking about logging in then canceling the session.

Let's say you open a window, you go to hotmail.com and you log in, you UNCHECK the "Sign me in automatically" checkbox and log in, if you go to your desktop and open the Internet explorer shortcut and go to hotmail again, it'll ask you to log in again preserving the 1st window session.

And that is EXACTLY what I'm looking for, I've always knew the session is passed onto child windows, I asked this question in case someone had figured out a way not to pass the session along child windows.

What I'm thinking of doing is use FileSystemObject to open their default browser, that's the same as doing it manually.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12077519
Well just to confirm your thought, it is not possible to open a sessionless window from a session window.  So, if you can get FSO to open the browser, or using shell script....that may work.

Good luck!
0
 
LVL 1

Author Comment

by:kyo3eb
ID: 12079800
well, since there's no solution to my request, what steps do I need to take, should I accept an answer or ask the moderator to close this question?
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12080313
I have seen moderators say in the past that NO is a valid answer.  Meaning, there may not be a way to solve your problem, and the answer is "you can't", but this is still a correct answer.  And remember the Experts here put time in voluntarily...

So, you can accept that you cannot do it, and accept an answer, OR post message to community support to have them close it.

Good luck with whatever you choose.
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 12083423
>> I asked this question in case someone had figured out a way not to pass the session along child windows.
again i say .. use session.abandon .. have u tried it and if not what is the problem with that?
0
 
LVL 3

Expert Comment

by:Sleepyhead_NO
ID: 12085989
session.abandon will abondon the session all together. It will not create a new session for the new window, which is what he wants here. As alorentz states, you cannot do this using window.open(). You have to manually open a new internet explorer window or use a client-side active-x script to execute Internet Explorer - but that will require the client to allow that script to execute.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12086043
Bingo!
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 12094415
>>It will not create a new session for the new window
what do u mean by create a new session? when a session is abandoned, a new session is started from that point automatically ...
0
 
LVL 3

Expert Comment

by:Sleepyhead_NO
ID: 12095491
yes, correct, but that is irrelevant. As alorentz said, please read the question (and the other comments) more carefully.
0
 
LVL 1

Author Comment

by:kyo3eb
ID: 12097595
chose answer, I chose based on facts. hope all of you agree.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 12098094
Glad to help...good luck!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question