标签:base pattern policy 实例 ati setup rest trouble desc
This is my preferred way to diagnose. After dealing with many Microsoft loggs, I think the assembly binding ones are the best ones. The files are named using a pattern like this:
[assembly name], Version=[assembly version], Culture=[culture], PublicKeyToken=[public token]
so for NLog we will have:
NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c
The best way to understand how .NET runtime loads assemblies let’s look at the logs.
First an easy one - the one that succeeded.
Now for something harder, but more interesting. A failed log file. Also for NLog.
The application has to be restarted after enabling the log. When talking about IIS application the whole IIS process has to be restarted.
You have to create the folder manually
The logging adds some overhead, but not enough for it to be seen with a bare eye. Maybe You are doing a lot of dynamic assembly loading?
Disable the log. When enabled it creates a lot of small files. The result is that they are taking up more disc space than they actual size.
Restart the application process.
I suspect because fusion is the process of combining two atoms into one.
*** Assembly Binder Log Entry (4/30/2020 @ 10:55:30 AM) *** The operation failed. Bind result: hr = 0x80131040. No description available. 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: DisplayName = ICSharpCode.SharpZipLib, Version=0.85.3.365, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 (Fully-specified) LOG: Appbase = file:///D:/Project/IN_LS_CMS_WDAL/ LOG: Initial PrivatePath = D:\Project\IN_LS_CMS_WDAL\bin LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\in_ls_cms_wdal\e4b0d765 LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\in_ls_cms_wdal\e4b0d765 LOG: AppName = 214332ee Calling assembly : CMS.IO, Version=7.0.5354.21097, Culture=neutral, PublicKeyToken=834b12a258f213f9. 所以是CMS.IO调用了ICSharpCode.SharpZipLib === LOG: This bind starts in default load context. LOG: Using application configuration file: D:\Project\IN_LS_CMS_WDAL\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: ICSharpCode.SharpZipLib, Version=0.85.3.365, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/in_ls_cms_wdal/e4b0d765/214332ee/ICSharpCode.SharpZipLib.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/in_ls_cms_wdal/e4b0d765/214332ee/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.DLL. LOG: Attempting download of new URL file:///D:/Project/IN_LS_CMS_WDAL/bin/ICSharpCode.SharpZipLib.DLL. LOG: Assembly download was successful. Attempting setup of file: D:\Project\IN_LS_CMS_WDAL\bin\ICSharpCode.SharpZipLib.dll LOG: Entering download cache setup phase. LOG: Assembly Name is: ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 WRN: Comparing the assembly name resulted in the mismatch: Minor Version ERR: The assembly reference did not match the assembly definition found. ERR: Setup failed with hr = 0x80131040. ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
*** Assembly Binder Log Entry (4/30/2020 @ 10:55:30 AM) *** The operation failed. Bind result: hr = 0x80131040. No description available. 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: DisplayName = ICSharpCode.SharpZipLib, Version=0.85.3.365, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 (Fully-specified) LOG: Appbase = file:///D:/Project/IN_LS_CMS_WDAL/ LOG: Initial PrivatePath = D:\Project\IN_LS_CMS_WDAL\bin LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\in_ls_cms_wdal\e4b0d765 LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\in_ls_cms_wdal\e4b0d765 LOG: AppName = 214332ee Calling assembly : CMS.IO, Version=7.0.5354.21097, Culture=neutral, PublicKeyToken=834b12a258f213f9. === LOG: This bind starts in default load context. LOG: Using application configuration file: D:\Project\IN_LS_CMS_WDAL\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: ICSharpCode.SharpZipLib, Version=0.85.3.365, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/in_ls_cms_wdal/e4b0d765/214332ee/ICSharpCode.SharpZipLib.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/in_ls_cms_wdal/e4b0d765/214332ee/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.DLL. LOG: Attempting download of new URL file:///D:/Project/IN_LS_CMS_WDAL/bin/ICSharpCode.SharpZipLib.DLL. LOG: Assembly download was successful. Attempting setup of file: D:\Project\IN_LS_CMS_WDAL\bin\ICSharpCode.SharpZipLib.dll LOG: Entering download cache setup phase. LOG: Assembly Name is: ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 WRN: Comparing the assembly name resulted in the mismatch: Minor Version ERR: The assembly reference did not match the assembly definition found. ERR: Setup failed with hr = 0x80131040. ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
ICSharpCode.SharpZipLib
Reading assembly binding log files (Fusion Log)
标签:base pattern policy 实例 ati setup rest trouble desc
原文地址:https://www.cnblogs.com/chucklu/p/12807385.html