I have a WCF service which works perfectly when deployed in our dev and test environments, but which falls over in the production environment.
When attempting to browse to the service, the following exception is thrown (inner exception type is InvalidDataContractException):
[ServiceActivationException: The service '/IL.Party.WS/Party.svc' cannot be activated due to an exception during compilation. The exception message is: Type 'IL.Party.MS.Person' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute..]
I can't figure out what's going on here. All three environments are Windows Server 2003, IIS6 and .NET 3.5. On the server where the service fails, I have gone as far as deleting the temp. ASP.NET files to force a recompile. The same code is deployed across 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 of type string, int, DateTime and decimal - so nothing out of the ordinary and definitely serializable.
Does anyone have an idea as to what could be causing this?