D
Doug Handler
Hi,
I'm trying to serialize a customer exception via the XMLSerializer. I've
done it via Soap and Binary and all works fine, but ideally need it done via
the XMLSerializer. When i run the code i get an InvalidOperationException
on the first line. Any help would be extremely appreciated. Thanks in
advance. Doug
Here's the code:
public static void SerializeExceptionXML(Exception e)
{
XmlSerializer xmlFormat = new XmlSerializer(typeof(InvalidChannelException),
new Type[]{typeof(InvalidChannelException)});
stream = new FileStream(CHANNEL_EXCEPTION_FILENAME + ".xml",
FileMode.Create, FileAccess.Write, FileShare.None);
xmlFormat.Serialize(stream, e);
stream.Close();
}
I'm trying to serialize a customer exception via the XMLSerializer. I've
done it via Soap and Binary and all works fine, but ideally need it done via
the XMLSerializer. When i run the code i get an InvalidOperationException
on the first line. Any help would be extremely appreciated. Thanks in
advance. Doug
Here's the code:
public static void SerializeExceptionXML(Exception e)
{
XmlSerializer xmlFormat = new XmlSerializer(typeof(InvalidChannelException),
new Type[]{typeof(InvalidChannelException)});
stream = new FileStream(CHANNEL_EXCEPTION_FILENAME + ".xml",
FileMode.Create, FileAccess.Write, FileShare.None);
xmlFormat.Serialize(stream, e);
stream.Close();
}