文件上传执行过程中的错误[重复]

时间:2021-04-03 15:48:13

This question already has an answer here:

这个问题已经有了答案:

During the execution of project at the Image upload time, Browser is displaying this error. I am using SQl Server as Database.

在图像上传期间执行项目时,浏览器显示此错误。我正在使用SQl Server作为数据库。

`Server Error in '/' Application.
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() +9803702
   System.Web.HttpRequest.GetMultipartContent() +63
   System.Web.HttpRequest.FillInFormCollection() +160
   System.Web.HttpRequest.EnsureForm() +69
   System.Web.HttpRequest.get_Form() +13
   System.Web.HttpRequest.get_HasForm() +9800635
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +95
   System.Web.UI.Page.DeterminePostBackMode() +69
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +220
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0`

Is there any restriction limit During file Upload for SQl Server?

在上传SQl Server时是否存在限制限制?

1 个解决方案

#1


2  

This error is raised by your web server and not by SQL server.

这个错误是由您的web服务器引起的,而不是由SQL服务器引起的。

If you are using IIS, you can modify your web.config to allow large file uploads.

如果您正在使用IIS,您可以修改您的web。配置以允许大文件上传。

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="xxxxxx" />
    </system.web>
</configuration>

For IIS version 7 and above, use the following..

对于IIS版本7和以上,请使用以下…

<system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="xxxxxxx" />
      </requestFiltering>
   </security>
 </system.webServer>

The above example is taken from here

上面的例子是取自这里。

Also, please read this.

另外,请阅读。

#1


2  

This error is raised by your web server and not by SQL server.

这个错误是由您的web服务器引起的,而不是由SQL服务器引起的。

If you are using IIS, you can modify your web.config to allow large file uploads.

如果您正在使用IIS,您可以修改您的web。配置以允许大文件上传。

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="xxxxxx" />
    </system.web>
</configuration>

For IIS version 7 and above, use the following..

对于IIS版本7和以上,请使用以下…

<system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="xxxxxxx" />
      </requestFiltering>
   </security>
 </system.webServer>

The above example is taken from here

上面的例子是取自这里。

Also, please read this.

另外,请阅读。