Deserializing Serialized XML failes in .NET 2

G

Guest

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/ns...ture=neutral, PublicKeyToken=c8c9a20b0583cd1d
TemplateManager

at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessGetType(String value, String xmlKey, String& assemblyString)

at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessType(ParseRecord pr, ParseRecord objectPr)

at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessAttributes(ParseRecord pr, ParseRecord objectPr)

at System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren()

at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()

at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()

at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)

at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(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 currentTemplateID;
[NonSerialized]
public ArrayList oList=null;//not serializable
[NonSerialized]
public PrintDetails printDetails=new PrintDetails();
/// <summary>
/// Determines wether to save the designer as
/// binary or SOAP
/// </summary>
[NonSerialized]
public bool IsBinaryFormatter=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
 
C

chanmm

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top