While troubleshooting a “500 Internal Server Error”, I saw this error in the Failed Request Tracing log:
500.19 Internal server error %1 is not a valid Win32 application 0x800700c1
Solution for “500.19 %1 is not a valid Win32 application” error
After comparing the working and non-working servers, I saw that enable32BitAppOnWin64 was set to True in the non-working server. The working server had this value to False.
We set it to False in the non-working server. The 500 error disappeared.
For more information, please check the official Microsoft documentation.