'Data changes during fetch on a service on IIS

I am facing quite an interesting error. I have services hosted on IIS, on a server which is an application server. I have two services in focus.

1 - One is a pure WCF service which connects to SAP and fetches data.

2 - Second is a MVC REST API which fetches data from an old *.asmx (Web Service) which is generated by SAP and used s a proxy to expose data via REST API instead of .asmx.

First problem (1) is that this services suddenly returns another value on a property of a DTO which carries result data. When I call the same code from my PC I get the original data. Also when I perform iisreset on the server, data comes corrected for a few days, then returns back to erroneous data.

For example : For user I expect value "A". The service returns "B". I run the same code from my local PC and still get "A". Then I perform IIS reset on server and I get "A" again for a few days.

Second problem (2) is also similar but this time error is persistent. I have a big object (lets say with 40 properties) which returns data. 37/40 of the property values are correct but 3 of them are either 0 or NULL. I call the same code from my local PC and 40/40 properties do return the correct value.

I am sure that both services are up to date. I did test many times but still did not catch why this happens. Everything works but some properties get initial value while running on the server IIS, but from my local PC on Visual Studio debug.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source