Error at startup - The Type initializer for ECT.ECAD.API.SystemSetup threw an exception


 Product(s):Promis.e, Bentley Substation
 Version(s):08.11.10.67 - 08.11.13.57
 Environment:N/A
 Area:Platform Support
 Subarea:Database Platform Support

Error or Warning Message

At start up of the software the following error message is displayed and the software does not function:

Internal Error
Error Message: The Type initializer for ‘ECT.ECAD.API.SystemSetup’ threw an exception.
TargetSite: ECT.ECAD.API.SystemSetup Create()
DeclaringType: ECT.ECAD.API.SystemSetup
Attributes: public static
Member Type: Method

Explanation

In multiple cases the problem was caused by an SQL Server related issue, where the number of tmpxxxx.tmp files in the temp folder had reached its limit.  Evidence of this includes:

How to Resolve

  1. Open Windows Explorer.
  2. Type %TEMP% into the address bar and press Enter. This will likely open a folder such as:  C:\Users\[login]\AppData\Local\Temp
  3. Delete all the files possible from this Temp folder, in particular files with file names beginning with "tmp" and having a .tmp extension. Some files will not be able to be deleted because they are in use, but try to remove all tmp____.tmp type of files possible.

Some articles regarding this issue describe clearing a C:\Windows\Temp folder instead, so try that if the above does not help.  

 Original Author:Matt_P