Copied to clipboard

Flag this post as spam?

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


  • Jon Davis 16 posts 109 karma points
    Sep 30, 2020 @ 02:02
    Jon Davis
    1

    Public Access Dialog Error after Upgrade 7.12.3 => 7.15.6

    I'm trying to upgrade an Umbraco site from 7.12.3 => 7.15.6 and .NET 4.6.2 => 4.7.2 The site runs on a Web App in Azure. I'm developing on Visual Studio Community v15.9.25.

    I've got an branch where I've upgraded step by step through each version and the site is running fine on my machine on version 7.15.6. But I'm running into problems when testing the updates in Azure. Here's what I've done:

    Create a new deployment slot in Azure. Point it to a fresh copy of our production database and to the upgrade branch. The site builds and deploys fine. I can visit pages on the site and the content looks good. I can create content in the Back Office. Everything seems to be working fine except for the Public Access dialog.

    When I access "Public Access" dialog for a page, I can pick Single user protection or Role base protection. But as soon as I click the green "Select" button, I get the YSOD with this error:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.presentation.umbraco.dialogs.protectPage.selectMode(Object sender, EventArgs e) +33
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9784114
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +211
     System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1696
    

    The trace logs provide a bit more detail:

    2020-09-29 01:52:11,117 [P3960/D4/T10] 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.presentation.umbraco.dialogs.protectPage.selectMode(Object sender, EventArgs e)
       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       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)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    Here's what I've tried:

    Republishing the entire site

    Doing a hard refresh in Chrome while in the back office

    Rebuilding indexes

    Run the XML Data Integrity Tool

    Open and save all existing Member Groups

    I'm not getting this error when running from Visual Studio, just in Azure. Any ideas as to what's going on? Thanks for any help!

    Here's a screenshot of the YSOD: enter image description here

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Sep 30, 2020 @ 09:36
    Dave Woestenborghs
    1

    Hi Jon,

    Seeing you are not experiencing could you check the following

    Is the contents of the file /umbraco/dialogs/protectPage.aspx on azure the same as this : https://github.com/umbraco/Umbraco-CMS/blob/v7/dev/src/Umbraco.Web.UI/umbraco/dialogs/protectPage.aspx

    Dave

  • Jon Davis 16 posts 109 karma points
    Oct 01, 2020 @ 11:38
    Jon Davis
    1

    Hi Dave,

    Thanks for the response.

    No, the contents of file /umbraco/dialogs/protectPage.aspx are not the same on Azure as the latest version in github.

    I copied the version of protectPage.aspx from github into the source file Azure, redeployed and now it's working fine.

    We do not track the Umbraco files in source control, so whatever version of protectPage.aspx is added to the source files in Azure must be coming from the package restore process in Azure. Any ideas on what could be causing this?

    .csproj in Azure indicates the correct version of Umbraco.Web.UI:

    <Reference Include="Umbraco.Web.UI, Version=1.0.7537.31678, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\packages\UmbracoCms.Core.7.15.6\lib\net452\Umbraco.Web.UI.dll</HintPath>
    </Reference>
    

    All Umbraco references in .csproj are targeting 7.15.6.

    Thanks again,

    Jon

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Oct 01, 2020 @ 14:11
    Dave Woestenborghs
    1

    We always exclude the /umbraco folder from source control as well.

    Maybe something is configured in your build pipeline to not overwrite existing files on deploy.

    Our build restores all nuget packages and than overwrites all files.

    Dave

  • Jon Davis 16 posts 109 karma points
    Oct 04, 2020 @ 22:30
    Jon Davis
    0

    Maybe something is configured in your build pipeline to not overwrite existing files on deploy.

    Yep, that was the issue. None of the files in the Umbraco or the Umbraco_client folder had been updated. I did some more digging and this issue was the culprit:

    https://issues.umbraco.org/issue/U4-10183

    I deleted the Umbraco and Umbraco_client folders from Azure, redeployed, and the contents of those folders were overwritten with the most recent version.

    Thanks again for your help with his.

Please Sign in or register to post replies

Write your reply to:

Draft