Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / October 2005

Tip: Looking for answers? Try searching our database.

asp.net session changes when hyperlink from Office in "New IE Window"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marty Spallone - 15 Sep 2005 18:40 GMT
Problem with saving session variables of you hyperlink into your site to
a gateway page and then redirect to another page.

I have an asp.net application and have a gateway page that accepts
querystring parameters that I save in Session and then redirect to
another page.  That works fine except when opening a new window from a
hyperlink inside an office document like Word or Excel.  What happens is
that you get another session and when you redirect, the session changes
back to the previous session.  I thought that if you opened a new window
within the same IE process - you would share session state, but
apparently start_session is called and you cannot rely on the session
being the same.  

We don't like to show the querystring in the URL so I have no way of
passing per user info around unless I save it in cache.

The first issue I have is that this behavior is never documented
anywhere and that developers have mostly assumed that a new browser
window would share the session object.

And since I would like to sue a Web Farm, the data cache is not the
ideal solution and I need to be authenticated to have a per user key to
store in teh first place.

So there's no real solution other than to pass the querystring around
until its handled - except we are using frames and server.transfer
everywhere and the URL looks old and confusing to users.

Any ideas ?
thanks
Marty
Venkat_KL - 07 Oct 2005 06:49 GMT
Hi Dear Marty Spallone,

You can use the either StateServer or SqlServer to maintain the Session
State across

ASP.NET supports three modes of session state:

• InProc: In-Proc mode stores values in the memory of the ASP.NET worker
process. Thus, this mode offers the fastest access to these values. However,
when the ASP.NET worker process recycles, the state data is lost.

• StateServer:
=========
Alternately, StateServer mode uses a stand-alone Microsoft Windows service
to store session variables. Because this service is independent of Microsoft
Internet Information Server (IIS), it can run on a separate server. You can
use this mode for a load-balancing solution because multiple Web servers can
share session variables. Although session variables are not lost if you
restart IIS, performance is impacted when you cross process boundaries.

• SqlServer:
=======
If you are greatly concerned about the persistence of session information,
you can use SqlServer mode to leverage Microsoft SQL Server to ensure the
highest level of reliability. SqlServer mode is similar to out-of-process
mode, except that the session data is maintained in a SQL Server. SqlServer
mode also enables you to utilize a state store that is located out of the IIS
process and that can be located on the local computer or a remote server.
Note You can use all three modes with in-memory cookie or cookieless session
ID persistence.

StateServer
=======
Indicates that session state is stored on a remote server.

sqlConnectionString
----------------------
Specifies the connection string for a SQL Server. For example, "data
source=localhost;Integrated Security=SSPI;Initial Catalog=northwind". This
attribute is required when mode is SQLServer.

you just go through this link

HOW TO: Configure SQL Server to Store ASP.NET Session State
http://support.microsoft.com/kb/317604/

HOW TO: Configure ASP.NET for Persistent SQL Server Session State Management
http://support.microsoft.com/kb/311209/EN-US/

************************************************************
StateServer
========
Indicates that session state is stored on a remote server.

stateConnectionString
-------------------------
Specifies the server name and port where session state is stored remotely.
For example, "tcpip=127.0.0.1:42424". This attribute is required when mode is
StateServer.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.