While troubleshooting a 500 error, Failed Request Tracing (FREB) displayed AspNetInitClrHostFailureModule error with 0x80131704 error code (2148734724). Here is the FREB log:
An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
The issue started occurring after migrating from Windows Server 2008 R2 to Windows Server 2012 R2.
The HEX equivalent of the error code 2148734724 is 0x80131704. This HEX code means: “A different runtime was already bound to the legacy CLR version 2 activation policy” (Reference).
It refers to a conflict with the runtime version IIS using to execute the application. Either web.config or another config file is instructing IIS to run the application on a .NET framework version that is not compatible with the version the application is targeting.
In my case, it was w3wp.exe.config (Located in C:\Windows\SysWOW64\inetsrv\) forcing a specific .NET Framework version. I saw this line at the end of the file: