AsyncFileUpload 文件大小限制
当我使用AsyncFileUpload
上传100KB图像时,没有收到错误消息,但图像未上传。我可以成功上传75KB的图片。我使用的是 IIS 6.0。
<cc1:AsyncFileUpload ID="afuImg" Width="400px" runat="server"
UploaderStyle="Traditional" ThrobberID="Throbber2"
OnClientUploadError="uploadErrorImg"
OnClientUploadStarted="StartUploadImg"
OnClientUploadComplete="UploadCompleteImg" />
<httpRuntime maxRequestLength = "1024000"
executionTimeout="54000"
enableHeaderChecking ="false" />
When I was using AsyncFileUpload
to upload 100KB image, I got no error message., but image not uploaded. I can upload 75KB image succssfully. I am using IIS 6.0.
<cc1:AsyncFileUpload ID="afuImg" Width="400px" runat="server"
UploaderStyle="Traditional" ThrobberID="Throbber2"
OnClientUploadError="uploadErrorImg"
OnClientUploadStarted="StartUploadImg"
OnClientUploadComplete="UploadCompleteImg" />
<httpRuntime maxRequestLength = "1024000"
executionTimeout="54000"
enableHeaderChecking ="false" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以上传总大小最大为 2GB 的文件,但需要对应用程序配置文件进行一些修改。
要启用可能需要很长时间的大文件上传,请增加此属性。
请参阅以下 MSDN 文章: http://msdn2.microsoft.com/en-我们/library/e1f13641.aspx。
打开文件C:\Windows\System32\inetsrv\config\applicationHost.config并找到以下行:
http://www.telerik.com/support/ kb/article/b454K-gth-b454T-cee.aspx
最后,虽然我不经常看到它,
另外,stackoverflow 上还有另一个问题,该问题进入 如何配置 IIS 来处理非常大的文件上传?
在上面的问题中,答案 https://stackoverflow.com /a/206796/728841 列出了 Urlscan 的问题,它有自己的请求实体长度限制。该人不知道 Urlscan 正在服务器上运行,因为它是全局 ISAPI 过滤器,而不是在单个网站上运行。
注意:要找到全局 ISAPI 筛选器,请右键单击 IIS 管理中的“网站”文件夹,然后单击“属性”,然后单击“ISAPI 筛选器”选项卡。
You can upload files with a combined size of up to 2GB, but it requires some modifications in your application configuration files.
To enable large file uploads, which can take large periods of time, increase this property.
See the following MSDN article: http://msdn2.microsoft.com/en-us/library/e1f13641.aspx.
Open the file C:\Windows\System32\inetsrv\config\applicationHost.config and find the line:
http://www.telerik.com/support/kb/article/b454K-gth-b454T-cee.aspx
Finally Though I don't see it very often
Also there is another question on stackoverflow which goes into this How do I configure IIS to handle really large file uploads?
In the above question the answer https://stackoverflow.com/a/206796/728841 lists Urlscan being the problem it has it's own request entity length limit. The person was not aware that Urlscan was running on the server because it was a global ISAPI filter, not running on the individual website.
Note: to locate global ISAPI filters, right click on the Web Sites folder in IIS Admin and click Properties, then on the ISAPI Filters tab.
当尝试在 IIS 6 上上传超过 200KB 的文件时,该文件可能永远不会上传,并且您会收到错误或被发送到空白屏幕。默认情况下,Windows 服务器将文件上传大小限制为大约 200KB。要克服此限制,您必须编辑 IIS metabase.xml 文件。
1.在编辑metabase.xml 文件之前,您必须告诉IIS 允许您编辑该文件。在 IIS 中,右键单击服务器名称并选择属性。选中“启用直接元数据库编辑”。
2.找到位于C:\windows\sytem32\inetserv 中的metabase.xml 文件并在记事本中打开该文件。
3.搜索AspMaxRequestEntityAllowed并增加值。默认值为 204800 (200K)。将值设置为 1000000 将允许上传 1 MB 的文件。
4.您现在可能希望取消选中名为“启用直接元数据库编辑”的 IIS 属性。
要增加文件下载大小限制,请重复上述所有步骤,但在步骤 3 中找到名为 AspBufferingLimit 的参数。默认下载限制为 4MB。
When trying to upload files over 200KB on IIS 6 the file may never upload and you either get an error or are sent to a blank screen. By default Windows server limits file uploads to about 200KB in size. To overcome this limit you must edit the IIS metabase.xml file.
1.Before you can edit the metabase.xml file you must tell IIS to allow you to edit the file. In IIS, right click the name of the server and select properties. Check "Enable Direct Metabase Edit".
2.Find the metabase.xml file located in C:\windows\sytem32\inetserv and open the file in Notepad.
3.Search for AspMaxRequestEntityAllowed and increase the value. The default value is 204800 (200K). Setting the value to 1000000 will allow 1 MB file uploads.
4.You may now wish to uncheck the IIS property called "Enable Direct Metabase Edit".
To increase the file download size limit, repeat all steps above but in Step 3 find the parameter called AspBufferingLimit. The default download limit is 4MB.