1

I am uploading large video files on server and tested with 500 MB files.

But I want to know is there any limit on file upload in asp.net related to file size.

I have used following post

how to do multi-part video upload using api

and modified to read and write 32 KB at a time instead of reading complete file in memory.

Community
  • 1
  • 1
donstack
  • 2,557
  • 3
  • 29
  • 44
  • 2
    See http://stackoverflow.com/questions/288612/how-to-increase-the-max-upload-file-size-in-asp-net – L-Four Apr 11 '13 at 13:24
  • thanks for information. Is there any limit on Window Service related to file size for upload. – donstack Apr 11 '13 at 13:31

2 Answers2

2

The default maximum, imposed by ASP.NET, is 4MB. However you can change that by setting the maxRequestLength in the web config.

Mike Perrenoud
  • 66,820
  • 29
  • 157
  • 232
0

If you edit your web.config and change the maxRequestLength property in your httpRuntime it is a System.Int32 so it has a maximum value of 2,147,483,647 (about 2gb).

chris_dotnet
  • 844
  • 9
  • 14
  • what about files larger than 2GB – donstack Apr 11 '13 at 13:32
  • With such large files sizes you should probably use chunks. Examples: http://dotnetslackers.com/Community/blogs/haissam/archive/2008/09/12/upload-large-files-in-asp-net-using-httpmodule.aspx http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx – chris_dotnet Apr 11 '13 at 14:08