question

Forrest-0967 avatar image
0 Votes"
Forrest-0967 asked vb2ae answered

MSDN Forum: system.uri doc url example error

https://docs.microsoft.com/en-us/dotnet/api/system.uri?view=net-6.0

code snippet Uri uri = new Uri("https://user:password@www.contoso.com:80/Home/Index.htm?q1=v1&q2=v2#FragmentName"); using https with 80 port. I think this example url is not suitable and invalid. By the way, is there a function about validating url https with 443, http with 80?


Thanks

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

vb2ae avatar image
0 Votes"
vb2ae answered

I agree with you it should not include the :80. You should be able to submit an edit to the doc if you are signed in

202022-image.png



image.png (18.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.