我们有一个使用插件的Web应用程序。该系统用于许多成功部署的安装,但在一个实例中,我们看到了间歇性问题。有时它将无法加载用户创建的插件 - 请参阅下面的融合日志。当它失败时,用户将服务器切换到其冗余服务器并继续运行,直到问题出现在冗余服务器上(故障之间没有特定时间 - 可能是数小时到几周),然后再次切换回原始服务器(再次,这将是好的)。我们已经提供了插件的来源,并确认它不是代码/ dll本身的问题。
*** Assembly Binder Log Entry (2013-06-18 @ 00:32:49) ***
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\system32\inetsrv\w3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = ***\***
LOG: Where-ref bind. Location = D:\Program Files\***\***\***\plugins\***.dll
LOG: Appbase = file:///D:/Program Files/***/***/***/plugins/
LOG: Initial PrivatePath = D:\Program Files\***\***\***\plugins\references\
LOG: Dynamic Base = NULL
LOG: Cache Base = D:\Program Files\***\***\***\plugins\cache\79797f4b-d645-4a33-ad9d-c75f1c548e15
LOG: AppName = ***
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
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: Using application configuration file: D:\Program Files\***\***\webfiles\web.config
LOG: Using host configuration file: \\?\C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Attempting download of new URL file:///D:/Program Files/***/***/***/plugins/***.dll.
LOG: Assembly download was successful. Attempting setup of file: D:\Program Files\***\***\***\plugins\***.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: ***, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
LOG: Re-apply policy for where-ref bind.
LOG: Where-ref bind Codebase matches what is found in default context. Keep the result in default context.
LOG: The post-policy assembly reference requires probing again.
LOG: Switch from LoadFrom context to default context.
LOG: Using application configuration file: D:\Program Files\***\***\webfiles\web.config
LOG: Using host configuration file: \\?\C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\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:///D:/Program Files/***/***/***/plugins/***.DLL.
LOG: Assembly download was successful. Attempting setup of file: D:\Program Files\***\***\***\plugins\***.dll
LOG: Entering download cache setup phase.
ERR: Setup failed with hr = 0x80070002.
ERR: Failed to complete setup of assembly (hr = 0x80070002). Probing terminated.
有什么想法会间歇性地导致它以这种方式失败?
答案 0 :(得分:1)
装载时装配的签名是什么?你可以通过附加调试器和viwing加载的模块找到它。 不同的是加载失败时的字符串名称吗?
还使用fuslogview.exe作为工具并记录所有模块加载失败,当加载失败时,fuslogview详细信息将为您提供详细信息,说明程序集加载失败的原因。