IIS 7.0 错误提示:413 Entity Too Large,请大神们指点

forever803 发布于 2010/08/03 17:26
阅读 2K+
收藏 1
IIS

用asp.net写的代码,在VS环境下上传大文件是可以的,但我把发布到IIS 7.0上后,在客户端打开网站上传文件时
错误提示:413 Request  Entity Too Large

上传8M的没有问题,但上传20+M的文件就有错误提示,但在服务器访问该网站,大文件是可以上传的,请大神们指点!

我修改“uploadReadAheadSize”的值也会同样出现:413 Request  Entity Too Large

我的Web.Config中配置
........
<configSections>
  <sectionGroup name="system.web">
  <section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler,Brettle.Web.NeatUpload" allowLocation="true" />
  </sectionGroup>
  </configSections>
..........
<httpModules>
  <!--上传大文件-->
  <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule,Brettle.Web.NeatUpload"/>
  </httpModules>
  <!--useHttpModule="true" 设为true时才能看到上传状态,默认是False-->
  <neatUpload useHttpModule="true" maxNormalRequestLength="1048576" maxRequestLength="1048576" defaultProvider="FilesystemUploadStorageProvider">
  <providers>
  <add name="FilesystemUploadStorageProvider" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider, Brettle.Web.NeatUpload"/>
  </providers>
  </neatUpload>
  <httpRuntime maxRequestLength="1048576" executionTimeout="3600"/>
.............

加载中
0
0
鉴客
鉴客

引用来自#2楼“forever803”的帖子

没人回答

没处理过这么大,帮你搜索了一下,试试这个:

solution:

Execute the following command on the Sever.
>cscript adsutil.vbs set w3svc/1/uploadreadaheadsize 26240000
and make sure you also have the following in the web.config...
maxRequestLength="2097151"
You can choose the size as per the size of the file

you wanna upload...

返回顶部
顶部