Blazor Preview4 increase buffer size
See original GitHub issueUsing the new Blazor Serverside Preview 4 breaks my upload Component.
Preview 3 I was able to increase the SignalR connection buffer size using
` app.UseRouting(routes =>
{
routes.MapRazorPages();
routes.MapHub<ComponentHub>(
ComponentHub.DefaultPath,
o =>
{
o.ApplicationMaxBufferSize = 102400000; // larger size
o.TransportMaxBufferSize = 102400000; // larger size
})
.AddComponent<App>("app");
});`
In preview 4 it has switched to endpoint routing
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
How would I configure MapBlazorHub(); Related Issue #7884
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:21 (12 by maintainers)
Top Results From Across the Web
Blazor Preview4 increase buffer size · Issue #9570
Using the new Blazor Serverside Preview 4 breaks my upload Component. Preview 3 I was able to increase the SignalR connection buffer size...
Read more >Increase the connection buffer size in Blazor PDF Viewer
Learn here all about how to increase the connection buffer size in Syncfusion Blazor PDF Viewer component and more.
Read more >Increase Speed for Streaming Large(1-10 gb) files .Net Core
What I tried: default buffer size for Stream::CopyToAsync is 81920 bytes, I used the same value first, then I tried to increase buffer...
Read more >ASP.NET Core Blazor file uploads
OpenReadStream enforces a maximum size in bytes of its Stream. Reading one file or multiple files larger than 500 KB results in an...
Read more >ASP.NET Core updates in .NET 6 Preview 4
The size of an AOT compiled Blazor WebAssembly app is generally larger than the if the app was left as .NET IL. In...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
[EDIT] : I find the solution for preview 7 in another post, i put the solution bellow
Hi guys, i’m currently under preview 7 (server-side version) and i meet the same problem. i try to send a base64 string wich represent an image from js to one of my components (with JSInvokable). I try tu use code you suggest on this post but I have reference problem (maybe this workaround is outdated ?)
I’m unable to resolve ComponentHub. When i check what’s expected, it’s seem to be a IComponent (so my root Component ?)
I don’t understand what can i done now to bypass the problem
thanks for your help !
I’ve got the same problem. I’ve investigated that it’s not because MaximumReceiveMessageSize. It is impossible to invoke .NET method from javascript if parameters passed to method are to big. I guess, the limit of parameters serialized to JSON during invokeMethodAsync is 4KB. Worked fine before preview 4.