KB 1002: FNSM Throws an Assembly Error While Running “FNMS Windows Authentication Config.xml”

KB 1002: FNSM Throws an Assembly Error While Running “FNMS Windows Authentication Config.xml”


Problem Statement


Error is thrown while running “FNMS Windows Authentication Config.xml” at “Executing step Configure FNMP database for operators” with assembly error An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted. Run the query again, or check documentation to see how to solve the assembly trust issues...

Symptoms


You will observe the following error in during the execution of powershell script: 





Cause


This error occurs due TRUSTWORTHY setting for the database. You can see the current TRUSTWORTHY setting for a database by running this query:

SELECT is_trustworthy_on FROM sys.databases WHERE name = 'DatabaseName';


Steps to Reproduce


You would need to run the management studio with sysadmin rights. And run the below command to verify the issue is due to TRUSTWORTHY settings:

SELECT is_trustworthy_on FROM sys.databases WHERE name = 'DatabaseName';


Note: Replace DatabaseName with actual database name.                                                                                                                                            
 

Resolution


To resolve this issue you would need to run Management Studio with user who have sysadmin rights on SQL server. 

  1. Open SQL Management Studio (SSMS).
  2. Click on New Query


  1. Type below query if you want to verify the values and click on Execute:

 

You would see the result like below:



  1. Execute the below query to change this value to 1:

ALTER DATABASE DataBaseName SET TRUSTWORTHY ON;



Note: Change DataBaseName with your database name.                                                                                                                                   


  1. You can verify the changed value by executing the same command and value should look like below:



Once the above is completed, you should be able to successfully run the xml script.


Additional Information








                                                                                                                                                                                                Author:  Fawad Laiq

Date published: 17/03/2020