How to Maintain Sessions between applications - DOTNET
This is a discussion on How to Maintain Sessions between applications - DOTNET ; Hi,
I have two applications (websites) which are deployed in a Web farm with SQL Server as state server.Now both the websites are launched from a common page (so the session id should be same).
When the user clicks on ...
-
How to Maintain Sessions between applications
Hi,
I have two applications (websites) which are deployed in a Web farm with SQL Server as state server.Now both the websites are launched from a common page (so the session id should be same).
When the user clicks on a particular link on one website, it needs to be redirected to the other site along with the session data. How is it possible?
ps: The session related logic is written in another project (class library) which is common to both the websites.
EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorials...l-view-vi.aspx
-
Re: How to Maintain Sessions between applications
On Sep 25, 8:08 am, Moin Syed wrote:
> Hi,
>
> I have two applications (websites) which are deployed in a Web farm with SQL Server as state server.Now both the websites are launched from a commonpage (so the session id should be same).
>
> When the user clicks on a particular link on one website, it needs to be redirected to the other site along with the session data. How is it possible?
>
> ps: The session related logic is written in another project (class library) which is common to both the websites.
>
> EggHeadCafe - Software Developer Portal of Choice
> WPF And The Model View View Model Patternhttp://www.eggheadcafe.com/tutorials/aspnet/ec832ac7-6e4c-4ea8-81ab-7...
Use StateServer mode, which stores session state in a separate process
called the ASP.NET state service. This ensures that session state is
preserved if the Web application is restarted and also makes session
state available to multiple Web servers in a Web farm.
http://idunno.org/articles/277.aspx
-
Re: How to Maintain Sessions between applications
On Sep 25, 8:25 am, Alexey Smirnov <alexey.smir...atgmaildotcom> wrote:
> On Sep 25, 8:08 am, Moin Syed wrote:
>
> > Hi,
>
> > I have two applications (websites) which are deployed in a Web farm with SQL Server as state server.Now both the websites are launched from a common page (so the session id should be same).
>
> > When the user clicks on a particular link on one website, it needs to be redirected to the other site along with the session data. How is it possible?
>
> > ps: The session related logic is written in another project (class library) which is common to both the websites.
>
> > EggHeadCafe - Software Developer Portal of Choice
> > WPF And The Model View View Model Patternhttp://www.eggheadcafe.com/tutorials/aspnet/ec832ac7-6e4c-4ea8-81ab-7...
>
> Use StateServer mode, which stores session state in a separate process
> called the ASP.NET state service. This ensures that session state is
> preserved if the Web application is restarted and also makes session
> state available to multiple Web servers in a Web farm.
>
> http://idunno.org/articles/277.aspx
Also, you could save state in an Sql server database if you need more
scalability or better performance.
http://support.microsoft.com/kb/311209
-
Re: How to Maintain Sessions between applications
session is unique by website (the siteid is part of the key), so each
website has its own session and sessionid's.
you will need to supply a new session manager of your own. you will need
to change the session cookie logic to use a common domain path to store
the sessionid, and then change the session logic to use this cookie to
lookup session data.
note: asp.net queues requests that access the same session, via session
locking. you will have to be sure to implement the locking correctly.
-- bruce (sqlwork.com)
Moin Syed wrote:
> Hi,
>
> I have two applications (websites) which are deployed in a Web farm with SQL Server as state server.Now both the websites are launched from a common page (so the session id should be same).
>
> When the user clicks on a particular link on one website, it needs to be redirected to the other site along with the session data. How is it possible?
>
> ps: The session related logic is written in another project (class library) which is common to both the websites.
>
> EggHeadCafe - Software Developer Portal of Choice
> WPF And The Model View View Model Pattern
> http://www.eggheadcafe.com/tutorials...l-view-vi.aspx
-
Re: How to Maintain Sessions between applications
Moin Syed wrote in news:20099252846moindearatgmaildotcom:
> Hi,
>
> I have two applications (websites) which are deployed in a Web farm
> with SQL Server as state server.Now both the websites are launched
> from a common page (so the session id should be same).
Wrong. Session id is application specific. Or, more directly, cookie
dependent.
If you set the machine keys identical, and you set up the same name for
the <forms> tag on both machines, you can share a single sign on,
however. <more>
> When the user clicks on a particular link on one website, it needs to
> be redirected to the other site along with the session data. How is it
> possible?
Session data will have to be stored to be picked up by the other
application. You cannot use the session variables in the other app, even
if you set it up for single sign on. If anyone knows a way around this,
they need to post, as I have yet to figure a way around this.
The only way I know to share session is have all of the 'applications'
in a single web site.
> ps: The session related logic is written in another project (class
> library) which is common to both the websites.
You can persist off the values of hte objects and then reconstitute.
peace and race,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com
My vacation and childhood cancer awareness site:
http://www.crazycancertour.com
*******************************************
| Think outside the box! |
*******************************************
-
Re: How to Maintain Sessions between applications
Alexey Smirnov <alexey.smirnovatgmaildotcom> wrote in
news:498185a5-0a11-41c7-86a5-00b483aed64aato21g2000vbldotgooglegroups.com:
> Use StateServer mode, which stores session state in a separate process
> called the ASP.NET state service. This ensures that session state is
> preserved if the Web application is restarted and also makes session
> state available to multiple Web servers in a Web farm.
>
> http://idunno.org/articles/277.aspx
Does that work across applications? I have not tried this since 1.x, so
this is a sincere question. In 1.x, I could share a single cookie (name
under <forms>) in multiple apps, but I could not do this:
string foo = Session["foo"];
Storing session in SQL server will overcome a temporary application
stopage, so I agree with that, but one of the OPs needs was sharing
session amongst various apps.
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com
My vacation and childhood cancer awareness site:
http://www.crazycancertour.com
*******************************************
| Think outside the box! |
*******************************************