November Happy Hour will be moved to Thursday December 5th.

MySettings page is crashing

Vote:
 

I'm having issues regarding My Settings page in Epi. This page seems to be working normally but after some time it starts throwing exceptions (500). After restarting application pool in IIS it again works correctly but after some time it crashes again.

Below is exception:

{
  "_index": "log-webapps-external-2022.10",
  "_type": "logevent",
  "_id": "u-5rFIQBXrtNk3Bd48Oo",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2022-10-26T15:12:05.1507940+02:00",
    "level": "Error",
    "messageTemplate": "Unhandled exception in ASP.NET\r\nSystem.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentNullException: Value cannot be null.\r\nParameter name: resourceKey\r\n   at EPiServer.Framework.Validator.ThrowIfNullOrEmpty(String name, String value)\r\n   at EPiServer.Framework.Localization.LocalizationService.GetStringByCulture(String resourceKey, FallbackBehaviors fallbackBehavior, String fallback, CultureInfo culture)\r\n   at EPiServer.Framework.Localization.LocalizationService.GetStringByCulture(String resourceKey, String fallback, CultureInfo culture)\r\n   at EPiServer.UI.WebControls.TabStrip.LoadPlugIns()\r\n   at EPiServer.UI.WebControls.TabStrip.OnInit(EventArgs e)\r\n   at System.Web.UI.Control.InitRecursive(Control namingContainer)\r\n   at System.Web.UI.Control.InitRecursive(Control namingContainer)\r\n   at System.Web.UI.Control.AddedControl(Control control, Int32 index)\r\n   at System.Web.UI.Control.EnsureChildControls()\r\n   at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.HandleError(Exception e)\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.ProcessRequest()\r\n   at System.Web.UI.Page.ProcessRequest(HttpContext context)\r\n   at ASP.episerver_cms_edit_mysettings_aspx.ProcessRequest(HttpContext context)\r\n   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()\r\n   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)",
    "message": "Unhandled exception in ASP.NET\r\nSystem.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentNullException: Value cannot be null.\r\nParameter name: resourceKey\r\n   at EPiServer.Framework.Validator.ThrowIfNullOrEmpty(String name, String value)\r\n   at EPiServer.Framework.Localization.LocalizationService.GetStringByCulture(String resourceKey, FallbackBehaviors fallbackBehavior, String fallback, CultureInfo culture)\r\n   at EPiServer.Framework.Localization.LocalizationService.GetStringByCulture(String resourceKey, String fallback, CultureInfo culture)\r\n   at EPiServer.UI.WebControls.TabStrip.LoadPlugIns()\r\n   at EPiServer.UI.WebControls.TabStrip.OnInit(EventArgs e)\r\n   at System.Web.UI.Control.InitRecursive(Control namingContainer)\r\n   at System.Web.UI.Control.InitRecursive(Control namingContainer)\r\n   at System.Web.UI.Control.AddedControl(Control control, Int32 index)\r\n   at System.Web.UI.Control.EnsureChildControls()\r\n   at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.HandleError(Exception e)\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.ProcessRequest()\r\n   at System.Web.UI.Page.ProcessRequest(HttpContext context)\r\n   at ASP.episerver_cms_edit_mysettings_aspx.ProcessRequest(HttpContext context)\r\n   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()\r\n   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)",
    "exceptions": [
      {
        "Depth": 0,
        "ClassName": "System.Web.HttpUnhandledException",
        "Message": "Exception of type 'System.Web.HttpUnhandledException' was thrown.",
        "Source": "System.Web",
        "StackTraceString": "   at System.Web.UI.Page.HandleError(Exception e)\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\r\n   at System.Web.UI.Page.ProcessRequest()\r\n   at System.Web.UI.Page.ProcessRequest(HttpContext context)\r\n   at ASP.episerver_cms_edit_mysettings_aspx.ProcessRequest(HttpContext context)\r\n   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()\r\n   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": {
          "Name": "HandleError",
          "AssemblyName": "System.Web",
          "AssemblyVersion": "4.0.0.0",
          "AssemblyCulture": "",
          "ClassName": "System.Web.UI.Page",
          "Signature": "Boolean HandleError(System.Exception)",
          "MemberType": 8
        },
        "HResult": -2147467259,
        "HelpURL": null
      },
      {
        "Depth": 1,
        "ClassName": "System.ArgumentNullException",
        "Message": "Value cannot be null.\r\nParameter name: resourceKey",
        "Source": "EPiServer.Framework",
        "StackTraceString": "   at EPiServer.Framework.Validator.ThrowIfNullOrEmpty(String name, String value)\r\n   at EPiServer.Framework.Localization.LocalizationService.GetStringByCulture(String resourceKey, FallbackBehaviors fallbackBehavior, String fallback, CultureInfo culture)\r\n   at EPiServer.Framework.Localization.LocalizationService.GetStringByCulture(String resourceKey, String fallback, CultureInfo culture)\r\n   at EPiServer.UI.WebControls.TabStrip.LoadPlugIns()\r\n   at EPiServer.UI.WebControls.TabStrip.OnInit(EventArgs e)\r\n   at System.Web.UI.Control.InitRecursive(Control namingContainer)\r\n   at System.Web.UI.Control.InitRecursive(Control namingContainer)\r\n   at System.Web.UI.Control.AddedControl(Control control, Int32 index)\r\n   at System.Web.UI.Control.EnsureChildControls()\r\n   at System.Web.UI.Control.PreRenderRecursiveInternal()\r\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": {
          "Name": "ThrowIfNullOrEmpty",
          "AssemblyName": "EPiServer.Framework",
          "AssemblyVersion": "11.20.8.0",
          "AssemblyCulture": "",
          "ClassName": "EPiServer.Framework.Validator",
          "Signature": "Void ThrowIfNullOrEmpty(System.String, System.String)",
          "MemberType": 8
        },
        "HResult": -2147467261,
        "HelpURL": null
      }
    ],
    "Logger": "EPiServer.Global",
    "Application": "SCBSE.WebApps.External",
    "MachineName": "SCB-PP-SEWIE01",
    "RequestPath": "/EPiServer/CMS/edit/mysettings.aspx",
    "RequestHttpMethod": "GET"
  },
  "fields": {
    "@timestamp": [
      "2022-10-26T13:12:05.150Z"
    ]
  },
  "sort": [
    1666789925150
  ]
}

Here is my web.config localization section:

<localization fallbackBehavior="Echo, MissingMessage, FallbackCulture" fallbackCulture="en">
   <providers>
      <add virtualPath="~/LanguageFiles" name="languageFiles" type="EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider, EPiServer.Framework.AspNet" />
   </providers>
</localization>
#290667
Oct 27, 2022 7:36
Vote:
 

Do you have custom admin plugin, from the xml doc

    /// To translate <b>DisplayName</b> and <b>Description</b> of a plug-in you have to add
    /// your own xml file in the �lang/� directory and set the property LanguagePath.
    /// If you for example set LanguagePath to /myplugin/sample the xml paths you add should
    /// be /myplugin/sample/displayname and /myplugin/sample/description.
#290670
Oct 27, 2022 11:32
Michał Szkołut - Oct 27, 2022 11:36
It's a standard My Settings page when you can for example change UI language. I don't think I need anything special for this to work.
Vote:
 

I am able to reproduce this if I change LocalizationService.Current.FallbackBehavior to anything other than FallbackBehaviors.Echo or FallbackBehaviors.Null.
This happens because the "Display Options" plugin (EPiServer.UI.Edit.UserGuiSettings) has no description.

Do you change the value of LocalizationService.Current.FallbackBehavior anywhere in your code?

#290731
Oct 28, 2022 12:51
Michał Szkołut - Oct 28, 2022 14:05
yes I found something like that:
_localizationService.FallbackBehavior = FallbackBehaviors.FallbackCulture;
_localizationService.FallbackCulture = new CultureInfo("en");

I will try to remove it and we will see if that helps. Thank you for the hint.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.