I have a WCF service that works great when deployed to our dev and test environments, but that crashes in production.
When trying to switch to a service, the following exception is thrown (the internal type of the exception is InvalidDataContractException):
[ServiceActivationException: service /IL.Party.WS/Party.svc cannot be activated due to an exception at compile time. Exception message: Type "IL.Party.MS.Person" cannot be serialized. Consider labeling it with the DataContractAttribute attribute and mark all of its members that you want to serialize with the DataMemberAttribute ..]
I can not understand what is happening here. All three environments are Windows Server 2003, IIS6, and .NET 3.5. On a server where the service is not working, I deleted the timeline. ASP.NET files to force recompilation. The same code is deployed in all three environments. If "IL.Party.MS.Person" was not serializable, I would expect to get this error in all three environments. The Person type has fields like string, int, DateTime, and decimal — so nothing unusual and definitely serializable.
Does anyone have an idea as to what could be causing this?
user187113
source
share