可以在 次一级文件夹目录中指定上传文件的最大限制:
<configuration>
<!--配置文件上传为10m,只限制在frmMupload.aspx中,其他的为默认的4M。LENGTH以kb为单位
可以查看msdn中httpRuntime相应帮助,指定单独页面-->
<location path="frmMupload.aspx">
<system.web>
<httpRuntime maxRequestLength="10240"/>
</system.web>
</location>
<!--管理员上传图片文件和附件的文件大小-->
<location path="frmMemail.aspx">
<system.web>
<httpRuntime maxRequestLength="10240"/>
</system.web></location>
</configuration>
本文介绍如何通过配置ASP.NET应用程序中的特定页面来调整文件上传的最大限制。通过在Web配置文件中指定<location>元素路径,可以实现对个别页面如frmMupload.aspx和frmMemail.aspx的文件上传大小进行独立设置。
180

被折叠的 条评论
为什么被折叠?



