10

I get this error, the moment when I try to send a very large POST call to an Asp.net Web API over SSL.
I am aware of the fenomenon of renegotiation.
My uploadReadAheadSize is set to the max. (2147483647)

Can anybody tell me some options I should try?

Here is are request and response from Chrome dev console:

enter image description here

I have also tried the following commands without results:

C:\Windows\System32\inetsrv\appcmd.exe set config "Web API" -section:system.webServer/ServerRuntime /enabled:"1024000" /commit:apphost

C:\Windows\System32\inetsrv\appcmd.exe set config "Web API" -section:system.webServer/ServerRuntime /uploadReadAheadSize:"1024000" /commit:apphost

Community
  • 1
  • 1
HansElsen
  • 1,209
  • 4
  • 19
  • 42
  • possible duplicate of [IIS7 - (413) Request Entity Too Large | uploadReadAheadSize](http://stackoverflow.com/questions/10122957/iis7-413-request-entity-too-large-uploadreadaheadsize) – Steffen Ullrich Mar 11 '15 at 19:59
  • Your link refers to a problem with a WCF service. Im talking about Web API. Sorry I should have mentioned that. – HansElsen Mar 11 '15 at 22:08

2 Answers2

9

IMPORTANT: this answer is available with HTTPS

  1. Goto configure directory

    C:/Windows/System32/inetsrv/config/

  2. Open applicationHost.config file in edit mode.

  3. Add this configure for your application

    Example: configure for 1 MB uploading

<location path="SiteName" overrideMode="Allow">
   <system.webServer>
     ......
      <serverRuntime enabled="true" uploadReadAheadSize="1024000" />     
     .....
   </system.webServer>
</location>
  1. Restart your site in the IIS
Trong Tran
  • 624
  • 1
  • 7
  • 17
0

I got the issue in Rest WCF Web API and got resolution as mentioned below:

<webHttpBinding>
    <binding 
        maxBufferPoolSize="2147483647" 
        maxReceivedMessageSize="2147483647" 
        maxBufferSize="2147483647" 
        transferMode="Streamed">
    </binding>  
</webHttpBinding>
Uwe Keim
  • 36,867
  • 50
  • 163
  • 268
Riddhi
  • 211
  • 1
  • 10