This article is contributed. See the original author and article here.
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:WindowsSysWOW64inetsrv) forcing a specific .NET Framework version. I saw this line at the end of the file:
This was the root cause of the issue. The application was developed to run on a .NET Framework version newer than 4.0. However, the line above forced IIS to run it on .NET Framework 2.0.
supportedRuntime line from the w3wp.exe.config file and restarting IIS solved the issue.
Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.