CMS - My Settings - Display Options - Reset Views with Identity crashed

Vote:
 

This may be related to the problem that I posted in this thread: https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2018/9/cms-admin-create-user-with-identity/

This is the second problem that I encountered in my midration from Membership to MsIdentity. Going to

CMS -> My Settings -> Display Options -> Reset Views

results in a crash.

Looking at decompilation of EPiServer.UI.Edit, the _username global variable is not set in UserGuiSettings OnInit()

            if (this.IsRunningStandalone)
            {
                this._username = this.Page.User.Identity.Name;
                this.SaveLanguageSetting.Visible = true;
                this.LoadSettings(this._username, EPiServerProfile.Get(this._username));
            }

Here is the stack trace and the Prefix execution trace. Note that MsIdentity tables are in use.

I am going to look further into the problem, but hopefully someone else encountered and solved it before me.

  • 4
    0

    Request StartedPOST /EPiServer/CMS/edit/mysettings.aspx

  • 88
    4

    Primary Handler (ASP.NET Web Forms)

    • 0
      5

      Page.PerformPreInit

    • 0
      17

      SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity

    • 13
      18

        SqlCommand.ExecuteReaderAsync SELECT AspNetUsers, Records: 1

    • 0
      32

      SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity

    • 1
      33

        SqlCommand.ExecuteReaderAsync SELECT AspNetUserClaims, Records: 0

    • 0
      35

      SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity

    • 1
      35

        SqlCommand.ExecuteReaderAsync SELECT AspNetUserLogins, Records: 0

    • 0
      37

      SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity

    • 1
      37

        SqlCommand.ExecuteReaderAsync SELECT AspNetUserRoles, Records: 18

    • 0
      40

      SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity

    • 11
      41

        SqlCommand.ExecuteReaderAsync SELECT AspNetUsers, Records: 1

1.2.5 Unhandled exception in ASP.NET
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: username
   at EPiServer.Security.Internal.DefaultUserImpersonation.CreatePrincipal(String username)
   at EPiServer.UI.Edit.UserGuiSettings.ResetView_Click(Object sender, EventArgs e)
   at EPiServer.UI.WebControls.ToolButton.OnClick(EventArgs e)
   at EPiServer.UI.WebControls.ToolButton.RaisePostBackEvent(String eventArgument)
   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.ProcessRequest(HttpContext context)
   at ASP.episerver_cms_edit_mysettings_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\c1d4f88c\c392ca0e\App_Web_omrxeasw.1.cs:line 0
   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)



#196553
Edited, Sep 04, 2018 10:02
Vote:
 

Solved by re-ebaling profile section in web.config:

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2018/9/cms-admin-create-user-with-identity/

#196571
Sep 04, 2018 16:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.