Approve Strongly Named Custom Assemblies

<< Click to Display Table of Contents >>

Navigation:  Professional > Administration >

Approve Strongly Named Custom Assemblies

Signing With A Strong Name

Approving Public Key Tokens

Checking The Public Key Token Of A Signed Assembly

 

EQuIS Professional requires that assemblies are strongly named and approved.

 

To use custom assemblies, they must be signed with a strong name and the key approved. Additional information on how to do this is provided below and demonstrated in this Office Hour video.

 

To check if a custom DLL is strongly named, use the "sn.exe" command within the .NET Framework Developer Pack matching the latest .NET Framework version in use. This file will be located in a directory such as:

 

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools

 

In a Command Prompt (run as administrator), navigate to the directory where the latest version of the Microsoft file "sn.exe" is located, and type the following:

 

sn.exe -T "C:\Program Files\EarthSoft\EQuIS\EarthSoft.Reports.Library.123456.dll"

 

(where the string in quotes is the full path and filename of the DLL to be checked).

 

A message will be returned indicating either the public key token for the DLL, or that the report does not represent a strongly named assembly.

 

The below screenshot shows the outcome with the tool run for three different DLLs:

 

1.A standard EarthSoft report - in recent builds, these will always be strongly named (EarthSoft.Reports.Library.50943.dll)

2.A custom report strongly named by an entity other than EarthSoft (NonEarthSoftCustomReportWithStrongName.dll)

3.A custom report without strong naming (A_Report_NotStrongNamed.dll)

 

15640_SNKexamplesCMD

 

Signing With A Strong Name

 

Please refer to the Microsoft documentation: How to: Sign an assembly with a strong name.

 

Approving Public Key Tokens

 

To approve a public key token in EQuIS Professional:

 

1.Connect to the database where the custom report, form or other assembly(s) need approval.

2.Create an ST_CONFIG record for each approved public key token with the values as detailed below.

 

ST_CONFIG

Value

CONFIG_SECTION

AssemblyTokens

CONFIG_KEY

Token

OBJECT_TYPE

PublicKey

OBJECT_VALUE

<Public Key Token>

 

3.Save changes and restart EQuIS Professional.

 

Checking The Public Key Token Of A Signed Assembly

Windows PowerShell

In Windows PowerShell, run the command below without the outside quotes and replacing <Fully Qualified File Name> with the Fully Qualified File Name (path to the assembly and the filename).

 

([system.reflection.assembly]::loadfile("<Fully Qualified File Name>")).FullName

 

For example:

 

15640_PowerShellSNK

 

For DLLs created and managed by EarthSoft, contact Support to schedule a recompile of these DLLs by EarthSoft.  EarthSoft developers will sign the DLL with EarthSoft’s .SNK file and recompile the DLL. Otherwise, please refer to the Microsoft documentation: How to: Sign an assembly with a strong name.

 

Provided that only one .SNK file is created for the client organization, there need only be one addition to ST_CONFIG for that file, listing its Public Key Token.

 

Note: Assemblies with a null PublicKeyToken will not be approved. An invalid assembly error will appear in the EQuIS log.