System.Runtime.Serialization.InvalidDataContractException in production environment , not in test environment
I’m moving a web service from our test environment to our production environment, and am installing it under “services” The web service works fine in test, but in prod I get this error:
“System.Runtime.Serialization.InvalidDataContractException: Type ‘CustomClass' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.”
This is a class from another library, I have tried to set DataContract and DataMembers, but I still get the same error. I could probably make a wrapper class in the Service project, but I want to avoid it. I’m trying to find what the differences are between the servers (it works on my local machine, the test server and another test server) but I can’t see any difference on the production server. Have anyone experienced something similar? Could someone think of any patches/updates we should have installed?
The servers are:
win 2003 64 bit Sp 开发者_Go百科2 .net 3.5Make sure you have the exact same service pack levels on the test and production servers. Also make sure you have the same version of all the assemblies of the third party library.
精彩评论