(Microsoft .NET,Microsoft ASP.NET)
by Jason Skowronek
on 10/07/2011
I felt it would be useful (at least for me) to keep a property map available of the System.Uri class and it's respective values as they relate to a standard URI/URL.
This should prove useful when forgetting (which I often do) all the fields and their meanings.
The following table reflects a standard formatted URL:
https://www.example.com/some/path/page.ext:8080?query=value#hashfragment
Here is the reflected output.
| Property |
Value |
| AbsolutePath |
/some/path/page.html |
| AbsoluteUri |
http://www.example.com:8080/some/path/page.html?query=value#hashfragment |
| Authority |
www.example.com:8080 |
| Host |
www.example.com |
| HostNameType |
Dns |
| IsDefaultPort |
False |
| IsFile |
False |
| IsLoopback |
False |
| IsUnc |
False |
| LocalPath |
/some/path/page.html |
| PathAndQuery |
/some/path/page.html?query=value |
| Port |
8080 |
| Query |
?query=value |
| Fragment |
#hashfragment |
| Scheme |
http |
| OriginalString |
http://www.example.com:8080/some/path/page.html?query=value#hashfragment |
| DnsSafeHost |
www.example.com |
| IsAbsoluteUri |
True |
| Segments |
/ some/ path/ page.html |
| UserEscaped |
False |
| UserInfo |
|