Skip to content

@bind text >32kb #11184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jun 13, 2019 · 4 comments
Closed

@bind text >32kb #11184

ghost opened this issue Jun 13, 2019 · 4 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@ghost
Copy link

ghost commented Jun 13, 2019

Hello, there is a simple form

<textarea @bind="val"></textarea>

@code{ 
string val;
}

If a user tries to insert text more than 32kb into a form, he gets an error: Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.

Is there a workaround for getting custom text over 32kb ?
I am using Blazor Preview 6

@ghost
Copy link
Author

ghost commented Jun 13, 2019

I tried to change the size of the buffer

app.UseRouting();
app.UseEndpoints(endpoints =>
{
	endpoints.MapDefaultControllerRoute();
	endpoints.MapBlazorHub(o => 
	{
		o.TransportMaxBufferSize = 1000000;
		o.ApplicationMaxBufferSize = 1000000;
	});
	endpoints.MapFallbackToPage("/_Host");
});

But it does not work, the text size is still limited to 32kb.

@davidfowl
Copy link
Member

No that does not work, you need to do this now:

services.AddServerSideBlazor().AddHubOptions(o =>
            {
                o.MaximumReceiveMessageSize = ...;
            });

@Eilon Eilon added the area-blazor Includes: Blazor, Razor Components label Jun 13, 2019
@QadiymStewart
Copy link

I can comfirm that works now fixed my issue #9570

@ghost
Copy link
Author

ghost commented Jun 13, 2019

Thanks, it really works 👍

@ghost ghost closed this as completed Jun 13, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

3 participants