Launching an asp.net application

S

sebastien

Hi
I have an asp.net application that use Session variables.
What I want to do is to launch an second instance of this application
by a link inside the first application.
The problem is: when I launch the second application, this second
application override the session variables values of the first
application.
I can run 2 instances of my asp.net application if I open two browsers
and I enter the url of my web application in the address bar. So, it's
possible to have 2 instances of the same web application but how
launch the second one by I link inside the first one.

Thanks
 
K

Kevin Spencer

There is only one instance of the application. You are launching two BROWSER
instances. The application resides on the server. What you're describing is
separate Client Sessions.

If you can describe what you're trying to accomplish with this, I think
someone here can give you a workable solution.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
A

ashelley

There is only one instance of the application. You are launching two BROWSER
instances. The application resides on the server. What you're describing is
separate Client Sessions.

If you can describe what you're trying to accomplish with this, I think
someone here can give you a workable solution.

you could easily fake two sessions. use a hidden form variable on the
pages and prefix the session values with it.

Session["hiddenformvalue_" + "myUserState"]

So same session but more than one set of variables.

-Adam
 
S

Sebastien Forest

What I trying to do is create an IETM (Interactive Electronic Technical
Manual) web based. I use the session variables to keep the information
about the book, the collection, the chapter etc.
Inside books you have link to another book. This link must be open into
another browser because the user need to have these two books on the
screen at the same time. Each book has a it's own browser.
Is it possible to have two separate client sessions for the same
application for the same user? Launching a second browser with a
different session ?



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
A

ashelley

What I trying to do is create an IETM (Interactive Electronic Technical
Manual) web based. I use the session variables to keep the information
about the book, the collection, the chapter etc.
Inside books you have link to another book. This link must be open into
another browser because the user need to have these two books on the
screen at the same time. Each book has a it's own browser.
Is it possible to have two separate client sessions for the same
application for the same user? Launching a second browser with a
different session ?

you can't rely on sessions like this. You will have to architect the
application differently. Why not prefix the name of the session
variables?

-adam
 
B

bruce barker

use cookieless sessions. then the link to the new browser window will create
a new session (fully qualify the url so its is no decorated with the session
id)

-- bruce (sqlwork.com)
 
K

Kevin Spencer

Hi Sebastian,

Session variables have a nasty tendancy to time out, and are unreliable for
what you're describing (since you are talking about technical documents that
the reader may keep open for a long time). I would suggest opening the new
window using a QueryString that contains the information you are talking
about storing in Session. Another alternative would be to have the child
window "query" the parent window using JavaScript. In the child window, the
parent window can be referenced in JavaScript as "opener." In other words,
you're probably best off having the windows keep track of one another on the
client side.

If you need to persist this data across PostBacks, you can put it into a
hidden form field on the Page. This can also be done using client-side
JavaScript. Once the Page is posted back, you could even add it to the
ViewState.

Sessions may often seem like the easiest way to do things. However, ASP.Net
is designed with the recognition that Sessions have their drawbacks, and
therefore, includes a number of alternative methods for persisting state.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top