Maintain session over browsers

T

Tarun Mistry

Hi everyone,

thought my current testing, it seems a new session is opened for a user per
browser window. I would like my sessions to track based on the machine, i.e.
once per machine.

What would I need todo to enable this functionality?

Kind regards everyone
Taz
 
B

bruce barker \(sqlwork.com\)

you would need some way to identify the machine. if you are on a local lan
and no proxy is used, you could tie your sessions to the ipaddress, rather
an a browser cookie. if its an internet/extranet app you will need an
active/x control to get a machine id.

-- bruce (sqlwork.com)
 
T

Tarun Mistry

Hi guys,

thanks for the replies.

I'm unsure if im doing something wrong here, however I come from a PHP
background, here, PHP only writes 1 session per hostname/ipaddress.

In a php application, if I open 3 browsers pointing to a page session.php,
they will all contain reference to the same session. However if I open 3
browsers to session.aspx, they will all contain 3 different sessions. I am
trying to get functionality that is similar to PHP, is this possible? Should
I be looking at directly manipulating the cookie instead?

Thanks everyone.
Taz
 
P

Patrice

You could try a cookieless session.

By default ASP/ASP.NET uses a temporary cookie to handle session. The
behavior for windows used opened explicittely by the user is client side
depended (i.e. depends wether cookies are shared or not between those
windows).

A cookieless session (enabled in web.config) would likely allow to overcome
this problem (as the URL includes the information needed to establish the
session). A custom provider could also be a possible solution.

The exact scenario may help (you could have perhaps some other solution that
opening 3 browsers to point to these pages ?). For example when someone
needs to connect multiple times to the same application, I would see if it
could be built in in to the application (for application as in a mail
application that allows to have a mail box managed by those you'll add in an
access list).
 
G

Guest

Sessions are opened per browser instances, and they are completely separate.
If you are using ASP.NET 2.0, you can use Profile Services Feature instead.
and if you are not storing objects, you can use cookies
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
 
H

Hans Kesting

Hi everyone,
thought my current testing, it seems a new session is opened for a user per
browser window. I would like my sessions to track based on the machine, i.e.
once per machine.

What would I need todo to enable this functionality?

Kind regards everyone
Taz

If you open a new IE window with Ctrl-N (or File|New|Window), then the
windows will share the cookies and therefore the sessions.
If you open a new IE window by clicking the "e" in the quicklaunch
panel, then it is a separate instance with a different set of cookies
(and thus sessions).
How FireFox or other browsers react in this case, I don't know.

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top