Bineeshcp Viswanath

Bineeshcp Viswanath

  • NA
  • 140
  • 39.8k

File Upload to host server issue in asp.net c# application

Apr 30 2019 6:34 AM
Hello All,
I need your help to solve a file upload issue in asp.net c# project.
 
I am trying to upload file into the hosted site folder using ftp. my filepath is looks like below
 
filename : "ftp://[email protected]/httpdocs/uploadedimages/" + fileUpload.FileName
 
fileUpload.SaveAs(filename);
 
The above code has thrown an exception:-
 
Could not find a part of the path 'C:\httpdocs\uploadedimages\sks_ps_print_03b_20x30cm_300dpi_118.jpg'.
 
my proper filepath has to be like this :ftp://[email protected]/httpdocs/uploadedimages/sks_ps_print_03b_20x30cm_300dpi_118.jpg

Answers (2)