Dns.GetHostEntry do not work well when hostname to resolve contains \0 character. Call under the hood pass such string to native library which interprets it as an end of the string and thus translation fails. It would be nice to include validation and throw ArgumentException or something like that and do not attempt to translate it at all.
Dns.GetHostEntry do not work well when hostname to resolve contains
\0character. Call under the hood pass such string to native library which interprets it as an end of the string and thus translation fails. It would be nice to include validation and throw ArgumentException or something like that and do not attempt to translate it at all.