如何启用大文件在传统的ASP上传在IIS 7? [英] How do I enable upload of large files in classic ASP on IIS 7?

查看:475
本文介绍了如何启用大文件在传统的ASP上传在IIS 7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我必须得到一个旧的ASP应用程序W2K8服务器上的IIS 7.5中的工作。几乎一切正常,但我似乎无法得到它接受超过〜200kB的较大上传。我没有找到一个环境,从我能理解应的伎俩,在的applicationHost.config,我设置最大请求大小为100 MB是这样的:

Recently I had to get an old ASP application working in IIS 7.5 on a W2K8 server. Almost everything works fine, except that I can't seem to get it to accept uploads larger than ~200kB. I did find a setting, that from what I can understand should to the trick, in the applicationHost.config, I set the max request size to 100 MB like this:

<location path="TheNameOfMySite">
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="104857600" />
            </requestFiltering>
        </security>
    </system.webServer>
</location>

不幸的是,这似乎什么也不做,但它仍然拒绝接受任何文件大于200 KB的,并在日志文件中它给此错误消息:

Unfortunately, this seems to do nothing at all, it still refuses to accept any files larger than about 200 KB, and in the log file it gives this error message:


ASP_0104_:_80004005|Operation_not_Allowed

谷歌搜索的点增加 maxAllowedContentLength 我已经在上面完成。所以我很新鲜的想法,但相信聪明的计算器人群可以在更短的时间解决这个问题比它花了我写这个问题。

Googling that points to increasing the maxAllowedContentLength as I have done above. So I'm fresh out of ideas, but confident that the clever stackoverflow crowd can solve this in less time than it took for me to write this question.

推荐答案

多少数据允许的 maxAllowedContentLength 控件可以在响应中发送。但是要控制多少可以请求被接受。这是通过的限制 maxRequestEntityAllowed 属性处理 ASP 配置文件的部分。一个例子可能看起来像: -

The maxAllowedContentLength controls how much data is allowed to be sent in a response. However you want to control how much can be accepted in a request. This is handled by the maxRequestEntityAllowed attribute of the limits element in the asp section of the config file. An example might look like:-

<system.webServer>
  <asp>
     <cache diskTemplateCacheDirectory="%SystemDrive%\inetpub\temp\ASP Compiled Templates" />
     <limits scriptTimeout="00:02:00"
        queueConnectionTestTime="00:00:05"
        requestQueueMax="1000"
        maxRequestEntityAllowed="104857600"
        />
  </asp>

您可以在属性网格的ASP功能限制属性类别中的IIS7经理对此进行配置。或者,您可以使用命令行: -

You can configure this in the IIS7 manager under the "Limit Properties" category in the property grid for the ASP feature. Alternatively you can use a command line:-

appcmd set config /section:asp /limits.maxRequestEntityAllowed:104857600

请注意,延长该值增加DOS攻击的窗口,攻击者发送大量内容的服务器,所以不要试图扩展这个超越你真正需要的。

Note that extending this value increase the window for DOS attack where the attacker sends large content to the server so don't be tempted to extend this beyond what you really need.

这篇关于如何启用大文件在传统的ASP上传在IIS 7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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