Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Kelly 7 posts 59 karma points
    Apr 06, 2016 @ 08:50
    Mike Kelly
    0

    Public Access controlled pages - How does this work in Umbraco 7.3.5

    I have a section of my site with is access controlled using Public Access with an individual user.

    On older versions of umbraco this was all handled by a file "App_Data/access.config", this no longer appears to be the case. And I can find anything documenting how it now works.

    I can see in the database we have 2 new tables

    • dbo.umbracoAccess

      • id
      • nodeId
      • loginNodeId
      • noAccessNodeId
      • createDate
      • updateDate
    • dbo.umbracoAccessRule

      • id
      • accessId
      • ruleValue
      • ruleType
      • createDate
      • updateDate

    When I add public access controls to a section of the site these tables are populated with the rules, and the login etc works fine.

    My issue is that when I need to amend the access (by selecting public access on the node) I get a yellow screen of death and in the logs I get

    2016-04-06 09:31:28,978 [P5984/D2/T63] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at umbraco.cms.businesslogic.CMSNode.get_Parent()
       at umbraco.uicontrols.TreePicker.BaseTreePicker.GetItemBreadcrumbs()
       at umbraco.uicontrols.TreePicker.BaseTreePicker.OnPreRender(EventArgs e)
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.umbraco_dialogs_protectpage_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\c298488d\d054834f\App_Web_protectpage.aspx.10695ae8.pw91drko.0.cs:line 0
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    As a work around I've deleted the records on the 2 tables (so I could reapply the password etc), but the pages are still showing as having public access set in the backoffice. Are there any other tables involved in this, the access.config file is empty and doesn't appear to be used at all anymore.

    Update

    I've now identified the other tables used for the access.

    • dbo.cmsMember2MemberGroup
    • dbo.cmsMember
    • dbo.umbracoAccess
    • dbo.umbracoAccessRule

    If you end up in the same situation as me with the error trying to amend the password on the pages you can clear these tables and restart the site to then be able to reapply the public access restrictions.

    To summarise the access.config file is no longer used for password protected pages, it's been moved to the database.

Please Sign in or register to post replies

Write your reply to:

Draft