I am using Directory.Exists(uncPath) with a UNC path, now it fails if I use the standard IPv6 address. Is there code available which can take care of all formats of unc – ipv4/ipv6/machiname.
Currently I convert my ipv6 address to something like 2001-0-234-c1ab-0-a0-aabc-3e.ipv6-literal.net and it works, but Ipv6 itself can be represented in multiple formats. I need something which will handle all formats.
The ipv6-literal.net notation is the only way to use an IPv6 UNC on windows.
You need to take your IPv6 litteral & replace
:with-,%withsand appendipv6-literal.net.