码迷,mamicode.com
首页 > Windows程序 > 详细

web 项目添加 x86 的dll 引用,模块 DLL c:\WINDOWS\system32\inetsrv\aspnetcore.dll 未能加载。

时间:2018-03-30 20:10:31      阅读:1916      评论:0      收藏:0      [点我收藏+]

标签:some   block   name   can   handle   folder   svc   recently   添加引用   

最近的项目要添加一个 x86 编译的dll,

首先添加引用,编译,报错:

技术分享图片

 

首先判断是 项目中不能添加 x86 的引用,所以把所有的项目都按照 x86 的方式编译一遍,同时对应IIS 的应用池,也修改为启用32位。

 

技术分享图片

 

技术分享图片

 

 本以为可以顺利显示,但是却报错。报错的是本机开发环境,但是部署到服务器测试却能够正常显示。

 

技术分享图片

 

根据网上的提示,查看 系统日志里的应用程序日志,

技术分享图片

 

 

 再根据此错误信息,网上搜索,终于找到了解决方法。

1. 如果报错是 rewrite.dll , 则在程序-应用和管理 中修复 对应的IIS URL Rewrite Module 2。

2. 如果报错是 aspnetcore.dll ,则在程序-应用和管理中修复 Microsoft .NET Core 1.0.0 - VS 2015 Tooling ...

 

在搜到该解决方案之前, 我已经把所有的.netcore 的程序卸载了,再重新按章 .Net Core SDK 依然无效,最后根据方案中的方法,搜索到了 

DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe, 重新安装修复。

 

看来是必需要修复一次。而且说是 windows10 的anniversary更新引起的错误,至此终于明白为啥服务器部署可以正常了。

 

 

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:

  1. "C:\WINDOWS\system32\inetsrv\rewrite.dll" (reference)
    • Go to "Programs and Features" (Win+X, F) and repair "IIS URL Rewrite Module 2".
  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 ...".

Happy updating!

 

Hi paramesh,

I don‘t know from the top of my head, but you can try (re)installing them from PS using Web Platform Installer. Or if you have installed those from Web Platform Installer in the first place, then you probably still have the .msi installers on your machine (for example on my machine they are under "C:\Users\Benedek\AppData\Local\Microsoft\Web Platform Installer\installers") - in that case you can repair them from PS using "msiexec" with the "fa" switch (which runs a forced repair).

This command works on my machine for URL Rewrite 2, for you the path might be different:
msiexec /fa "C:\Users\Benedek\AppData\Local\Microsoft\Web Platform Installer\installers\UrlRewrite2\6A98B994ADCC2E8D21507BF2B8BAFFB402C17395\rewrite_amd64.msi"

For "Microsoft .NET Core 1.0.0 - VS 2015 Tooling", the installer (at least on my machine) is in one of the subfolders of "C:\ProgramData\Package Cache", so for example the latest version I have installed (differs from what‘s in the blogpost) is "C:\ProgramData\Package Cache\{da280276-4f5b-4918-8d40-20ca56dfa535}\DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe". "msiexec" won‘t be able to handle this, since it‘s an exe, but you might be able to just run it from PS, although I‘m not sure if that‘ll work without GUI.

Please let me know if it helped and if they work, then I‘ll add them to the blogpost.

 

 https://orcharddojo.net/blog/troubleshooting-iis-apppool-crashes-status-503-after-windows-10-anniversary-update

 

web 项目添加 x86 的dll 引用,模块 DLL c:\WINDOWS\system32\inetsrv\aspnetcore.dll 未能加载。

标签:some   block   name   can   handle   folder   svc   recently   添加引用   

原文地址:https://www.cnblogs.com/googlegis/p/8677845.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!