HTML Editor can't save large text

Large text (more than 5000 words or more) can't save through HTML editor, I'm getting below error. please have a look error below
[2021-11-03T09:20:12.523Z] Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.

<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)
            {
            }
        }

How I can resolve this ? Thanks !

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;
            });
1 Like

This is the only solution in my opinion.

1 Like

Indeed what @enchev said is the only solution. Blazor server-side uses SignalR to communicate with the server and has a default maximum message size.

I too ran into this old chestnut yesterday but was able to resolve using Microsoft's suggestion of streaming the content back with a JS interop as per this:

large-form-payloads-and-the-signalr-message-size-limit

This doesn't require changing the message size and you can configure the max size per field..

but I was unable to do this with RadzenTextarea as it didn't like me using @ref - it returned this error:
CS0029 Cannot implicitly convert type 'Radzen.Blazor.RadzenTextArea' to 'Microsoft.AspNetCore.Components.ElementReference'

I'm happy with my solution but maybe Radzen Team can make @ref work for RadzenTextArea or the HTML field for future?

Hey @rzhv,

Please do not post duplicate posts - I've already answered in the other thread.

Yeah, sorry.. I answered the wrong one initially.. I had both open..