473,657 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deserializing Serialized XML failes in .NET 2

Hello,

We have a serialized XML from version 1.1 of .NET Framework and want to
deserialize it in .NET Framework 2.0, but it failes to do so with the
following error:

Parse Error, no assembly associated with Xml key
a1:http://schemas.microsoft.com/clr/nsa...c9a20b0583cd1d
TemplateManager

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Pro cessGetType(Str ing value, String xmlKey, String& assemblyString)

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Pro cessType(ParseR ecord pr, ParseRecord objectPr)

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Pro cessAttributes( ParseRecord pr, ParseRecord objectPr)

at System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Sta rtChildren()

at System.Runtime. Serialization.F ormatters.Soap. SoapParser.Pars eXml()

at System.Runtime. Serialization.F ormatters.Soap. SoapParser.Run( )

at
System.Runtime. Serialization.F ormatters.Soap. ObjectReader.De serialize(Heade rHandler handler, ISerParser serParser)

at System.Runtime. Serialization.F ormatters.Soap. SoapFormatter.D eserialize(S

TemplateManager is the classs which we serialized it in 1.1. Also the
version of this project has not changed from 1.1 to 2, only .NET Framework
version has changed.

This is how TemplateManager is defined:

[Serializable]
public class TemplateManager :IDisposable
{
private ArrayList list=new ArrayList();

[NonSerialized]
public int currentTemplate ID;
[NonSerialized]
public ArrayList oList=null;//not serializable
[NonSerialized]
public PrintDetails printDetails=ne w PrintDetails();
/// <summary>
/// Determines wether to save the designer as
/// binary or SOAP
/// </summary>
[NonSerialized]
public bool IsBinaryFormatt er=false;
public TemplateManager ()
{

}
public void Dispose()
{
list.Clear();
list=null;
if(oList!=null)
{
oList.Clear();
oList=null;
}
}
/// <summary>
/// Loads all the controls
/// </summary>
private void Load()
{
//somw codes
}
}//End of class

--
Mike
May 30 '06 #1
1 1943
I think it will be great if you attach you code as a cs file here. So I can
just include in a project and play with it. Is that ok?

chanmm

"Mike9900" <Mi******@discu ssions.microsof t.com> wrote in message
news:62******** *************** ***********@mic rosoft.com...
Hello,

We have a serialized XML from version 1.1 of .NET Framework and want to
deserialize it in .NET Framework 2.0, but it failes to do so with the
following error:

Parse Error, no assembly associated with Xml key
a1:http://schemas.microsoft.com/clr/nsa...c9a20b0583cd1d
TemplateManager

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Pro cessGetType(Str ing
value, String xmlKey, String& assemblyString)

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Pro cessType(ParseR ecord
pr, ParseRecord objectPr)

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Pro cessAttributes( ParseRecord
pr, ParseRecord objectPr)

at
System.Runtime. Serialization.F ormatters.Soap. SoapHandler.Sta rtChildren()

at System.Runtime. Serialization.F ormatters.Soap. SoapParser.Pars eXml()

at System.Runtime. Serialization.F ormatters.Soap. SoapParser.Run( )

at
System.Runtime. Serialization.F ormatters.Soap. ObjectReader.De serialize(Heade rHandler
handler, ISerParser serParser)

at
System.Runtime. Serialization.F ormatters.Soap. SoapFormatter.D eserialize(S

TemplateManager is the classs which we serialized it in 1.1. Also the
version of this project has not changed from 1.1 to 2, only .NET Framework
version has changed.

This is how TemplateManager is defined:

[Serializable]
public class TemplateManager :IDisposable
{
private ArrayList list=new ArrayList();

[NonSerialized]
public int currentTemplate ID;
[NonSerialized]
public ArrayList oList=null;//not serializable
[NonSerialized]
public PrintDetails printDetails=ne w PrintDetails();
/// <summary>
/// Determines wether to save the designer as
/// binary or SOAP
/// </summary>
[NonSerialized]
public bool IsBinaryFormatt er=false;
public TemplateManager ()
{

}
public void Dispose()
{
list.Clear();
list=null;
if(oList!=null)
{
oList.Clear();
oList=null;
}
}
/// <summary>
/// Loads all the controls
/// </summary>
private void Load()
{
//somw codes
}
}//End of class

--
Mike

May 30 '06 #2

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

Similar topics

1
2048
by: Justin Armstrong | last post by:
I'm having difficulties deserializing some objects. Consider the following example of what I'm trying to do: ---------------------------------------------------------- class Person { string name; } class Info {
3
8081
by: Chrigel | last post by:
Hi all, We have problems deseralizing objects previously serialized as XML. This did work fine with .NET 1.1 but since we have installed SP1, deserializing fails (but serializing works). The error occurs within the following line "return formatter.Deserialize(xmlReader) as ParameterList;" and the "innerexception" sais "The root element is missing.". Thanks for any hints
5
5017
by: Lucas | last post by:
Well, here's the situation.. It's pretty simple; just that I can't get it to work. I have 2 Executables.. The first one is called CSharp.exe which is a simple WinForm App. I have a single button on the form which does the following OnClick. // CSharp.cs private void button1_Click(object sender, System.EventArgs e)
2
3091
by: Earl Teigrob | last post by:
I am saving and restoring value types such as Int32, DateTime and Boolean in strings. I was wondering if there is a mechanism build into .NET for serializing and deserializing these to string format. I can, of course, serialize a class to a file, either binary or XML, but this is not what I am looking for. Currently I am using ToString() or Convert.xxx to do this, but thought that if there was a true serializer, deserializer, that would be...
6
1579
by: Steve Teeples | last post by:
I use serialization to write class data to a file. During my development of this class I need to add properties or fields on occation. After adding a property, when deserializing the data saved to disk I get an exception error indicating that the class data members no longer match. To avoid the exception errors, how can I retrieve data from the disk and populate the existing fields found within the file and set defaults for the new...
7
16056
by: farseer | last post by:
Hi, i am getting an error when trying to deserialize and xml. the error is shown below. i get this error regardless if i try to desearialize in C# or VB. the XML itself does infact contain a top level "PDocument" note which contains an xmlns namespace and some other attriute. is the error belowing telling it doesn't like that namespace declaration? how can i programmactically fix this, as i do not have control of the xml i recieve...i...
2
2450
by: Drolem | last post by:
Hello All, I use the following method to serialize a settings class to a string: '======================================================================= Public Shared Function DeflateClass(ByVal serializing As Object, ByVal typeSerializing As System.Type) As String Dim writer As StringWriter = New StringWriter Dim serializer As XmlSerializer = _
5
2603
by: Veilchen | last post by:
Hi, I need to deserialize an existing object (not generate its code) from a serialized XML file. The only information I have about how the deserialization method is an input XML schema (which can vary) associated with the XML file containing the serialized object data. Therefore pre-defining it in code using xml attributes on the serialized class narrows it to only one serialization method and won't do. How can I use the schema to...
0
2797
by: theonlydavewilliams | last post by:
Hi there I'm hoping there's an easy answer to a (hopefully) not too long-winded issue... I'm building a C# web client using a proxy wsdl.exe'd from a wsdl file and six schemas, each in a different namespace. Some schemas extend complex types in others. When i get a soap:Fault from my test server it could contain a serialized exception object (called fault) from one of two of these schemas (and different namespaces, call them xmlns:b0="ns1" and...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7320
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.