Monday
Sep062004
IPAddress class serializable?
Monday, September 6, 2004 at 11:33PM Back in 2002 I posted a question in Usenet about the IPAddress class being serializable, but not serializing in ASP.NET. I just found the post, and noticed that no one responded with the reason why. So, here it is:
There are two types of serialization in .NET: System.Runtime.Serialization and System.Xml.Serialization. Runtime serialization uses the serializable attribute while XML serialization does not. Since ASP.NET uses XML serialization, the attribute was irrelevant.
The error I received was:
System.Net.IPAddress cannot be serialized because it does not have a default public constructor
One of the requirements of the XmlSerializer is that the class it is trying to serialize must have a default public constructor.
in
.NET
.NET 
Reader Comments (9)
You should crosspost this to the newsgroup. Remember, Google is forever. ;-)
So is george.tsiokos.com. :)
I will come five years from now and we'll talk.
Ok, so now it's April of 2009 and you still can't serialize an IPAddress with XmlSerializer. Now what?
Well, its almost 5 years after your posting and its still here.
So? Did he show? Was there a talk?
8 D
5 years later...
Nice! You had posted the same on USENET after all, two years before this weblog entry (unless, of course, the dates here are wrong).
Ran into this problem too and would love a solution.