我们有一个通过 ws2007FederationHttpBinding 绑定公开的 WCF 服务。我正在尝试通过此服务访问 100MB 的 word 文档并收到错误消息“无法分配 268435456 字节的托管内存缓冲区。可用内存量可能很低。” 非常感谢任何解决此问题的帮助。
服务器端配置
<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>