How to troubleshoot exceptions in Blazor TextBox

5 Aug 20241 minute to read

Runtime exceptions

  • InvalidOperationException: Cannot provide a value for property ‘SyncfusionService’ on type ‘Syncfusion.Blazor.Inputs.SfTextBox’

    You may see the below runtime exception while running the application for the first time.

    ERROR

    InvalidOperationException: Cannot provide a value for property ‘SyncfusionService’ on type ‘Syncfusion.Blazor.Inputs.SfTextBox’. There is no registered service of type ‘Syncfusion.Blazor.SyncfusionBlazorService’.

    Cause:

    This exception thrown because you missed registering the SyncfusionBlazorService in Program.cs.

    Solution:

    You can register the SyncfusionBlazorService in Program.cs file to resolve the exception.

      using Syncfusion.Blazor;
      ....
      builder.Services.AddSyncfusionBlazor();

See also