Reputation: 33
I'm trying to send an object that contains 4 files (as base64 string) to a WebApi 2 as Http Post request. however, on execution, I get 413 Error
on the server. on local its all good and working.
So I went ahead and used this Tutorial and changed the uploadReadAheadSize
to 1048576000
however I still get the same error.
More clues! funny thing is that if I upload another object that has a bigger size than this it'll work on the server. so I thought maybe it's not because of uploadReadAheadSize
.. but I don't know what else can cause this issue. any thoughts?
Upvotes: 1
Views: 1616
Reputation: 33
I solved this problem by adding the web.config file
and adding this code.
<system.webServer>
...
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="144400000" />
</requestFiltering>
</security>
...
</system.webServer>
Upvotes: 2