我正在Visual Studio 中开发SharePoint Office 365 应用程序。我使用 FileUpload 控件通过 CSOM 将文件上传到 SharePoint 文档库。
我面临一个问题。SharePoint Office 365 应用程序不允许在我的自定义页面中上传大于 3 MP 的文件并显示以下错误消息。
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() +9726860
System.Web.HttpRequest.GetMultipartContent() +63
System.Web.HttpRequest.FillInFormCollection() +165
System.Web.HttpRequest.EnsureForm() +75
System.Web.HttpRequest.get_Form() +12
System.Web.HttpRequest.get_HasForm() +9728411
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +95
System.Web.UI.Page.DeterminePostBackMode() +69
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +130
请帮助我,如何增加 SharePoint 应用程序中文件上传的最大大小。
提前致谢。