Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I am using a simple fileupload control to upload my files. Here is my Uploading code, which is fired after clicking a button.
C#
if (FileUpload1.HasFile)
{
   FileUpload1.PostedFile.SaveAs(Server.MapPath("~/dataNotices/") + FileUpload1.FileName);
} 


It work's good into localhost but when I try to upload something into my web server it's give my an error(authentication). What can I do now. Please help.
Posted

Check this nice tutorial in CP:
File Upload with ASP.NET[^]
And then also check from MSDN[^].
 
Share this answer
 
provide valid permissions to that folder in web server..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900