有关IIS中最大文件上载大小的建议 [英] Recommendations on Max File Upload Size in IIS

查看:83
本文介绍了有关IIS中最大文件上载大小的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到这个问题的答案取决于所使用的特定服务器,但好奇的是,如果人们对ASP.NET网络表单允许的最大文件大小限制有建议。



为希望允许图形设计师上传的印刷公司工作。我知道他们会超出我给他们的任何限制....

解决方案

你需要让用户满意 - 如果他们需要的话上传16MB +文件,那就是你必须启用的。如果可以的话,与他们交谈并建立一个粗略的限制,他们将最大限度地了解所涉及的文件大小 - 尽量保持最小的实用价值,不要直接达到300MB或更多。如果可以,也不允许一次性多次上传。



如果您只启用某些页面的上传,您可以在您的网站中使用< location>元素Web.config只为这些页面/目录而不是整个站点增加上传限制 - 虽然它不会阻止DOS攻击,但它会减少这种攻击最可行的表面区域,尽管你是'无论如何都不太可能遇到这样的攻击。<​​/ p>

例如:

 
< ; location path =Upload.aspx>
< system.web>
< httpRuntime maxRequestLength =16384/><! - 16MB - >
< / system.web>
< / location>


I realize the answer to this question is dependent on the specific server used, but curious if people have recommendations on a max file size limit to allow from an ASP.NET web form.

Working for a Printing Company who wants to allow uploads from graphic designers. I know they will exceed whatever limit I give them....

解决方案

You need to keep your users happy - if they need to upload 16MB+ files, then that's what you have to enable. Talk to them and establish a rough limit if you can, they'll have the best idea of the file sizes involved - try to stick to the smallest, practical value, don't just go straight to 300MB or more. Don't allow multiple uploads in one go either, if you can.

If you only enable uploads from certain pages, you can use a <location> element in your Web.config to increase the upload limit just for those pages / directories, rather than for the entire site - while it wouldn't prevent a DOS attack, it reduces the surface area over which such an attack would be most viable, although you're highly unlikely to encounter such an attack anyway.

eg:

<location path="Upload.aspx">
    <system.web>
        <httpRuntime maxRequestLength="16384" /> <!-- 16MB -->
    </system.web>
</location>

这篇关于有关IIS中最大文件上载大小的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆