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

Use a codec to encode your video before you upload it, it usually greatly decreases the size of your video, and some new ones barely reduce quality that it's unnoticeable.