WCF ServiceActivationException Confusion

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?

+3
source share
3 answers

Marc_s actually answered this in the comments.

But it seems that the reason is the changes in the data serializer.

http://www.hanselman.com/blog/HiddenGemsNotTheSameOld35SP1Post.aspx

+3

? DataContracts, . , vdir http ?

0

This may be a possible cause. I encountered this error for the same reason discussed below.

Memory gates checking failed because the free memory (258187264 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
0
source

Source: https://habr.com/ru/post/1719714/


All Articles