problem with OutOfMemoryException
-
hi every body...........i have a problem.i have a web page in which i m uploading an video file by using fileupload control.......before uploading that video file i m checking the size of that video file by the variable FileBytes.then i m checking it with the drive free space .......but this exception named System.OutOfMemoryException occured when i upload the video file of more than 500 MB...the coding i m using is .......... byte[] FileBytes = FileUpload.FileBytes; // the problem is coming in this line as byte is small datatype for the video file of more than 500 MB long freespace =drInfo.AvailableFeeSpace; i want to upload video files of more than 500 MB ...it may be in GB's also preeti1979
-
hi every body...........i have a problem.i have a web page in which i m uploading an video file by using fileupload control.......before uploading that video file i m checking the size of that video file by the variable FileBytes.then i m checking it with the drive free space .......but this exception named System.OutOfMemoryException occured when i upload the video file of more than 500 MB...the coding i m using is .......... byte[] FileBytes = FileUpload.FileBytes; // the problem is coming in this line as byte is small datatype for the video file of more than 500 MB long freespace =drInfo.AvailableFeeSpace; i want to upload video files of more than 500 MB ...it may be in GB's also preeti1979
You are trying to store half a gig in RAM. Using this technique you will need sufficient RAM to achieve yout task and allow everything else that is running to continue to do its job.
Recent blog posts: *Method hiding Vs. overriding *Microsoft Surface *SQL Server / Visual Studio install order My Blog
-
hi every body...........i have a problem.i have a web page in which i m uploading an video file by using fileupload control.......before uploading that video file i m checking the size of that video file by the variable FileBytes.then i m checking it with the drive free space .......but this exception named System.OutOfMemoryException occured when i upload the video file of more than 500 MB...the coding i m using is .......... byte[] FileBytes = FileUpload.FileBytes; // the problem is coming in this line as byte is small datatype for the video file of more than 500 MB long freespace =drInfo.AvailableFeeSpace; i want to upload video files of more than 500 MB ...it may be in GB's also preeti1979
Can you upload without loading the entire file into RAM (i.e. upload in chunks)? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
You are trying to store half a gig in RAM. Using this technique you will need sufficient RAM to achieve yout task and allow everything else that is running to continue to do its job.
Recent blog posts: *Method hiding Vs. overriding *Microsoft Surface *SQL Server / Visual Studio install order My Blog
i have sufficient RAM (2 GB) to store these files.but my problem is that whem i m checking the size of the file i m uploading i have taken the datatype as byte which is not sufficient for the files of size more than 500 MB..what data type can i use to store the size (in bytes) of more than 500 MB....