[Extension FtpWebRequest] Error: Invalid URI: The URI scheme is not valid.

[Extension FtpWebRequest] Error: Invalid URI: The URI scheme is not valid.

  
Forge Component
(5)
Published on 28 Jun by André Siébra
5 votes
Published on 28 Jun by André Siébra
I'm getting this error when trying to upload a file

Invalid URI: The URI scheme is not valid.

Here are my parameters:

Host: 
"XX.XXX.XX.XX:XXXX"
User: "TestFTP"
Password: "Test123"
Data: Upload1.Content
FileName:
Upload1.FileName
David -

*Probably* need to prefix that host with "ftp://" so it is "ftp://xx.xxx.xx.xx:xxxx". Also try it without the port number to see if that is the problem... if it is, sounds like the extension would need a minor fix.

J.Ja
host: "ftp://xx.xxx.xx.xx:xxxx"  Invalid URI: Invalid port specified.
host: "ftp://xx.xxx.xx.xxInvalid URI: The hostname could not be parsed.
host: "xx.xxx.xx.xx": Invalid URI: The format of the URI could not be determined.'
Hi David,

I took a look into the extension and found that the Uri is created by concatenating the host with the filename

string uri = ssHost + ssFilename;

This uri should include the full path to where you want to upload your file, e.g.
host = ftp://xxx.xxx.xxx.xxx:xxx
filename = /directory/myfile.ext

This would create when concatenated the Uri ftp://xxx.xxx.xxx.xxx:xxx/directory/myfile.ext

I hope this helps!
Cheers