473,471 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Serializer problem?

Hi,

I use the XmlSerializer in C# to serialize an object containing an email
message to xml. This works often fine, but for some mailmessages the
serialization fails with the message 'There was an error generating the XML
document'

Can the serialization process be dependent on the data in the object
members? If so, what kind of data can cause this problem?

Any help is appreciated.

Albert Jan

ps. the code used:

XmlSerializer serializer = new XmlSerializer(typeof(Pop3Message));
MemoryStream x=new MemoryStream() ;
TextWriter writer = new StreamWriter(x);
try
{
serializer.Serialize(writer, mess);
}
catch(Exception ex)
{
.......


Nov 12 '05 #1
0 973

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LEI Zhangyun | last post by:
hi, I'm a new c++ programmer, I want to find a parser which has c++ sax-event typed serializer. In java, there is not ant problem, we can use the package org.apache.xml.serialize. But, in c++,...
0
by: Andy | last post by:
I was quite happily coding away when all of a sudden I started to get the following message: - An exception occurred while trying to create an instance of SearchApp1.ViewsDisplay. The exception...
0
by: Mark | last post by:
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found"....
1
by: James | last post by:
Hi, I have an array of structures I would like to turn into an XML string using the XML serializer. The problem I am running into is that I get an exception. Depending on what data type I set...
3
by: Mark | last post by:
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found"....
6
by: Dave Veeneman | last post by:
Is XML Serialization worth using to persist classes to file? I've been trying for a day to get it to work on some fairly simple classes. what I'm getting back are error messages like "There is an...
6
by: Wilfried Mestdagh | last post by:
Hi, I use this class to save application settings in a xml file. Sometime I have exception error in the Load method, and sometime in the Save method. Is this a bug in NET or is there something I...
8
by: Q. John Chen | last post by:
I have following code: public class Member { public string FirstName; public string LastName; public string GetXml() { StringBuilder sb = new StringBuilder(); XmlSerializer serializer
1
by: hawkeye.parker | last post by:
using .net 1.1 i think i might want to replace the xml serializer which my .Net webservice uses with a custom serializer. anyone know: a) is this possible? b) if so, is it terribly difficult...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.