473,387 Members | 1,942 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,387 software developers and data experts.

SOAPFormatter "version dependency" problem

After signing all my assemblies with strong keys, I've found that the
application refuses to deserialize any SOAP serialized data. The message
says:

Parse error, no assembly associated with the Xml key.

and refers to the Xml key:

<a1:C_XOptions id="ref-1"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SU2000Plus/sekretariat_RM
%2C%20Version%3D3.99.1371.18778%2C%20Culture%3Dneu tral%2C%20PublicKeyToken%3
D739f0b7b1c47b157">

The problem is caused by the version stamp in the key (3.99.1371.18778) -
after each rebuild the version number is incremented and the deserializer
cannot deserialize the data serialized by the previous version.

Alas, I did not find any simple way to solve the problem. How do I make the
SOAPFormatter version independent? Note that the problem started to occur
after I've signed all assemblies.

I use SOAPFormatter to store the internal settings of my application. I
cannot use XmlSerializer because it cannot handle the complicated structure
of the settings. The SOAPFormatter was the great choice until now. I have to
find a way to make it "version independent" because it would be really
annoying for the user to lost his/her setting with each new version of the
application.

Is there any simple solution? Thanks in advance for any help,
Wiktor Zychla
Nov 11 '05 #1
2 4716
Use a serialization Binder to control the types the formatter creates. In
the binder code you can take an old type and tell the runtime to use the
current type. Jeff Richter wrote 3 articles on this subject - here's a link
to the 3rd one.
http://msdn.microsoft.com/msdnmag/issues/02/09/net/
"Wiktor Zychla" <ie****@microsoft.com.no.spam> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
After signing all my assemblies with strong keys, I've found that the
application refuses to deserialize any SOAP serialized data. The message
says:

Parse error, no assembly associated with the Xml key.

and refers to the Xml key:

<a1:C_XOptions id="ref-1"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SU2000Plus/sekretariat_RM %2C%20Version%3D3.99.1371.18778%2C%20Culture%3Dneu tral%2C%20PublicKeyToken%3 D739f0b7b1c47b157">

The problem is caused by the version stamp in the key (3.99.1371.18778) -
after each rebuild the version number is incremented and the deserializer
cannot deserialize the data serialized by the previous version.

Alas, I did not find any simple way to solve the problem. How do I make the SOAPFormatter version independent? Note that the problem started to occur
after I've signed all assemblies.

I use SOAPFormatter to store the internal settings of my application. I
cannot use XmlSerializer because it cannot handle the complicated structure of the settings. The SOAPFormatter was the great choice until now. I have to find a way to make it "version independent" because it would be really
annoying for the user to lost his/her setting with each new version of the
application.

Is there any simple solution? Thanks in advance for any help,
Wiktor Zychla

Nov 11 '05 #2
> Is there any simple solution? Thanks in advance for any help,

ok, I've finally found the solution: I use a simple SerializationBinder.
thanks, anyway.
Nov 11 '05 #3

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

Similar topics

1
by: (Pete Cresswell) | last post by:
I'm putting a little table in my DB that I'll call zstblVersion. ("..stbl" for System Table, "z" so it sinks to the bottom of the list and doesn't look like something to do with the app) The...
2
by: Amil Hanish | last post by:
I am trying to use XmlTextWriter. I write the xml data fine, but the file is missing the first line that shows the version and encoding: <?xml version="1.0" encoding="utf-8"?> Can the...
2
by: DraguVaso | last post by:
Hi, I have a simple question regardign the syntax: do I have to need double quotation marks or single qoutation marks in my XML? For exemple:µ <?xml version="1.0" or <?xml version='1.0'
2
by: Wiktor Zychla | last post by:
After signing all my assemblies with strong keys, I've found that the application refuses to deserialize any SOAP serialized data. The message says: Parse error, no assembly associated with the...
6
by: **Developer** | last post by:
I have a couple of instances where using "Auto" did not work so I tried the "A" version of the DLL and it works. Tried the "W" version and it doesn't. Anyone have any idea why that might...
3
by: Eric Newton | last post by:
Given databinding an array of System.Version types: Given that "SomeObject" type has a Version property: public class SomeObject { public Version Version { get; } public string Description {...
2
by: ashwinij | last post by:
Hello The steps which i am doing in my program 1) I am having an xml file. 2) I am performing some updations in the file using XQueryUtil class from nux package. 3)After that i am...
3
by: jariwaladivyesh | last post by:
Hi frnds, i have simple XML doc <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <data> <name> Divyesh Jariala</name> </data>
0
by: =?Utf-8?B?QmVybnJkIE5vcm1pZXI=?= | last post by:
The code in question is very simple: PACL acl = 0; PACL newAcl = 0; PSECURITY_DESCRIPTOR sd = 0; DWORD res = GetNamedSecurityInfo(const_cast<char*>(path.c_str()), type,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.