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();

Shuvojit HalderRank #2,827 · 503 reputationPosted Jun 30, 2015, 11:07 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 30, 2015, 10:42 PM EDT
Prasham SabadraRank #116 · 19.3K reputationPosted Jun 30, 2015, 10:54 PM EDT
paresh gugale56 reputationPosted Jun 30, 2015, 10:56 PM EDT