web上传大文件的配置

    xiaoxiao2022-06-29  42

    1、项目本身的webconfig  在<system.web>字段下

    <httpRuntime targetFramework="4.5" requestLengthDiskThreshold="256" maxRequestLength="1000000000" executionTimeout="120"/>

    2、找到C:\Windows\System32\inetsrv\config\schema下(我的是window7)IIS_schema.xml文件下面的字节

    <attribute name="maxAllowedContentLength" type="uint" defaultValue="30000000" /> 默认是30m   可以在后面加个0

    如果这个文件更改有权限限制,则

    下面我们就来看下如何修改IIS_schema.xml文件的权限:

    在路径"C:\Windows\System32\inetsrv\config\schema"中找到IIS_schema.xml文件;

    点击IIS_schema,右键选择properties,在打开的窗口页面中选择Security Tab,点击Advanced button

    在弹出的Advanced Security Settings页面,点击Owner Tab,点击下面Edit Button

    在编辑页面,填入要执行操作的user,点击apply

    并给予此User Full Control权限;

    General Tab中去掉Read-only选项的勾选,点击OK保存。

    之后就可以用设置的用户打开IIS_schema.xml文件进行编辑。

    3、这一步估计不是必须:iis中点击网站》请求筛选 右边“编辑功能设置” 》“允许最大内容长度” 补个0    这里的数字以b为单位  1m=1024kb=1024*1024b

    转载请注明原文地址: https://ju.6miu.com/read-1125032.html

    最新回复(0)