503
Views
4
Comments
[Extension FtpWebRequest] Error: Invalid URI: The URI scheme is not valid.
Question
extension-ftpwebrequest
Service icon
Forge asset by Daniel Lourenço
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
2019-11-12 17-31-26
Justin James
 
MVP
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
UserImage.jpg
DAVID CHEN
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.'
2020-03-05 15-52-45
André Vieira
Staff
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

UserImage.jpg
Dhavan Shekarappa

Hi André,


I'm getting same error even on sending parameters as specified. Can you please let me know if there is any configuration I'm missing?


Thanks,

Dhavan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.