Wrox Programmer Forums
|
Book: C# 2008 Programmer's Reference ISBN: 978-0-470-28581-7
This is the forum to discuss the Wrox book C# 2008 Programmer's Reference by Wei-Meng Lee; ISBN: 9780470285817
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Book: C# 2008 Programmer's Reference ISBN: 978-0-470-28581-7 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 2nd, 2008, 09:36 PM
Registered User
 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem parsing path

I'm getting further into C# and have been working with the Windows Application example from Chapter 16. I've downloaded the sample code and it works fine connecting to a MS FTP server I have running.

However, when I try to recreate the code myself (and I've checked and rechecked it), I'm generating an error related to the FTP request to get the directory/path data that leads to "Invalid URI: The hostname could not be parsed." It's pretty obvious what is happening, as the Status Strip clearly shows that once I connect to the FTP server, all sub-directories are separated with "\" instead of "/". So I see [f]tp://xxx.xxx.x.x\JeffsPic\MorePics when I know I should see [f]tp://xxx.xxx.x.x/JeffsPic/MorePics

I can view all the directories, but when I attempt to select a file, or upload one from a local location, I get the above message.

Again, the sample code works fine, so I know it is not the PC, my version of VS2008, or the FTP server.

Is there something else in this example other than the code that could generate this error? I have included System.IO and System.Net as required and I'm stumped, since my code appears absolutely identical to the sample

Thanks for any help you can offer.

 
Old December 4th, 2008, 04:43 PM
Registered User
 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just a bit more info, in case any of you that have looked at my initial post have ideas.

Not only does my code login to the FTP server properly, but I can create a new folder on the FTP server and I can upload files to the root of the FTP server. However, because my code still fails to parse the path correctly, I cannot upload to any sub-directory, or delete any file or sub-directory.

Hope you can help.

-Jeff






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in XML parsing denzil_cactus Perl 3 December 18th, 2008 03:56 PM
Parsing a string problem poyserr Access 4 February 28th, 2007 08:19 AM
Implementing the all-path shortest path problem bitwords XSLT 1 December 6th, 2006 11:37 AM
XSLT simple parsing problem misu XSLT 3 August 18th, 2004 02:00 AM
Parsing Problem - help! philz XML 5 March 5th, 2004 05:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.