How do i adjust MaxMessageSize / MaxDecompressedMessageSize on a CodeFirst DataAbstract server?

Hi,

I have clients that are getting “Invalid BinMessage signature found” when pass to the server files larger than 5MB which was the limit we had in are previous non-CodeFirst server. What am I missing?

Thanks!
Todd

Hello

Sending files larger than 5mb (default size) results in error different than “Invalid BinMessage signature found”. This one means that some unexpected data has been sent in a wrong format.

You can access the message itself via property server.NetworkServer.ServerMessages[0] and adjust its properties.

Regards

Hi again,

I feel like I am missing something. Using

server.NetworkServer.ServerMessages[0]

I see the message but I don’t see properties to set the message size. Is this something I no longer need to be concerned with? Please advise.

Todd

Hello

You need to cast it to BinMessage like

		BinMessage message = server.NetworkServer.ServerMessages[0] as BinMessage;
		if (message != null)
		{
			// Set properties here
		}

or to use approach like this (works on builds starting from 9.2.103)

		BinMessage message = new BinMessage();
		// Set properties here
		server.NetworkServer.RegisterServerMessage(message);

Regards

Hi,

In regard to this if I set:

message.EnforceMaxMessageSize = false;

Would that mean that the appserver will disregard:

MaxDecompressedMessageSize
MaxMessageSize

Thanks,
Todd

Hello

Yes.
However there might be some traffic limtations implied by the server channel itself (namely by SuperHttp and SuperTcp server channels).

Regards

bugs://78250 got closed with status fixed.