Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Uri Class broken for authenticated URIs?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leonard Chung - 06 Nov 2006 09:02 GMT
I'm trying to create an authenticated session to a remote FTP server using
the FtpWebClient class which takes a URI. Problem is, the URI doesn't seem to
accept standard ftp://username:password@server/ URIs and gives me the
following error when I try to get the propery serverUri.uri from below:

{"Invalid URI: A port was expected because of there is a colon (':') present
but the port could not be parsed."}    System.FormatException
{System.UriFormatException}

Does anybody know what's going on?

           UriBuilder serverUri = new UriBuilder();
           serverUri.Scheme = Uri.UriSchemeFtp;
           serverUri.Host = "servername.com";
           serverUri.UserName = "username";
           serverUri.Password = "password";

Thanks,

Leonard
Mubashir Khan - 06 Nov 2006 11:08 GMT
why dont you provide port as well ........

> I'm trying to create an authenticated session to a remote FTP server using
> the FtpWebClient class which takes a URI. Problem is, the URI doesn't seem
[quoted text clipped - 18 lines]
>
> Leonard
Leonard Chung - 06 Nov 2006 19:16 GMT
This happens with a port specified as well...

> why dont you provide port as well ........
>
[quoted text clipped - 20 lines]
> >
> > Leonard

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.