Take the 2-minute tour ×

What I am trying to accomplish is to upload some files from one domain on my GoDaddy hosting to another domain on the same hosting where the files will be displayed. When I debug the application, the process gets to the SaveAs() method and then throws the exception,"Could not find a part of the path ..." .

I have followed these instructions on finding my site's folder's absolute path and I have implemented this path in my code, using the same method I've been using for a good part of my file uploading, and I have never ran into any problems. My read/write permissions are allowed for the folder that I'm attempting to save these files in.

I'm wondering "Is it because I'm trying to upload the file to a different directory?". If so, is there a better way to accomplish this?

var fileName = Path.GetFileName(file.FileName);                            
var path = @"D:\Hosting\someNumbers\html\SiteFile\SiteImages\" + fileName;
myObject.FilePath1 = path;

Any help will be highly appreciated.

share|improve this question
This is most probabbly security issue. Ylu just not allowed to write or read from the locations you acess. –  Tigran Sep 11 '12 at 21:10

1 Answer 1

up vote 0 down vote accepted

As it turns out, my error was more or less a security issue with GoDaddy's hosting. GoDaddy sees this type of action as a "third party FTP request", which is not allowed. In conclusion, GoDaddy does not allow a user to upload a file on one site, and then FTP that file to another site on the same hosting plan.

share|improve this answer

Your Answer


