473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Serialisation error 'System.InvalidOperationException' - when assembly in Gac also.

Hi,
Strange error with serialisaation on .net 1.1 Sp1 when a the assembly
containing the type is in the Gac as well as on e.g c:\customdlls.

ObjValue in below code is populated with and array of classes which
are defined in an assembly loaded from c:\customdlls using loadfrom.
This same assembly is also in the gac. The below code snippet fails on
last line with error

"An unhandled exception of type 'System.InvalidOperationException'
occurred in system.xml.dll

Additional information: There was an error generating the XML
document.
"

Now if i remove the assembly from the Gac all is well!. I've used
process explorer and can see the assembly beiong loaded from the Gac
when xmlSerializer2.Serialize(writer2, ObjValue); is executed .


Code snippet

DataSet ds2 = new DataSet();
XmlSerializer xmlSerializer2 = new
XmlSerializer(ObjValue.GetType());
StringWriter writer2 = new StringWriter();
xmlSerializer2.Serialize(writer2, ObjValue);
Any ideas?

Regards

John

Feb 2 '07 #1
0 1231

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

Similar topics

3
by: hB | last post by:
Hi. Error = "The configuration system can only be set once. Configuration system is already set" Exception Details: System.InvalidOperationExcepti­on: The configuration system can only...
1
by: active | last post by:
ANYONE HAVE ANY IDEA WHAT IS CAUSING THESE ERRORS. HAPPENS ONLY IF I "START' NOT IF I "START WITHOUT DEBUG" I HAVE NO IDEA WHERE TO LOOK FOR THE BUG An unhandled exception of type...
0
by: Nonee | last post by:
Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. Anyway, I "published" the vb.net...
0
by: Nonee | last post by:
Anyone, anyone? : ) Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. ...
0
by: banduraj | last post by:
I get an System.InvalidOperationException when trying to Serialize a struct that has a type refrenced from another library. The exception is: System.InvalidOperationException was unhandled...
3
by: namewitheldbyrequest | last post by:
"The XML element 'EnableTheming' from namespace 'http://tempuri.org/' is already present in the current scope" I created a Web Service: I imported System.Data.SqlClient so I could access SQL...
1
by: Paul E Collins | last post by:
I'm using XmlSerializer.Serialize method from System.Xml.Serialization on one of my own classes and getting the following error: "An unhandled exception of type 'System.InvalidOperationException'...
1
by: OrionLee | last post by:
I am using C# to work with a 3rd party DLL (Nevron Charts), and attempting to serialise it. The serialisation itself is handled somewhere inside the DLL, so to get it to happen you call the Nevron's...
4
by: Miro | last post by:
<i have also added this reply to the other newsgroup - now that I have realizd ( and assuming ) it is not a localized error directly to vb.> I have found this link on the website:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.