WCF Call breaking when some of the dlls are obfuscated...

You get an error with the following words in it:

"WCF obfuscated dll Error line position Element _BackingField from namespace not expected"

A moron once told me that there is no need to put DataContract and DataMember attributes for the entity objects anymore. I did not listen, he went ahead and stopped putting it in.

Turns out, if any of the moron's entity classes are modified to add more fields later, the WCF call to the server which takes the entity breaks with this weird error.

Looks like the obfuscator handles classes with these attributes while it creates problems when the class does not have the attribute.

This is why whenever we ran code with obfuscation it failed, while the code without obfuscation from the exact same source code works fine.

REF: http://stackoverflow.com/questions/5921635/is-datacontract-attributes-required-for-wcf

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Enable Visual Studio to use more than 2GB of memory