IPAddress.Parse for IPv6

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I want to parse a multicast address string into an object of type IPAddress

So i use the IPAddress.Parse(string theIPAddress) method

It works fine with 224.5.6.7, pure IPv
It throws an exception, saying that the provided address has an incorrect format, when I pass in the string
("2002:e005:607::1/48"
o
("2002:e005:607::1/48"

Or pretty much anything ive tried already

Thank you for advices

Ben
 
Ben said:
Hi all,

I want to parse a multicast address string into an object of type IPAddress.

So i use the IPAddress.Parse(string theIPAddress) method.

It works fine with 224.5.6.7, pure IPv4
It throws an exception, saying that the provided address has an incorrect format, when I pass in the string:
("2002:e005:607::1/48")
or
("2002:e005:607::1/48")

Or pretty much anything ive tried already.

I believe that you must have the IPv6 protocol installed on the machine
for it to work (this is a Winsock requirement).

Also, IPAddress.Parse (which is built on WSAStringToAddress()) does not
deal with subnet masks, so you need to drop the "/14" from the end of
the address.
 
Back
Top