I want to upload a file size of 1 GB with ASP.NET . I Write This Code
Dim bytes(up_FileImage.UploadedFiles(0).ContentLength) As Byte
bytes = File.ReadAllBytes(Path.Combine(Request.PhysicalApplicationPath, "App_Data/", ViewState("DirectoreName").ToString(), up_FileImage.UploadedFiles(0).FileName))
itemDocFile.FileImage = bytes
and in web.config Write this Code
<httpRuntime maxRequestLength="102400" executionTimeout="3600"/>
but in First Line I Get this Error
system.out of memory exception
Please Help Me. Thanks All
Uploading a file that large is unadvisable. Here's some alternatives: https://stackoverflow.com/a/17904718/902874