sách gpt4 ai đã đi

exception - 最大请求长度超出异常(exception)

In lại 作者:行者123 更新时间:2023-12-03 13:02:12 31 4
mua khóa gpt4 Nike

我正在尝试使用上载控件上载20兆的文件,并且在Visual Studio的内置Web服务器上可以正常工作,但是一旦将其发布到生产服务器(我无权访问),我总是收到以下错误消息:

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() +11140903
System.Web.HttpRequest.GetMultipartContent() +72
System.Web.HttpRequest.FillInFormCollection() +245
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +11072199
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +124
System.Web.UI.Page.DeterminePostBackMode() +83
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +270



--------------------------------------------------------------------------------


我已将以下内容添加到我的system.web节点,所以我不知道真正的问题是什么。




在这方面的任何方向将非常有帮助。

1 Câu trả lời

尽管您有20Mb的文件,但是页面上的编码或其他内容有可能导致超出您设置的50Mb限制。我建议您将当前设置加倍。

还有另一个web.config设置可以起作用:安全请求过滤maxAllowedContentLength.

默认值为30MB,但可以在您的环境中进行其他设置。

web.config条目将类似于以下内容:









关于exception - 最大请求长度超出异常(exception),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4098769/

31 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com