web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / WebForms and File colu...
Power Pages
Unanswered

WebForms and File columns causing "The given key was not present in the dictionary." exception.

(0) ShareShare
ReportReport
Posted on by 45

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!

 

The given key was not present in the dictionary.

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

 

Categories:
I have the same question (0)
  • Verified answer
    gauthis Profile Picture
    45 on at

    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...

    gauthis_0-1712325022282.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard