0

我们的 asp.net 网络服务器偶尔会出现绑定问题,导致页面无法显示给最终用户。按刷新通常有效。

如果您查看事件日志,您会看到以下条目:

Exception information: 
    Exception type: FileLoadException 
    Exception message: A strongly-named assembly is required. (Exception from HRESULT:     0x80131044) 

我们的程序集确实有一个强大的名称,但是考虑到这在 99.9% 的情况下都有效,我不认为这是问题所在。我已经打开了融合绑定日志,当错误发生时,我们会得到一个绑定日志文件。

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable  C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = WEBFUND\WF6User
LOG: Where-ref bind. Location = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET     Files\clients\6c02a9d4\233e1482\App_Web_emailpdf.aspx.afcecd13.5bzg9b2a.dll
LOG: Appbase = file:///D:/FinancialExpress/ClientsV21/
LOG: Initial PrivatePath = D:\FinancialExpress\ClientsV21\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\clients\6c02a9d4
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\clients\6c02a9d4
LOG: AppName = 233e1482
Calling assembly : (Unknown).
===
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Start binding of native image App_Web_emailpdf.aspx.afcecd13.5bzg9b2a, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
LOG: IL assembly loaded from C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET     Files\clients\6c02a9d4\233e1482\App_Web_emailpdf.aspx.afcecd13.5bzg9b2a.dll.
WRN: No matching native image found.
LOG: Bind to native image assembly did not succeed. Use IL image.

我已经在服务器上复制了depends.exe 并运行它。它给出了两个未找到的文件:GPSVC.DLL 和 IESHIMS.DLL。但这会是问题吗?鉴于大多数页面都正确显示,如果这些文件丢失,它不应该总是不起作用吗?

4

1 回答 1

1

我认为这个问题的答案是避免将强命名的程序集放在 bin 文件夹中。显然微软不支持这一点,尽管它可能看起来有效。强命名程序集应放置在 GAC 中。

于 2013-02-12T15:05:07.313 回答