Я работаю над устаревшим веб-приложением и получаю ошибку привязки сборки во время выполнения (FileNotFoundException
)
Я заглянул в базовый каталог приложения и могу подтвердить, что необходимая DLL с правильной версией и общедоступным токеном доступна в каталоге bin /.
Я включил Fusion Log на сервере для сбора деталей и понял, что CLR сначала проверяет сборку в GAC (я думаю, это специально для подписанных сборок) Ниже приведен журнал для быстрой справки:
Я могу заставить его работать, установив сборку в GAC - , но вопрос и любопытство все еще остаются открытыми, почему CLR не выбрал его из базового каталога приложения после того, как он не найден в GAC?
Также из журнала ниже видно, что после GAC поиск выполняется в каталоге C: Windows / System32 vs каталог моего приложения. Я думаю, это потому, что в журналах написано, что он работает под исполняемым файлом C: \ Windows \ system32 \ dllhost.exe
Любая помощь / комментарий приветствуется!
*** Assembly Binder Log Entry (6/28/2018 @ 4:18:02 AM) ***
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\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (6/28/2018 @ 4:18:02 AM) ***
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\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (6/28/2018 @ 4:18:03 AM) ***
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\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).
*** Assembly Binder Log Entry (6/28/2018 @ 4:18:03 AM) ***
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\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.exe
Calling assembly : MS.UST.EC.Oem.ServiceProxy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0753af11def5a5f8.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).