0

I have read some answers but none of them helped me. Maybe I simply didn't understand them, but whatever:

The remote server returned an error: (413) Request Entity Too Large. This thing happens when I am trying to upload file and I can't find the reason, why? This happens when I'm trying to call method from *.srv.cs.

I read that the issue can be with <httpRuntime maxRequestLength... but I have enougn number for 161 kb file.

Also, this issue appeared after binding has changed from http to https. Here: http://blogs.msdn.com/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx I read that issue might be with UploadReadAheadSize but I changed it in IIS and nothing happent.

Here is my binding from .srv Web.config:

<bindings>
  <basicHttpsBinding>
    <binding name="BasicHttpsBinding" sendTimeout="00:05:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
      <readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>
  </basicHttpsBinding>
</bindings>



<services>
  <service name="BusinessServices.Business" behaviorConfiguration="CustomeBehavior">
  </service>
</services>

and behaviors:

<behaviors>
      <serviceBehaviors>
        <behavior name="CustomeBehavior">
          <serviceAuthorization principalPermissionMode="Custom">
            <authorizationPolicies>
              <add policyType="Security.BusinessAuthorizationPolicy, Security" />
            </authorizationPolicies>
          </serviceAuthorization>
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="SecurityOff">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0" />

Did I missed something?

Edit: I have already tried this: http://tips4sysadmins.blogspot.com/2012/12/iis-75-uploadreadaheadsize.html (from Request Too Large) and nothing has changed, so no, this is not answer for me.

Edit 2: Same issue appeared on azure when I deployed my project, so I guess, the problem lies not it the IIS

Community
  • 1
  • 1
Olegs Jasjko
  • 2,128
  • 6
  • 27
  • 47

0 Answers0