SignalR MaximumReceiveMessageSize
See original GitHub issueMy previous code was:
app.UseSignalR((options) =>{
options.MapHub<Pages.Hubs.ClientsHub>("/hubs/clientshub", configureOptions => {
configureOptions.TransportMaxBufferSize = 999999;
configureOptions.ApplicationMaxBufferSize = 999999;
});
});
Which worked fine with long buffers.
I now upgraded to preview 8 and changed my code to:
app.UseEndpoints((options) => {
options.MapHub<ClientsHub>("/hubs/clientshub", configureOptions => {
configureOptions.TransportMaxBufferSize = 999999;
configureOptions.ApplicationMaxBufferSize = 999999;
});
});
but SignalR no longer handles big buffers, I get:
System.IO.InvalidDataException: The maximum message size of 32768B was exceeded. The message size can be configured in AddHubOptions.
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.DispatchMessagesAsync(HubConnectionContext connection)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.RunHubAsync(HubConnectionContext connection)
I looked at many threads and found recommendations to use MaximumReceiveMessageSize
However if I try:
app.UseEndpoints((options) =>{
options.MapHub<ClientsHub>("/hubs/clientshub", configureOptions => {
configureOptions.MaximumReceiveMessageSize = 102400000;
});
});
I get :
Error CS1061 ‘HttpConnectionDispatcherOptions’ does not contain a definition for ‘MaximumReceiveMessageSize’ and no accessible extension method ‘MaximumReceiveMessageSize’ accepting a first argument of type ‘HttpConnectionDispatcherOptions’ could be found
There seems to be very little documentation for this - What is the current (preview8) correct way to increase the buffer size for SignalR ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
SignalR MaximumReceiveMessageSize · Issue #13466
System.IO.InvalidDataException: The maximum message size of 32768B was exceeded. The message size can be configured in AddHubOptions. at ...
Read more >HubOptions.MaximumReceiveMessageSize Property
Gets or sets the maximum message size of a single incoming hub message. The default is 32KB.
Read more >How to Increase the Blazor SignalR Maximum Message Size
The SignalR WebSocket has a default maximum message size of 32 KB. A large Editor Value , FileSelect file size, or a PDFViewer...
Read more >Max limit of message in SignalR - asp.net
Max limit of message in SignalR ... I am trying to send notifications through SignalR. It works perfectly. But what is the maximum...
Read more >ASP.NET Core SignalR configuration
Learn how to configure ASP.NET Core SignalR apps. ... MaximumReceiveMessageSize, 32 KB, Maximum size of a single incoming hub message.
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
Thanks! please add this to the documentation (SignalR is wonderful, thanks for the work…)
@BrennanConroy lets add this to the migration guide.