More in this section

Forums / Developing with Sitefinity / Error on first browser when logged out by new session on second browser

Error on first browser when logged out by new session on second browser

4 posts, 0 answered
  1. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    04 Dec 2011
    Link to this post
    If I am logged in on one computer as a certain user, then go to a new computer and new browser and log on as the same user and select the option to log out that user from other sessions, when I go back to the first browser, I get the below error (at least in SF 4.2)

    I think it's because the browser thinks it's logged in but the back-end session has been deleted.  Is this right?  And how do I fix it? Can't be throwing an error on the site just because of this.

    Thanks!

    Ben

    Server Error in '/' Application.

    Unable to cast object of type 'System.Web.Security.RolePrincipal' to type 'Telerik.Sitefinity.Security.SitefinityPrincipal'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Web.Security.RolePrincipal' to type 'Telerik.Sitefinity.Security.SitefinityPrincipal'.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [InvalidCastException: Unable to cast object of type 'System.Web.Security.RolePrincipal' to type 'Telerik.Sitefinity.Security.SitefinityPrincipal'.]
       Telerik.Sitefinity.Web.SiteMapBase.IsAccessibleToUser(HttpContext context, SiteMapNode node) +78
       Telerik.Sitefinity.Web.SitefinitySiteMap.IsAccessibleToUser(HttpContext context, SiteMapNode node) +19
       System.Web.SiteMapNode.IsAccessibleToUser(HttpContext context) +17
       Telerik.Sitefinity.Web.SitefinityRoute.CheckSecurity(HttpContextBase httpContext, PageSiteNode node) +40
       Telerik.Sitefinity.Web.SitefinityRoute.GetRouteData(HttpContextBase httpContext) +396
       System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +287
       System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +60
       System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +86
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    07 Dec 2011
    Link to this post
    Hello Ben Alexandra,

    Could you please provide some code for us so we could see what the problem might have been. I believe I understand the cause of the exception, but I'm not sure what to do in order to fix it unless I see some code.

    Regards,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    07 Dec 2011
    Link to this post
    There is no code.  Open 2 browsers (say FF & Chrome) to the same site and log in as a backend user in one, and once logged in browse around the site

    Then go to the second browser and log in as the same user.  When it asks if you want to log out the same user in the other browser, say yes.  

    Then go back to the first browser and try to keep browsing and you'll see that error message
  4. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    08 Dec 2011
    Link to this post
    Hi Ben Alexandra,

    I wasn't able to reproduce the issue. When I come back to the first browser I get the expected error message:

    "User already logged on a different computer"

    Could you give us more details about your setup - enabled JavaScript, cookeits, etc.

    Regards,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered