Search code examples
asp.net-coreblazor-server-sidehtml-editor

Radzen blazor HTML Editor can’t save large text C#


Large text (more than 5000 words or more) can't save through Radzen HTML editor, I'm getting below error. please have a look error below

Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.

Code Below:

<RadzenHtmlEditor Style="height: 250px; margin-bottom: 1rem;"
                          @bind-Value="@Value"
                          Disabled="@IsSaving"
                          Change="@(OnChange)" />

 private async Task OnChange(string selectedValue) // selectedValue coming null for large text but for small text like 2000 words is fine.
        {
            try {
                if (string.IsNullOrEmpty(PropertyName) || string.IsNullOrEmpty(selectedValue))
                    return;
// Do stuff
            }
            catch (Exception e)
            {
            }
        }

enter image description here

How I can resolve this issue? Its a blazor server side application. Thanks !


Solution

  • I have increased the size for Singal R and that fixed the issue now. or have you any good solutions ?

    services.AddSignalR(e => {
                    e.MaximumReceiveMessageSize = 102400000;
                });