Question

I have a requirement to store a Serialized [using Binary Serialization] Object during Create/Update/Delete in database for Audit Purposes. Another requirement is to be able to view the differences between 2 audit log entries at any point of time, i.e. to be able to Deserialize 2 objects of the same type and compare their property values.

Now all this is cool until you release a new version in which this audited object has changed - say you have removed a couple of properties and added a new one: now try to Deserialize into it from an old audit log entry and it would fail.

Our webserver admins are very strict and would not let us install anything in GAC, so the question is how to resolve this problem assuming you only have latest Assemly version installed?

Was it helpful?

Solution

For new fields, you have the OptionalFieldAttribute

Next to that, I think you'll enjoy this article on MSDN.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top