Http 500 Service could not be activated

I’d like to share the solution to an issue that I’ve been searching for almost a day. I had a working logic app that suddenly returned the following error:

The requested service, ‘https://…/Service.svc’ could not be activated. See the server’s diagnostic trace logs for more information.

The information on the server error was very scarce. I tried to reinstall the web app (which was a SOAP service by the way, not a REST service). I restarted the web app. I entirely through it away. I debugged the service (to see that the operation was not entered). I checked username/password of the service. Everything seemed to be correct. Then I checked the service contract. That also looked fine. And then I actually came to the last resort. The operation signature has a request message and a response message. I carefully checked tjhe request message and I saw there was a minor yet important change in the data contract. The datatype in the XmlElement annotation had to be DataType=decimal, not DataType=integer.

[System.Xml.Serialization.XmlElementAttribute(DataType = “decimal”, Order = 6)] public decimal Versionnumber

If you receive a Http 500 error and there’s nothing wrong with the service, carefully check the data contracts used.