Manuel F.
Manuel F.

Reputation: 113

(413) Request Entity Too Large - When upload Wcf on Azure

I have a Wcf service that when is used in local whith visual studio works perfectly but when i deploy it on Azure it returns a "(413) Request Entity Too Large" error whe i try to pass it a byte[].

The web.config file that i've upload is like this:

<?xml version="1.0"?>
<configuration>
  <system.diagnostics>
    <trace>
      <listeners>
        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
      name="AzureDiagnostics">
          <filter type="" />
        </add>
      </listeners>
    </trace>
  </system.diagnostics>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
  </system.web>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding maxReceivedMessageSize="2147483647"
    maxBufferSize="2147483647"
    maxBufferPoolSize="2147483647">
          <readerQuotas maxDepth="32"
      maxArrayLength="2147483647"
      maxStringContentLength="2147483647"/>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>

      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
    To browse web app root directory during debugging, set the value below to true.
    Set to false before deployment to avoid disclosing web app folder information.
-->
    <directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>

Upvotes: 2

Views: 9864

Answers (1)

Vinoth
Vinoth

Reputation: 851

Check this links it il help u:

(413) Request Entity Too Large

IIS7 - (413) Request Entity Too Large | uploadReadAheadSize

also check in client webconfig also having same binding name or not.

Upvotes: 3

Related Questions