[Mono-bugs] [Bug 471149] New: System.UriFormatException thrown when downloading a file from ftp server using FtpWebRequest

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 16:28:51 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=471149


           Summary: System.UriFormatException thrown when downloading a
                    file from ftp server using FtpWebRequest
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: 32bit
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: sdasari at rccny.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=269024)
 --> (https://bugzilla.novell.com/attachment.cgi?id=269024)
Source code

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1;
NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR
3.5.30729; .NET CLR 3.0.30618)

Following exception is thrown when trying to file download a file from ftp
server:

Unhandled Exception: System.UriFormatException: Invalid URI: The format of the
U
RI could not be determined: /" is current directory/
  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000]
  at System.Uri..ctor (System.String uriString) [0x00000]
  at System.Net.FtpWebRequest.GetRemoteFolderPath (System.Uri uri) [0x00000]
  at System.Net.FtpWebRequest.CWDAndSetFileName (System.Uri uri) [0x00000]
  at System.Net.FtpWebRequest.ProcessMethod () [0x00000]
  at System.Net.FtpWebRequest.ProcessRequest () [0x00000]

Attached in the attachments is the source code that reproduces the exception. 
Mono that was used to run is mono 2.2 for windows downloaded from
http://www.go-mono.com/mono-downloads/ 

Reproducible: Always

Steps to Reproduce:
1. Setup ftp server.  (ftp server was setup on windows os)
2. Compile attached source code(code was compiled using .net 3.5 compiler
csc.exe).  Depending on ftp server setup uri and server credentials in the code
will need to be changed.
3. Run output exe under mono
Actual Results:  
Following exception is thrown: System.UriFormatException: Invalid URI: The
format of the U
RI could not be determined: /" is current directory/


Expected Results:  
File will be downloaded from ftp server.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list