Home » IIS » 500 Internal Server Error for AspNetInitClrHostFailureModule (0x80131704 – 2148734724)

500 Internal Server Error for AspNetInitClrHostFailureModule (0x80131704 – 2148734724)

HTTP status code 500 (Internal Server Error) points to a range of issues from coding to configuration. Failed Request Tracing (FREB) comes to help to determine the underlying issue which was AspNetInitClrHostFailureModule with 0x80131704 error code (2148734724) in this case.

The full error message from 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.

ModuleName: AspNetInitClrHostFailureModule
Notification: BEGIN_REQUEST
HttpStatus: 500
HttpReason: Internal Server Error
ErrorCode: 2148734724

AspNetInitClrHostFailureModule (0x80131704 - 2148734724)

This issue started occurring after migrating the application from Windows Server 2008 R2 to Windows Server 2012 R2.

Root cause of 0x80131704 error (2148734724)

The error code 2148734724 translates to 0x80131704 in HEX (Use Windows Calculator in Programmer mode to calculate this value).

0x80131704 HEX code means: “A different runtime was already bound to the legacy CLR version 2 activation policy” (Reference).

As the error message mentions, there is a conflict with the runtime version IIS is trying to use to run the application. Either web.config or another mechanism is forcing the application to run on an unsupported .NET framework version.

In my case, it was w3wp.exe.config (Located in C:\Windows\SysWOW64\inetsrv\). There was this line at the end of the file:

<startup><supportedRuntime version="v2.0.50727"/></startup>

This is what caused the issue. The application was developed to run on .NET Framework 4.0 or a newer version. However, the config line above forced IIS to run this application on .NET Framework 2.0.

Solution for 500 Internal Server Error related to AspNetInitClrHostFailureModule

We removed the supportedRuntime line (full line is above) from the w3wp.exe.config in C:\Windows\SysWOW64\inetsrv\ folder. Then restarted IIS. The application started working afterwards.

Note: This issue surfaced with “Unrecognized attribute ‘targetFramework’” message first. It was complaining about the compilation targetFramework="4.5" line in the web.config. Event Viewer showed “The application has reported as being unhealthy. The worker process will now request a recycle. Reason given: 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 data is the error.” message. Removing targetFramework line from the web.config revealed the actual issue which I described above (More about targetFramework error).

If you have tried this solution already but still seeing the 0x80131704 error, please check the posts below for other causes and solutions of the 500 Internal Server Error issue:

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.
Categories IIS

Leave a Comment