4

我正在使用来自 jquery 的插件来使用多个文件上传来创建一个发送电子邮件的程序..

检查来源

http://www.fyneworks.com/jquery/multiple-file-upload/

我在这里下载了,还没修改。。。

我注意到您上传的总大小不能超过 10MB,但是,您不能发送超过 4MB 的单个文件...

我已经被告知你不能发送超过10MB的文件是可以的,但是我的老板只是试图发送一个4.11MB的pdf文件,它没有发送它......

我尝试通过 Visual Studio 发送它(这样我可以调试它并查看问题出在哪里......显然,一旦我附加了文件并单击发送电子邮件......程序不会访问页面加载或按钮,它只是表明连接已被重置...

如果您尝试发送(不是使用 Visual Studio,而是从 Internet 发送)...它会发送此错误

Maximum request length exceeded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Maximum request length exceeded.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Maximum request length exceeded.]
   System.Web.HttpRequest.GetEntireRawContent() +9037851
   System.Web.HttpRequest.GetMultipartContent() +68
   System.Web.HttpRequest.FillInFormCollection() +247
   System.Web.HttpRequest.get_Form() +104
   System.Web.HttpRequest.get_HasForm() +9038959
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
   System.Web.UI.Page.DeterminePostBackMode() +69
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135

我已经检查了 jquery 文件,但似乎找不到任何可以解决问题的方法。

你知道问题出在哪里吗?我该如何解决这个问题?

4

1 回答 1

9

修改 httpRuntime 元素的 web.config 设置,如下所示

<httpRuntime maxRequestLength="4096" />

该值以 KB 为单位。默认情况下为 4 MB。

于 2012-10-23T21:11:14.613 回答