[Nicholas Paldino]> And the XML will not work because the file is
^already^ serialized from another program.
Ah - right, misunderstood. Yes, if the OP *already* has the serialized
file, then, well, it gets very tricky.
My reply was to "if I am /designing/ a system that (as a requirement)
must be able to do this..." - in which case a data-contract is a
perfectly viable solution - but no, it absolutely won't allow you to
read output from BinaryFormatter...
But then, the same applies to your own suggestion of using a shared
assembly from both projects - it is presumably already too late to
change the one that produced the existing file.
Marc
Thank you very much again. Since you have asked the requirement, here
is what is happening. We have a massive project which does all these
work and I do have these serialised object in a seperate dll. Now I
got a special request from one of a biggest client, they want to
update this serialised object in all their install with specific
information. I do have an option on the GUI to update the serialised
object. But client said, users tend to make mistake and the IT
department want to update it through back door, by asking all the
users in the company to run a program from network and 'this' program
will read the clients serialised object and update it.
So here is what I went about, I created a program referenced the dll
to update the object and everything worked ok. I signed the
application with the certificate and ran a test in one of our server,
dll failed with security exception stating the dll doesn't have enough
security and has to be given full trust. Now I ran a caspol on it
manually and it worked. I could have added the caspol command in a
batch program and let the client run the batch program, where the
caspol runs first then run the actual program. But the server location
where I need to point to the dll can not be hardcoded since there are
multiple server location the clients could point to. So I thought, if
somehow I can access the serialised object through the main program
instead of the dll I could resolve the problem without running caspol.
This is my story
![Frown :( :(](/styles/default/custom/smilies/frown.gif)