まず第一に、私は以前、このマシンで 64 ビットのテスト Web アプリの 1 つを実行することができました (このプロジェクトのプロトタイプを作成していたときのことです)。私は 32 ビットで数週間作業していて、アプリを 64 ビットに切り替える必要があることに気付きました。(プロジェクトでターゲット プラットフォームを x64 に設定して) 再デプロイすると、実行が停止しました。
前回は 64 ビットが動作するようになるまでに数日かかりましたが、今回は何が欠けているのかわかりません。
IIS でパブリッシュし、IIS でデバッグしています。
「ファイルまたはアセンブリ 'GEMS.Web' またはその依存関係の 1 つを読み込めませんでした。不正な形式のプログラムを読み込もうとしました。」
このアプリは、64 ビットと 32 ビットの両方のアセンブリを参照します。IIS のアプリケーション プールで [32 ビット アプリケーションを有効にする] を true に設定しました。
64ビットのWin 7マシンで実行されているVS.NET 2012、IIS 7.5を使用しています。
以下は、アセンブリのロード トレースからのものです。
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = XXXXXX\xxxxxx
LOG: DisplayName = GEMS.Web
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: GEMS.Web | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///c:/inetpub/wwwroot/GEMS.Web/
LOG: Initial PrivatePath = c:\inetpub\wwwroot\GEMS.Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\inetpub\wwwroot\GEMS.Web\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/gems.web/eea5792e/72317e39/GEMS.Web.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/gems.web/eea5792e/72317e39/GEMS.Web/GEMS.Web.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/GEMS.Web/bin/GEMS.Web.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.