0

We have a WCF service exposed over ws2007FederationHttpBinding binding. I am trying to access 100MB word document over this service and getting error as "Failed to allocate a managed memory buffer of 268435456 bytes. The amount of available memory may be low. " Any help on this to resolve this issue is highly appreciated.

Server side configuration

 <ws2007FederationHttpBinding>
    <binding name="ws2007FederationHttpBinding" messageEncoding="Mtom"  maxReceivedMessageSize="2147483647">
      <security mode="Message">
        <message negotiateServiceCredential="false">
          <issuerMetadata address="https://abc.com/adfs/services/trust/mex" />
          <issuer address="https://abc.com/adfs/services/trust/13/kerberosmixed" />
          <claimTypeRequirements>
            <add claimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" isOptional="true" />
            <add claimType="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" isOptional="true" />
          </claimTypeRequirements>
        </message>
      </security>
    </binding>

Hari Narisetty
  • 176
  • 1
  • 2
  • 14
  • Maybe this thread? http://social.msdn.microsoft.com/Forums/vstudio/en-US/04a1848e-7d7f-4ecf-b6ca-771cb25f7696/failed-to-allocate-a-managed-memory-buffer-of-268435456-bytes and setting the system.web httpRuntime maxRequestLength – Dijkgraaf Dec 12 '13 at 21:08
  • This is did not help. – Hari Narisetty Dec 12 '13 at 21:19
  • You will probably have to change it to use streaming rather than buffered. See this post http://stackoverflow.com/questions/10033947/how-do-i-support-streaming-in-wsfederationhttpbinding However as the thread says then you would need to have a custom binding that has the streaming configured as well as reproduce all the federation settings in the custom bindings. – Dijkgraaf Dec 12 '13 at 23:43

0 Answers0