Internal Server Error if file is greater that 5MB

Hello,

I am getting a message error when I try to upload a file where the size is greater than 5MB, the message error is: "Internal Server Error".

@{
        string[] items = new string[] { "Upload", "Copy", "Paste", "Delete", "Download", "Rename", "Refresh" };
        string[] files = new string[] { "Open", "|", "Copy", "|", "Delete", "Rename" };
        string[] folder = new string[] { "Details" };
        string[] layout = new string[] { "Refresh", "|", "Paste", "|", "Upload" };
    }
    <div class="control-section">
        @Html.EJS().FileManager("filemanager").CssClass("myfilemanger").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings
   {
       Url = "FileOperations",
       GetImageUrl = "GetImage",
       UploadUrl = "Upload",
       DownloadUrl = "Download"
   }).ToolbarSettings(new FileManagerToolbarSettings()
   {
       Items = items
   }).ContextMenuSettings(new FileManagerContextMenuSettings()
   {
       File = files,
       Folder = folder,
       Layout = layout
   }).NavigationPaneSettings(ls => ls.Visible(false)).Path("/" + ViewBag.Code).ToolbarClick("toolbarClick").ToolbarCreate("onCreate").View(Syncfusion.EJ2.FileManager.ViewType.Details).Render()
        <!-- end of filemanager element -->

Thanks,

3 Replies 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team July 10, 2020 01:36 PM UTC

Hi Dawo,  
 
Greetings from Syncfusion support. 
 
We have checked your reported problem  with FileManager component. We were able to reproduce the issue. This problem occurs due to framework limitation of MVC platform. MVC application consider max file size as 5MB . So, your reported issue occurs. 
 
Refer the below stack overflow link: 
 
To resolve your issue, you need to set the maxRequestLength in web.config file. 
 
Refer the below code snippet. 
  <system.web> 
    <compilation debug="true" targetFramework="4.5"/> 
    <httpRuntime targetFramework="4.5" maxRequestLength="1048576"/> 
  </system.web> 
 
 
Refer the below sample. 
 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer

DA Dawo July 14, 2020 03:31 AM UTC

Thanks for the support.


SP Sowmiya Padmanaban Syncfusion Team July 14, 2020 04:22 AM UTC

Hi Dawo,  
  
We are happy to hear that your probelm has been resolved. Please contact us, if you need any help from us. We will happy to assist you. 
  
Regards, 
Sowmiya.P 


Loader.
Up arrow icon