Solution of getting error, when user will try to upload more than 4MB file in your website.
Here the solution is given that if you want to allow the file size of upload file in your website which is more than 4MB then you can increase that default size with your size.
In ASP.Net User can't upload file which is more than 4MB,
because by default maximum size of file for upload is only 4MB.
So now what is the solution if you want to allow more than
4MB file in your website? At that time you can increase the value of “maxRequestLength”
attribute of “machine.config” file.
Using <httpRuntime> element you can set file size like
below.
Join the conversation! Your thoughts help the community grow.