[Solved] Web project adds x86 dll reference, module DLL c:\WINDOWS\system32\inetsrv\aspnetcore.dll failed to load.

Recently I had to add an x86 compiled dll to my project.

First add the reference, compile it, and get an error.

First of all, it was determined that the x86 reference could not be added to the project, so all the projects were compiled in the x86 way, and the corresponding IIS application pool was modified to enable 32 bits.

I thought I could display it without any problem, but it reported an error. The error is reported for the local development environment, but the deployment to the server test works fine.

According to the online tips, check the application log in the system log.

Then, based on this error message, I searched the Internet and finally found the solution. 1.

If the error is rewrite.dll, then fix the corresponding IIS URL Rewrite Module 2 in Programs – Applications and Administration. 2.

If the error is aspnetcore.dll, then fix Microsoft .NET Core 1.0.0 – VS 2015 Tooling in Programs – Applications and Administration …

Net Core SDK, but it didn’t work, so I searched for the solution and found

DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe, reinstall and repair.

It seems to be necessary to repair once. And that is the windows10 anniversary update caused by the error, so finally understand why the server deployment can be normal.

Installing the recently released Anniversary Update (version 1607) of Windows 10 seems to destabilize IIS by shutting down Application Pools, thus resulting in a 503 error when trying to run an application, which is caused by some DLLs failing to load when the worker process starts. Fortunately, the lovely folks of the interwebz are coming to the rescue!

First, check out the Windows Event Viewer(Win+X, V) to see what you need to fix: Open “Windows Logs”, then “Application” and look for “Error” level entries with the source “IIS-W3SVC-WP” (may be different if the name of your IIS instance is not the default one). In the details, you will see a short message, like this:

The Module DLL <path-to-DLL>failed to load. The data is the error.

Depending on your configuration, there may be different DLLs causing this kind of problem and they will occur one by one, so you will need to keep checking the Event Logs and fix the issues until your application properly starts up. To be sure, before every attempt, stop IIS and close IIS Manager.

Here are two specific issues we’ve experienced so far and how to fix them, but you may bump into completely different ones:

“C:\WINDOWS\system32\inetsrv\rewrite.dll” (reference)

Go to “Programs and Features” (Win+X, F) and repair”IIS URL Rewrite Module 2″.

“C:\WINDOWS\system32\inetsrv\aspnetcore.dll” (reference)

Go to “Programs and Features” (Win+X, F) and repair”Microsoft .NET Core 1.0.0 – VS 2015 Tooling …”.

Similar Posts: