Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

State management accross the application

Status
Not open for further replies.

silicon

Programmer
Aug 13, 2002
31
0
0
US
App_One(developed in asp.net 1.1 ,sessionState mode="InProc").
App_two is a phase2 of App_One need to be devloped in asp.net 2.0
So I want to know if a user login in App_One can use the App_Two and share the session,cokies etc(I mean state management) accross the application.
If both the application deployed on the same server.
Please let me the work arround or any code snipet will realy help me

Thanks in advance.

Regards,
Pits
 
Do you necessarily need two separate apps? If you create a .NET 2.0 "Web Application Project" (vs. a "Website Project") you can pretty much cut-and-paste all the files from App_One into App_Two's project, recompile, and you'll have a converted app that you can easily extend!

MCP, MCTS - .NET Framework 2.0 Web Applications
 
BoulderBum you r absolutely right but App_One is huge application and client is not ready to pay for the breaking changes required to migrate from 1.1 to 2.0 and also being an insurance application it run 24X7 and client is not ready for downtime and on the contrary the client wants the next phase to be developed with in 2.0 or 3.0
The only challenge is how to share the session across the application.
 
I see. Well, what you'll probably want to do is craft your own session state provider that has logic to resolve who your user is when they're browsing back and forth on the sites.

These two articles should get you started.


If they're going to let you use .NET 3.0 (which is really just extensions for 2.0, not a new version), and you are currently using In-Proc session state (which implies a single processor) then I'd consider having the back-end of the session state provider use a WCF service over IPC to maximize performance, while abstracting out a common service that each app's provider instance can call.

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Can i get all the session variables of App_One in my App_Two by writting the custom session state provider in App_Two and without disturbing the App_One.

Regards,
pits
 
The only thing you'd need to do to App_One is drop your session state provider into App_One's bin (or the GAC) and add a few lines of the web.config file. None of the code would change, and you wouldn't need to recompile/redeploy.

Any code referencing Session (e.g. "Session["MyVar"] = 1;") would then use your session state provider as the data store.

Adding the line to the web.config will restart the ASP.NET process and kill any active sessions, but having that minimimal amount of downtime is far, far preferable to any sort of solution where you try to hack the existing session state (which would be more complicated, less elegant, less secure, and potentially be unstable).

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top