472,373 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,373 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 4665
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,...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.