
Announcements
Hey!
We're seeing an odd issue only in one of our environments, where Web Forms rendering File columns throw an exception (see below). At first I thought maybe a workflow or a plugin was causing it, but this seems to be coming from the portal itself.
I'm not exactly sure as to when this stopped working in our dev environment... likely within the last week.
The record displays and behaves as expected in our model-driven app. I'm at a loss here 🤔
Thanks for the help!
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[KeyNotFoundException: The given key was not present in the dictionary.] System.ThrowHelper.ThrowKeyNotFoundException() +38 System.Collections.Generic.Dictionary`2.get_Item(TKey key) +54 Adxstudio.Xrm.Web.UI.CrmEntityFormView.FileControlTemplate.GetBlockedFileExtensions() in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\FileControlTemplate.cs:530 Adxstudio.Xrm.Web.UI.CrmEntityFormView.FileControlTemplate.InstantiateControlIn(Control container) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\FileControlTemplate.cs:106 Adxstudio.Xrm.Web.UI.CrmEntityFormView.CellTemplate.InstantiateIn(Control container) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\CellTemplate.cs:211 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TableLayoutRowTemplate.InstantiateLayoutIn(Control container, IEnumerable`1 cellTemplates) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TableLayoutRowTemplate.cs:68 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TableLayoutRowTemplate.InstantiateIn(Control container) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TableLayoutRowTemplate.cs:56 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TableLayoutSectionTemplate.InstantiateIn(Control container) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TableLayoutSectionTemplate.cs:141 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TabTemplate.InstantiateIn(Control container) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TabTemplate.cs:122 Adxstudio.Xrm.Web.UI.CrmEntityFormView.CompositeTemplate.InstantiateIn(Control container) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\CompositeTemplate.cs:19 Adxstudio.Xrm.Web.UI.WebControls.CrmEntityFormView.CreateChildControls() in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\CrmEntityFormView.cs:927 System.Web.UI.Control.EnsureChildControls() +130 System.Web.UI.Control.PreRenderRecursiveInternal() +66 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Control.PreRenderRecursiveInternal() +297 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7479
Posting an update here since we have resolved the issue. For some reason (still unknown) out list of blocked extensions was empty in that environment. I pulled the values in from another environment and our pages started displaying again.
That said, there's still a bug in the Microsoft code which should be checking if the list of blocked extensions is empty instead of throwing a KeyNotFound exception...