Henrik:
I am not positive, but your description sounds like to could be a security
permission thing (in the first case). Check to make sure that the code
deserializing the object has the appropriate permissions.
In the second case, remember that serialization is senstivie to versioning
(the version of the assembly also includes the signing information). Make
sure that your serialization code is taking the versions into account. If
you serialized version A.B.C.D, you need to deserialize at least A.B (C.D
can be different, if memory serves).
So, check the permissions. If there are OK, you have a version mismatch
problem.
Hope this helps,
John Puopolo
"Henrik Skak Pedersen" <no**********@n othing.com> wrote in message
news:O0******** ******@TK2MSFTN GP14.phx.gbl...
Hello,
I have a class which is beeing serialized/deserialized using the
BinaryFormatter class. That has been working with no problems until I
signed all my assemblies. Now I get a SerializationEx ception when I try to
Deserialize the class which has been serialized before the signing. So
what is best practice in my situation?
Do I have to convert all my saved classes or do I write a
SerializationBi nder to handle it runtime?
If I delete all my data and run fra scratch it works fine until I compile
my assembly. Then the assembly gets a new versioand it fails on the version.
Why do I get this error now, i did'nt get it before I signed the assembly?
Best regards
Henrik Skak Pedersen