Web 專案添加 x86 的dll 引用,模組 DLL c:\WINDOWS\system32\inetsrv\aspnetcore.dll 未能載入。

來源:互聯網
上載者:User

標籤: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 未能載入。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.