我有一个 wcf 服务,用于将大文件上传和下载到服务器。我正在使用 MTOM 消息编码,并且我想使用流传输模式。但是我们使用的是 wsFederationHttpBinding。如何在 wsFederationHttpBinding 中支持流式传输?
我的 WCF 服务 web.config 代码如下,
<wsFederationHttpBinding>
<binding name="UploadserviceFederation"
messageEncoding="Mtom"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" >
<readerQuotas maxStringContentLength="2147483647"
maxDepth="2147483647"
maxBytesPerRead="2147483647"
maxArrayLength="2147483647"/>
<security mode="TransportWithMessageCredential">
<!-- Ping token type MUST be SAML 1.1, do not change -->
<message
issuedTokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" negotiateServiceCredential="false">
<!-- TODO: You must put the proper issuer URN of the Ping STS; normally this would be the Ping base URL -->
<issuer address="https://my-issuer.com" binding="customBinding" bindingConfiguration="FileUploadSTSBinding" />
</message>
</security>
</binding>
</wsFederationHttpBinding>
<customBinding>
<binding name="FileUploadSTSBinding">
<security authenticationMode="UserNameOverTransport" requireDerivedKeys="false"
keyEntropyMode="ServerEntropy" requireSecurityContextCancellation="false"
requireSignatureConfirmation="false">
</security>
<httpsTransport maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" />
</binding>
</customBinding>