自定义MTOM绑定和最大上传大小 [英] Custom MTOM binding and Max upload size
本文介绍了自定义MTOM绑定和最大上传大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将以下绑定配置用于我的上传服务,
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>
但是使用此设置,我无法上传超过1mb的大文件,服务器响应是错误的请求.
But with this setting, I'm not able to upload big files like more than 1mb, server response is bad request.
有什么想法吗?
推荐答案
您还需要设置maxRequestLength属性以使上传正常进行.可以在以下web.config文件中找到它:
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>
检查IIS应用程序池标识是否有权写入temp文件夹,以便能够临时存储传入的数据.
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.
这篇关于自定义MTOM绑定和最大上传大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文