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)
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()
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.
Request StartedPOST /EPiServer/CMS/edit/mysettings.aspx
Primary Handler (ASP.NET Web Forms)
Page.PerformPreInit
SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity
SqlCommand.ExecuteReaderAsync SELECT AspNetUsers, Records: 1
SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity
SqlCommand.ExecuteReaderAsync SELECT AspNetUserClaims, Records: 0
SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity
SqlCommand.ExecuteReaderAsync SELECT AspNetUserLogins, Records: 0
SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity
SqlCommand.ExecuteReaderAsync SELECT AspNetUserRoles, Records: 18
SqlConnection.OpenAsyncvar-t-app01 | DressmannTestIdentity
SqlCommand.ExecuteReaderAsync SELECT AspNetUsers, Records: 1