SvendK
SvendK

Reputation: 475

Setting MaxRecievedMessageSize in ServiceStack

I have a ServiceStack service that sends and receives a lot of data (syncronization of users between two systems), so I need to set Maxrecievedmessagesize in the clients servicemodel config.

I should be able to tell ServiceStack, that the client needs this, so that when the client does Add new servicereference, this is created automatically.

Where do I set this in ServiceStack?

Might be a dupe of Setting Maxrecievedmessagesize from wcf service but I'm using ServiceStack.

Upvotes: 3

Views: 1022

Answers (1)

mythz
mythz

Reputation: 143399

ServiceStack doesn't add any additional usage limits itself, any inherent limits are always from the underlying host, i.e. IIS/ASP.NET - which are overridable with the web.config.

E.g you would use <httpRuntime/> to increase the maximum file upload size and execution timeout in ASP.NET. The size specified is in kilobytes. The default is 4096 KB (4 MB). So to set it 50 MB you will need to set it to 51200:

<httpRuntime maxRequestLength="51200" executionTimeout="300"/>

Other solutions may also depend on the version of IIS/ASP.NET you're using, e.g. this MSDN Article provides instructions to fix the HTTP 413 Request Entity too Large - Can't upload large files using IIS6 error in IIS 6.0:

Upvotes: 0

Related Questions