Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用jquery.MultiFile.js时,如何扩展最大文件大小以上载和发送(通过电子邮件)文件_C#_Jquery_Asp.net_Multifile Uploader_Multifile - Fatal编程技术网

C# 使用jquery.MultiFile.js时,如何扩展最大文件大小以上载和发送(通过电子邮件)文件

C# 使用jquery.MultiFile.js时,如何扩展最大文件大小以上载和发送(通过电子邮件)文件,c#,jquery,asp.net,multifile-uploader,multifile,C#,Jquery,Asp.net,Multifile Uploader,Multifile,我正在使用jquery的一个插件来使用多文件上传来创建一个发送电子邮件的程序 检查来源 我在这里下载的,我还没有修改它 我注意到你上传的文件不能超过10MB,但是,你不能发送一个超过4MB的文件 我已经被告知,你不能发送超过10MB的文件是可以的,但我的老板只是试图发送一个4.11MB的pdf文件,但它没有发送 我尝试通过Visual Studio发送它(这样我可以调试它并查看问题所在…很明显,一旦我附加了文件并单击“发送电子邮件”…该程序既不访问页面加载也不访问按钮,它只是声明连接已重置 如

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

检查来源

我在这里下载的,我还没有修改它

我注意到你上传的文件不能超过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文件,但似乎找不到任何可以解决问题的方法


您知道问题出在哪里吗?如何解决该问题?

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

<httpRuntime maxRequestLength="4096" />


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

在web.config中更改
maxRequestLength