Changes to the System.Uri namespace in version 2.0
Several changes were made to the System.Uri class. These changes fixed incorrect behavior, enhanced usability, and enhanced security.
Obsolete and deprecated Members
- All constructors that have a
For URI schemes that are known to not have a query part (file, ftp, and others), the '?' character is always escaped and is not considered the beginning of a Query part.
For implicit file URIs (of the form
c:\directory\email@example.com), the fragment character ('#') is always escaped unless full unescaping is requested or LocalPath is
UNC hostname support was removed; the IDN specification for representing international hostnames was adopted.
LocalPath always returns a completely unescaped string.
ToString does not unescape an escaped '%', '?', or '#' character.
Operators "==" and "!=" are overridden and linked to the Equals method.
IsLoopback now produces consistent results.
The URI "
file:///path" is no longer translated into
"#" is now recognized as a host name terminator. That is,
http://contoso.com#fragmentis now converted to
A bug when combining a base URI with a fragment has been fixed.
A bug in HostNameType is fixed.
A bug in NNTP parsing is fixed.
A URI of the form HTTP:contoso.com now throws a parsing exception.
The Framework correctly handles userinfo in a URI.
URI path compression is fixed so that a broken URI cannot traverse the file system above the root.