Bineeshcp Viswanath

Bineeshcp Viswanath

  • 1.7k
  • 140
  • 4.6k

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://username@www.testweb.com/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://username@www.testweb.com/httpdocs/uploadedimages/sks_ps_print_03b_20x30cm_300dpi_118.jpg

Answers (2)