471,595 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Help - how to have email URL link start new session?

In our .NET 1.1 ASP.NET application, I'm noticing some behavior that I
would like to change. If I open a web browser and manually copy and
paste a URL, then I get a new session ID (I check it by entering
javascript:document.cookie in the URL field to get the cookies for the
page). However, if I instead click on the same URL in an email link,
the browser that is opened will reuse the session ID if another browser
is already open to the application. Instead, I would like the click on
the URL to allow any existing session to remain but force a new session
for the newly opened browser. Is there anything I can setup in my
application to force this? In stepping through the code, I've noticed
that the Session_start event of the Global.asax is not fired when
clicking the URL in the email - in the web.config we have setting of
cookieless as false, and it needs to stay that way (I think the
SessionID resulting from the email URL click is pulled from the
cookie).

If anyone has suggestions on how to force the email URL click to create
a new session without closing any existing session, I would really
appreciate it.

Thanks in advance.

Dec 1 '06 #1
4 3217
Thanks for the reply, but I wouldn't have thought that if I have
Browser A logged in to an application, clicking a link in an email
within Outlook or a webmail in Browser B would consider Browser A a
'parent'. Also, I can't guarantee that the user will have IE on their
system, so forcing it to execute IE wouldn't be an option.
Eeraj wrote:
This is a bit tricky. Pop-ups will share the same session as the parent
window since they are in the same process space. I have not tested it, but
you may have to use a shell command from javascript in the parent window to
start a new internet explorer window in a separate process which will
generate a new session.

Depending on the security settings on the user's machine this may or may not
work.

Something on the lines of:

<SCRIPT LANGUAGE="JavaScript">
function openIE(var url)
{
var oShell = new ActiveXObject("Shell.Application");

var iePath = "iexplore.exe";

oShell.ShellExecute(iePath, url,....... );
}
</SCRIPT>

<untested code/>

Search for javascript shellexecute on google

- eeraj
=====
Dec 1 '06 #2
I have a link within an email that provides a URL to log in to our
application (the URL includes authentication information). Clicking on
that link in the email results in a new browser being opened. If the
user is already logged in to the application in an existing browser,
this newly opened browser reuses the session; instead, I want to force
the creation a new session and still leave the existing session active.

I have found that if instead of clicking on a link within the email if
I instead open up a new browser and paste the URL, a new session is
created.

What I'm trying to figure out is how I can have the click on the link
in the email result in creating a new session in the same way that
manually opening a new browser and pasting/typing in the URL does.

Thanks
Eeraj wrote:
I am not quite clear what your scenario is -

Are you talking about opening pop-ups or opening outlook by clicking on a
mailto: link in a browser and populating outlook's body with some formatted
HTML that contains a link which when clicked opens a browser window that
shares the same session with the original IE window.
Dec 1 '06 #3
I have the very same need. Users have the URL in an email. They want to
click on that URL in a new IE session. Currently, if the user has an IE
window open and they click on the URL, then the URL will display in the IE
window that is already open. I ned the URL to display in a new IE session so
that users would have two IE windows open.

Did you find a solution? If so, please post! Thanks!

"Nanker" wrote:
In our .NET 1.1 ASP.NET application, I'm noticing some behavior that I
would like to change. If I open a web browser and manually copy and
paste a URL, then I get a new session ID (I check it by entering
javascript:document.cookie in the URL field to get the cookies for the
page). However, if I instead click on the same URL in an email link,
the browser that is opened will reuse the session ID if another browser
is already open to the application. Instead, I would like the click on
the URL to allow any existing session to remain but force a new session
for the newly opened browser. Is there anything I can setup in my
application to force this? In stepping through the code, I've noticed
that the Session_start event of the Global.asax is not fired when
clicking the URL in the email - in the web.config we have setting of
cookieless as false, and it needs to stay that way (I think the
SessionID resulting from the email URL click is pulled from the
cookie).

If anyone has suggestions on how to force the email URL click to create
a new session without closing any existing session, I would really
appreciate it.

Thanks in advance.

Jan 13 '07 #4
Try adding Target=_new

Regards,
Brian K. Williams

"Lynda" <Ly***@discussions.microsoft.comwrote in message
news:AE**********************************@microsof t.com...
>I have the very same need. Users have the URL in an email. They want to
click on that URL in a new IE session. Currently, if the user has an IE
window open and they click on the URL, then the URL will display in the IE
window that is already open. I ned the URL to display in a new IE session
so
that users would have two IE windows open.

Did you find a solution? If so, please post! Thanks!

"Nanker" wrote:
>In our .NET 1.1 ASP.NET application, I'm noticing some behavior that I
would like to change. If I open a web browser and manually copy and
paste a URL, then I get a new session ID (I check it by entering
javascript:document.cookie in the URL field to get the cookies for the
page). However, if I instead click on the same URL in an email link,
the browser that is opened will reuse the session ID if another browser
is already open to the application. Instead, I would like the click on
the URL to allow any existing session to remain but force a new session
for the newly opened browser. Is there anything I can setup in my
application to force this? In stepping through the code, I've noticed
that the Session_start event of the Global.asax is not fired when
clicking the URL in the email - in the web.config we have setting of
cookieless as false, and it needs to stay that way (I think the
SessionID resulting from the email URL click is pulled from the
cookie).

If anyone has suggestions on how to force the email URL click to create
a new session without closing any existing session, I would really
appreciate it.

Thanks in advance.


Jan 15 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

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.