473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Maintain session over browsers

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
Sep 25 '06 #1
6 1761
As far as I know, you would have to roll your own session state.

"Tarun Mistry" <no****@nospam.comwrote in message
news:uI**************@TK2MSFTNGP05.phx.gbl...
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

Sep 25 '06 #2
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)

"Tarun Mistry" <no****@nospam.comwrote in message
news:uI**************@TK2MSFTNGP05.phx.gbl...
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

Sep 25 '06 #3
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
Sep 25 '06 #4
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).
--
Patrice

"Tarun Mistry" <no****@nospam.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...
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

Sep 25 '06 #5
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
"Tarun Mistry" wrote:
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
Sep 26 '06 #6
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
Sep 26 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
This is a very open ended question. I have an app with a page that uses link buttons to change the display. On the prior page you have a list of objects. You click one of those objects to see it's...
14
by: Darrin J Olson | last post by:
I am trying to end a session for a site without having to completely close the browser to end it. When I access the site and log in it works fine. If I log out and in with a different account...
3
by: Terri | last post by:
Hi All, I'd like to build a series of pages with next and back buttons that a user could enter data in. I'd like the data to be maintained if for example the user goes from page1 to page2 and...
4
by: Chris | last post by:
When a request comes into a page on my ASP.net site and a session is not found, I want to detect whether the request is an initial request or if the user did have a session going that has now been...
5
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature....
8
by: KMZ_state | last post by:
We have a question here where a developer says that if the same user starts 2 instances of the application on his machine, the session variables may get mixed up b/c the session is PER IP ADDRESS. ...
3
by: Ned Balzer | last post by:
Hi all, I posted this question some time ago in an earlier thread but so far I still don't have an understanding of why this is happening or what I can do to fix it. I use Session variables,...
11
by: Joseph Geretz | last post by:
I've been looking at two approaches for the maintenance of Session state for a Web Service application. One approach uses the old familiar Session object which I've used in the past for Web...
2
by: anjaligoel | last post by:
Good morning for everyone please anyone tell me tht how can i maintain the session through javascript i found that we can use cookies in javascript but can we maintain session in it. currently...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.