Custom MTOM binding and Max upload size

浪尽此生 提交于 2019-12-11 13:38:34

问题


I'm using the binding configuration below for my upload service,

<binding name="FileUploadSTSBinding">
          <security authenticationMode="UserNameOverTransport"
                    requireDerivedKeys="false"
                    keyEntropyMode="ServerEntropy"
                    requireSecurityContextCancellation="false"
                    requireSignatureConfirmation="false">
          </security>
          <mtomMessageEncoding/>
          <httpsTransport 
            transferMode="Streamed" 
            maxReceivedMessageSize="2147483647"/>
        </binding>

But with this setting, I'm not able to upload big files like more than 1mb, server response is bad request.

Any thoughts?


回答1:


You need to set the maxRequestLength attribute as well for the upload to work. It can here found in the web.config file here:

<configuration>
   <system.web>
      <httpRuntime>

Check that the IIS app pool identity has the right to write to the temp folder to be able to temporarily store the incoming data.



来源:https://stackoverflow.com/questions/3886055/custom-mtom-binding-and-max-upload-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!