[Mono-bugs] [Bug 402263] New: Uri: UriFormatException when URI contains Windows path

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jun 20 14:03:07 EDT 2008


           Summary: Uri: UriFormatException when URI contains Windows path
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gert.driesen at pandora.be
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

On Windows, when the URI contains a Windows path the following exception is

Unhandled Exception: System.UriFormatException: Invalid URI: Invalid port

  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000]
  at System.Uri.ParseUri (UriKind kind) [0x00000]
  at System.Uri.Parse () [0x00000]
  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000]
  at System.Uri..ctor (System.String uriString) [0x00000]
  at (wrapper remoting-invoke-with-check) System.Uri:.ctor (string)
  at Program.Main (System.String[] args) [0x00000]

To reproduce, compile and run the following code:

using System;

class Program
        static void Main (string [] args)
                Uri uri = new Uri (@"file://D:\mono");
                Console.WriteLine (uri.ToString ());

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