Unverifiable code failed policy check
Problem
The web application is inaccessible and the Windows error log shows this or a similar ASP.NET error and the web application will not start.
[FileLoadException: Could not load file or assembly '<dll name>, Version=#.#.#.#, Culture=neutral, PublicKeyToken=' or one of its dependencies. Unverifiable code failed policy check. (Exception from HRESULT: 0x80131402)]
Solution
Make sure the trust level for the web application is "Full".
For example, for Adams Admin:
IIS > Server > Sites > Default Web Site > Adams Admin > .NET Trust Levels > Full
Select Apply
Uninstalling and reinstalling Adams Admin will set the trust level back to the Default Web Site's level. Therefore, if possible, set the Default Web Site's level to "Full" as well.
Other tools that help when an assembly cannot be loaded.
- Fuslogvw - shows where assemblies are found during the load process
- Process Monitor - helps find missing dependencies
- Filters:
- Process Name = w3wp.exe
- Path ends with <name of dll>
- Helpful article
- Filters:
- Security Policies for application pool user and machine
- Local Security Policy
- gpresult /s localhost /z
- Process Explorer - shows assemblies loaded for a process
- View > Select columns > Process Image > User Name
- View > Select columns > .NET > Assemblies
- Select w3wp.exe process > right click > Properties > .NET Assemblies
Related articles
© 2023 Foray, LLC - All Rights Reserved