Owin Selfhost Webapi - How to set MaxReceivedMessageSize to allow large files?

1.2k Views Asked by At

Prior to the Owin version of the self host webapi it was possible to define the MaxRecievedMessageSize like this to allow for larger files transfer:

var config = new HttpSelfHostConfiguration(baseAddress);
config.MaxReceivedMessageSize = 2147483648;

Is that possible with the Owin Selfhost approach?

1

There are 1 best solutions below

1
On

You can write your own OWIN middleware for that. Kiran Challa wrote an example that suits your needs at the asp.net forums, http://forums.asp.net/post/5622974.aspx