IIS 7 and Above
Issue in WS 2019 that does not show in WS2016
Last post Jan 15, 2021 02:16 AM by Brucz
Jan 13, 2021 08:53 PM|WillDiamond|LINK
We have a simple IIS application that makes a call to an outside api. It works fine on all (5) our IIS servers, except for our Production server (naturally...) I am adding the error message at the bottom of this post.
The 2 environmental differances of note are that the Production server is an Azure IIS Server, and it is the only one that has Windows Server 2019 OS.
Our developer is trying to resolve it, but it feels like he is spinning.
Jan 14, 2021 02:30 AM|Brucz|LINK
This is a very strange problem. I checked the upgrade of windows server2019 compared to 2016, but these upgrades will not affect the operation of the application.
I think the serialization library used by the application may behave differently in different versions of the server.
If you have other versions of windows server, you can run on it to see the results.
You can add [ScriptIgnore] in your Class property to tell not to serialize object that may cause such a circulate issue.
This attribute will ignore the serialization of the object or class and will be empty in the output Json.
Then you can define a simple serialization method to serialize the class or object.
Or reduce the circular reference of the object, assign the object that needs to be serialized to a new object, and then serialize the new object.
Jan 14, 2021 09:33 PM|WillDiamond|LINK
Thanks for the suggestion, I passed it along to the developer.
Jan 15, 2021 02:16 AM|Brucz|LINK
I suggest you use Json.net. This library has more powerful functions and can solve many serialization problems.
You can try it.