For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > August 2004 > twice same SessionID









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author twice same SessionID
Samuel

2004-08-30, 3:59 pm

Hi,

I have a Web application developed using C#.
On one of the page, I open the same application (with a link). using a
second instance of IE.
I become the same SessionID for both IE.
How can I avoid this problem?

tia
Samuel

Curt_C [MVP]

2004-08-30, 3:59 pm

If it's opened from the same session it is the same session....
Why wouldnt you want it to be? Have the user open a second IE from the
shortcut/icon

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Samuel" <Samuel@discussions.microsoft.com> wrote in message
news:D9966F64-62B0-4BD5-B478-29FB41748205@microsoft.com...
> Hi,
>
> I have a Web application developed using C#.
> On one of the page, I open the same application (with a link). using a
> second instance of IE.
> I become the same SessionID for both IE.
> How can I avoid this problem?
>
> tia
> Samuel
>



Samuel

2004-08-30, 3:59 pm

Hi Curt,

We have a page with all clients as links. The administrator of the
appplication has the possibilty to logg himself with the customer's login.
To do it we opened an new instance of IE with our identification page. We
give as parameters the encrypted loginname and pwd. It opens the application
without giving manuelly this information.
In this case I have two instances of IE (and two different loggin) get the
same SessionID.
When I come back to my first instance. I have the session variables for the
second one.

Samuel


"Curt_C [MVP]" wrote:

> If it's opened from the same session it is the same session....
> Why wouldnt you want it to be? Have the user open a second IE from the
> shortcut/icon
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Samuel" <Samuel@discussions.microsoft.com> wrote in message
> news:D9966F64-62B0-4BD5-B478-29FB41748205@microsoft.com...
>
>
>

Lucas Tam

2004-08-30, 3:59 pm

=?Utf-8?B?U2FtdWVs?= <Samuel@discussions.microsoft.com> wrote in
news:644FEFF9-3D66-4B94-9042-C55A3A6DCDB7@microsoft.com:

> In this case I have two instances of IE (and two different loggin) get
> the same SessionID.
> When I come back to my first instance. I have the session variables
> for the second one.


Unfortunately this is how IE or any other browser works. You'll need to
shut down IE and restart it.

You can try using cookieless sessions - that may fix the problem since the
session ID will be tagged in the query string.

--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
Cowboy \(Gregory A. Beamer\) [MVP]

2004-08-30, 3:59 pm

Use two different browsers. By default, IE will look for a server cookie and
use that ID to send back to the server. No matter how many instances you
open, the server cookie will still show you logged in. The conversation goes
like this:

Browser: Let me see, I am contacting www.mysite.com. Oh, look, I have a
server cookie for that site.
Server: Oh, I see you already have a server cookie. Great, Mr.
Administrator. What, you want to log on as a client? Ok, shut down your
browser instance and log on separately. You can then shut down and log on as
you once again when you are finished.
Browser: But I want to be two people at the same time.
Server: Schizophrenia is a disease, man!

OK, so they don't really have this conversation, but the theory behind the
conversation is sound. The browser matches server cookies (session cookies)
by either IP or site name and will automatically send the cookie for that
server. If the server can unpack it (unencrypt), it will see you as that
session, unless it has timed out. This is true no matter how many instances
you have open.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

****************************************
********
Think Outside the Box!
****************************************
********
"Samuel" <Samuel@discussions.microsoft.com> wrote in message
news:D9966F64-62B0-4BD5-B478-29FB41748205@microsoft.com...
> Hi,
>
> I have a Web application developed using C#.
> On one of the page, I open the same application (with a link). using a
> second instance of IE.
> I become the same SessionID for both IE.
> How can I avoid this problem?
>
> tia
> Samuel
>



Handi

2004-08-30, 3:59 pm

I think you can not avoidit. but you can save your first session in database
or disk file, and then open the 2nd IE window, before back to 1st window,
restore the value from database. good luck!

"Samuel" wrote:

> Hi,
>
> I have a Web application developed using C#.
> On one of the page, I open the same application (with a link). using a
> second instance of IE.
> I become the same SessionID for both IE.
> How can I avoid this problem?
>
> tia
> Samuel
>

Samuel

2004-08-31, 3:57 am

Thanks a lot for your help

Samuel


"Samuel" wrote:

> Hi,
>
> I have a Web application developed using C#.
> On one of the page, I open the same application (with a link). using a
> second instance of IE.
> I become the same SessionID for both IE.
> How can I avoid this problem?
>
> tia
> Samuel
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com