I am developing SharePoint Office 365 App in visual studio. I have used a FileUpload control to upload files to SharePoint document library by using CSOM.
I am facing an issues. The SharePoint Office 365 App doesn't allow to upload file greater than 3 MP in my custom page and showing the following error message.
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
Please help me, how i can increase max size of file upload in SharePoint Apps.
Thanks in advance.