Invalid Uri: invalid port specified C#
I recently created a FTP Server locally with FileZilla Server. With the
admin port 14147 by default. Then with the FileZilla Client I got
connected with no problems.
When I try to connect by chrome or ie with
ftp://(ip)
or
ftp://(full machine name)
or
ftp://(user:password)@(machine).
Everything is ok.
My admin interface setting port is 14147. My listing port by default is 21
No problems at all with Internet browsers even with telnet.
Now I created an application in C# and when I use the Uri class
Uri target = new Uri(strUri);
I got an exception error: Invalid Uri: invalid port specified
I saved the ftp address in a database like this and I tried many
variations but nothing happens:
ftp://user:password@FullMachineNameWithDomain
ftp://user:password@FullMachineNameWithDomain:21
ftp://user:password@FullMachineNameWithDomain:14147
What am I doing wrong?
No comments:
Post a Comment