Unhandled exception rendering component: Value cannot be null. - IdentityServer4

Hi all,

I have just added IdentityServer4 support to my Blazor app.

All was working fine, but now I cannot Save an update in the DataGrid.

The first few lines of the actual error I'm receiving are:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Value cannot be null.
      Parameter name: propertyName
  at System.ComponentModel.DataAnnotations.ValidationAttributeStore+TypeStoreItem.TryGetPropertyStoreItem (System.String propertyName, System.ComponentModel.DataAnnotations.ValidationAttributeStore+PropertyStoreItem& item) <0x665c4d8 + 0x0001c> in <filename unknown>:0 
  at System.ComponentModel.DataAnnotations.ValidationAttributeStore+TypeStoreItem.GetPropertyStoreItem (System.String propertyName) <0x665c348 + 0x00012> in <filename unknown>:0 
  at System.ComponentModel.DataAnnotations.ValidationAttributeStore.GetPropertyType (System.ComponentModel.DataAnnotations.ValidationContext validationContext) <0x6654760 + 0x00032> in <filename unknown>:0 
  at System.ComponentModel.DataAnnotations.Validator.TryValidateProperty (System.Object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection`1[T] validationResults) <0x6654350 + 0x00010> in <filename unknown>:0 
  at Syncfusion.Blazor.Grids.Internal.Editors.ColumnsValidator`1[T].DataAnnotationHandler (Microsoft.AspNetCore.Components.Forms.FieldIdentifier identifier) <0x669d230 + 0x000b2> in <filename unknown>:0 
  at Syncfusion.Blazor.Grids.Internal.Editors.ColumnsValidator`1[T].ValidateRequested (System.Object editContext, Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs validationEventArgs) <0x66e1c68 + 0x00088> in <filename unknown>:0 

I believe that the only change I have made (apart from the changes relating to IdentityServer4) was to change the Class of "ApplicationDbContext" to the following:

    public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser>
    {
        public ApplicationDbContext(
            DbContextOptions options,
            IOptions<OperationalStoreOptions> operationalStoreOptions) : base(options, operationalStoreOptions)
        {
        }

i.e. adding "ApiAuthorizationDbContext<ApplicationUser>" & the line beginning "IOptions..."

I have, so far, only added "AuthorizeView" to the actual Pages (i.e. NOT to the Controllers). Attached is an example of the "Language" DataGrid.

Any help would be greatly appreciated as this error seems to be occurring within the DataGrid itself?

Simon



Attachment: Language_679676b7.7z

5 Replies 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team September 18, 2020 11:52 AM UTC

Hi Simon, 
 
Greetings from Syncfusion support. 
      
We are sorry for the inconvenience caused. We are able to face the reported problem with our latest version when having Column Template in Grid. We have confirmed it is a bug and logged the defect report “Exception is thrown while saving the changes in grid with Column Template”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming  bi-weekly release which is expected to be rolled out by the end of September, 2020.     
    
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.    
    
Until then we appreciate your patience.     
  
Regards,  
Renjith Singh Rajendran 



Marked as answer

SI Simon September 18, 2020 11:56 AM UTC

Hi Renjith,

Thanks for letting me know.

Regards

Simon


RS Renjith Singh Rajendran Syncfusion Team September 21, 2020 12:52 PM UTC

Hi Simon, 

Thanks for your update. 

You can track the current status of the reported issue, review the proposed resolution timeline, and contact us for any further inquiries through the below feedback link.    

Please get back to us if you need further assistance. 

Regards, 
Renjith R 




SI Simon September 21, 2020 11:23 PM UTC

Hi Renjith,

Thanks for the reply.

Unfortunately, the link says "Access Denied".

Thanks in advance

Simon


RS Renjith Singh Rajendran Syncfusion Team September 22, 2020 12:36 PM UTC

Hi Simon, 

Sorry for the inconvenience caused. 

We have modified the feedback settings to grant access for your account. Please follow up on the below feedback for future updates on this issue. 

Regards, 
Renjith R 


Loader.
Up arrow icon