Posts

Showing posts from August, 2019

Deal with large file size when uploading

Hosted on IIS Remember in the ASP.NET, we used to set  maxRequestLength  in web.config file to increase the default limit of 4MB. Like, 1 2 3 4 5 < configuration >    < system.web >      < httpRuntime maxRequestLength = "xxx" />    </ system.web > </ configuration > Similarly, for ASP.NET Core application, we can increase the default limit of 30MB by setting  maxAllowedContentLength  property in the  web.config  file. The default ASP.NET Core application template doesn’t create the  web.config  file. It is created when you publish the application. However, you can also add it manually (if not present) to the root of the application with the following code. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <? xml version = "1.0" encoding = "utf-8" ?> < configuration >    <!-- ...