file upload

  • Thread starter Thread starter Eugene Anthony
  • Start date Start date
E

Eugene Anthony

I used the code example bellow to upload files. It works well for a 3 mb
file. However when I tried a 30 mb file it does not work.

string filename = ""
string filetype = FileUpload1.PostedFile.ContentType;
int filesize = FileUpload1.PostedFile.ContentLength;
FileUpload1.PostedFile.SaveAs(filename)

How do I solve the problem?

Eugene Anthony
 
Just add this to you web.config file this will enable you to be able to
upload a 2 gig file

<httpRuntime executionTimeout="6000" maxRequestLength="2097151"/>
 
Back
Top