paresh gugale

paresh gugale

  • NA
  • 43
  • 59.6k

Often Misused: file upload error

Jul 1 2015 2:39 AM
I was created site in asp.net.
In that i will upload some file using fileupload control it works fine . But at the time of security audit it gives error
as often misused file upload. Please give the solution. 
 
Code Snippet :
 
 string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
        FileUpload1.SaveAs(Server.MapPath("foldername/" + filename));
       
        con.Open();

Answers (4)