c#dll没有绑定/加载

时间:2014-05-27 10:50:29

标签: c# deployment

我有一个随我的IIS应用程序一起分发的DLL,它现在突然没有加载到实时服务器上。当我重新启动服务器时,DLL正确加载,一切都很好。在一段时间不活动(可能超时或垃圾收集清理)之后,不再发现DLL了。但它仍然在同一个地方,没有任何改变。

查看程序集绑定日志(fuscion日志查看器),它似乎不再尝试从/ bin目录加载DLL,而是现在从主目录本身加载。

两个主要问题:

1)可能导致系统想要从主路径加载它的原因

2)为什么它甚至不尝试从/ bin加载。

我正在附上下面的日志文件。

*** Assembly Binder Log Entry  (27/05/2014 @ 11:27:53) ***

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

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicK   eyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/MyProject/
LOG: Initial PrivatePath = C:\Program Files\MyProject\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\f05ee030
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\f05ee030
LOG: AppName = 576b7a99
Calling assembly : MyProject, Version=1.0.0.1, Culture=neutral, PublicKeyToken=b281b283028a3f6b.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files\MyProject\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/MyProject/Microsoft.IdentityModel.dll.
LOG: All probing URLs attempted and failed.

感谢您的帮助。

0 个答案:

没有答案