XAF/XPO application.
Related to "Use Multiple browser tabs for the same XAF Web Application" @ http://www.devexpress.com/issue=Q366471.
When you use multiple tabs the context (session) is the same (basically you see the same screen).
If you open the application in another browser (like Firefox if you used IE before - or the other way around) then you see a new context (session).
Both sessions appear to be working fine next to each other on the same machine in different browsers.
Also when you start private browsing (Ctrl-Shift-P) you get a new context (session).
It also appears to be working fine next next to the other sessions.
It look like the Session Id is located in a cookie (named ASP.NET_SessionId).
Question:
Is it possible to force a new Session Id in a separate cookie for every tab?
So a new context (session) is created?
Will this be the only technical challenge?
In other words once a browser/tab has a new session everything will be working fine?
Having an application that can only have ope screen open at a time would be a no-go for our sales.
We have closed this ticket because another page addresses its subject:
Web - How to open any hyperlink in a new or tabbed browser window and continue working with the opened application View independently
Sorry, this should be a Question not a Bug Report.
Hi Simon,
We need some time to research this. Please note that with this solution each tab will cost you additional memory on the server (since each tab will function as a separate XAF application).
Thanks,
Dennis
Hhmmmm, yes you are right about the RAM.
But I think I have to succumb to the sales arguments.
Thank you for the feedback, Simon.
Dennis
Hello Simon,
Thank you for your patience.
We have spent several hours researching how to implement this, but I regret to inform you that there is no easy way to do this with the current XAF Web UI architecture. The problem is that there are many places in our code where we store something in session variables:
D:\2011.2\XAF\DevExpress.ExpressApp.Web\Core\SessionInstanceHolder.cs(76):// get { return (T)HttpContext.Current.Session[GetHashCode().ToString()]; }
D:\2011.2\XAF\DevExpress.ExpressApp.Web\Core\SessionInstanceHolder.cs(77):// set { HttpContext.Current.Session[GetHashCode().ToString()] = value; }
D:\2011.2\XAF\DevExpress.ExpressApp.Web\Editors\Standard\GridListEditor.cs(42): grid.Page.Session[GridSessionStateKey] = sorting;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\Editors\Standard\GridListEditor.cs(46): string value = (string)grid.Page.Session[GridSessionStateKey];
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(191): if(HttpContext.Current != null && HttpContext.Current.Session[UserDiffKey] != null) {
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(192): string data = HttpContext.Current.Session[UserDiffKey] as string;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(209): HttpContext.Current.Session[UserDiffKey] = data;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(215): //string valueToStore = HttpContext.Current.Session[UserDiffKey] as string;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(244): // if(HttpContext.Current != null && HttpContext.Current.Session[UserDiffKey] != null) {
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(246): // string data = HttpContext.Current.Session[UserDiffKey] as string;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(267): // HttpContext.Current.Session[UserDiffKey] = data;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\StateStore.cs(272): // string valueToStore = HttpContext.Current.Session[UserDiffKey] as string;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebApplication.cs(522): WebApplication instance = session[SessionApplicationVariable] as WebApplication;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebApplication.cs(596): if(session[SessionApplicationVariable] != null) {
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebApplication.cs(597): WebApplication webApplication = (WebApplication)session[SessionApplicationVariable];
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebApplication.cs(603): session[SessionApplicationVariable] = null;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebApplication.cs(629): session[SessionApplicationVariable] = application;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebApplication.cs(791): return (WebApplication)HttpContext.Current.Session[SessionApplicationVariable];
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebModelMultipleMasterStore.cs(42): //Dictionary<ModelNode, ModelMultipleMasterStoreItem> result = session[WebModelMultipleMasterStoreName] as Dictionary<ModelNode, ModelMultipleMasterStoreItem>;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebWindow.cs(470): HttpContext.Current.Session["XAF_CurrentRequestWindow"] = window;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebWindow.cs(475): HttpContext.Current.Session["XAF_CurrentRequestPage"] = page;
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebWindow.cs(515): return (Page)HttpContext.Current.Session["XAF_CurrentRequestPage"];
D:\2011.2\XAF\DevExpress.ExpressApp.Web\WebWindow.cs(525): return (WebWindow)HttpContext.Current.Session["XAF_CurrentRequestWindow"];
Having said that and since for the result you expected it is necessary to store several WebApplication instances in the session, complex routing of session variables will be required, and it cannot be accomplished without significant changes to our code.
We also tried to use cookieless sessions as described in the next two articles, but to no avail:
http://msdn.microsoft.com/en-us/library/aa479314.aspx
http://www.codeproject.com/Articles/2796/Cookieless-ASP-NET-forms-authentication
However, you can try to a apply a solution at the browser level, but it is a rather limited solution as it limits you to the use of Internet Explorer only:
http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/15133622-6bfb-4cb8-8deb-0fa27f6ea0b2/
Thanks,
Dennis