Page 1 of 1

SignalR buffer size

Posted: Mon May 07, 2018 7:21 am
by ray6402

How do I increase the buffer size for messages sent from the client using SignalR?

Re: SignalR buffer size

Posted: Mon May 07, 2018 7:57 am
by JS-Support @Userware

On the server-side, you need to set GlobalHost.Configuration.MaxIncomingWebSocketMessageSize to a greater value (the default is 65536 bytes). You can put it for example in the "Startup" method.


Re: SignalR buffer size

Posted: Tue May 08, 2018 2:04 am
by ray6402
Tried that, doesn't work.

Using the SignalR example given in:

Added to Startup.cs:

Code: Select all

// Made the buffer size five times larger
GlobalHost.Configuration.MaxIncomingWebSocketMessageSize = 327680;

Tried to send the Message using the demo messaging app.

Checked size of message using:

Maximum size is 2624

Anything above that and the Server will not receive any data.

How can I fix this?