Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Info

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

Tools Make sure the trust level for identifying the reason for this error.

...

  1. at command line prompt running as administrator: IISReset

...

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.

  1. Fuslogvw - shows where assemblies are found during the load process
  2. Process Monitor - helps find missing dependencies
    1. Filters:
      1. Process Name = w3wp.exe
      2. Path ends with <name of dll>
    2. Helpful article
  3. Security Policies for application pool user and machine
    1. Local Security Policy
    2. gpresult /s localhost /z
    Memory and processor available
  4. Process Explorer - shows assemblies loaded for a process
    1. View > Select columns > Process Image > User Name
    2. View > Select columns > .NET > Assemblies
    3. Select w3wp.exe process > right click > Properties > .NET Assemblies

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@8cd
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "iis" , "adams-web" , "adams-admin" ) and type = "page" and space = "FS"
labelsadams-web adams-admin iis

...