上传文件的大小限制:系统默认为4MB
需要在web.config 配置文件里面设置文件上传限定的两个属性值:maxAllowedContentLength(允许上传文件的长度),maxRequestLength (和请求的长度),两个大小需要设置一致。
1、maxAllowedContentLength设置: configuration节点下的<system.web>节点内添加
httpRuntime maxRequestLength="102400000" />//大小以byte为单位
2、maxRequestLength设置:configuration节点下的<system.webServer>节点内添加
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="102400000" />//大小以byte为单位
</requestFiltering>
</security>