Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/FAQ/General questions

M-Files and SQL Server 2017 compatibility

Last updated on 26 September 2025

Admin

Overview

M-Files is compatible with MS SQL Server 2017 and newer. However, starting from SQL Server 2017 all .NET assemblies that are to be run in a database must be explicitly trusted.

M-Files Server version 23.2 and earlier use an SQL server .NET assembly that you may have to register manually in SQL Server. If you are using a newer version of M-Files Server, then you can ignore these instructions.

Solution

M-Files tries to register its .NET assembly automatically, but if the registration fails for some reason, it will give you an error. In this case you must whitelist the assembly manually.

Below are two examples on how to whitelist the assembly. Notice that the assembly file (MFMSSQLCLRObjs.dll located in the M-Files Server installation folder) must be present on the Microsoft SQL Server machine. If you run M-Files Server on a different machine than MS SQL Server, then you must copy the assembly file to the MS SQL Server computer before proceeding.

Option 1: compute the hash of the assembly and whitelist it:

USE master;

-- Load the assembly file from disk. The file must exists on the local disk

DECLARE @AssemblyBytes VARBINARY(MAX)=

(SELECT * FROM OPENROWSET(BULK N'C:\Program Files\M-Files\<version>\Bin\x64\udf\MFMSSQLCLRObjs.dll', SINGLE_BLOB) AS bytes );

-- Compute a SHA2_512 hash of the assembly file.

DECLARE @AssemblyHash VARBINARY(64) = HASHBYTES( 'SHA2_512', @AssemblyBytes );

-- Whitelist the assembly.

EXEC sys.sp_add_trusted_assembly @hash = @AssemblyHash, @description = N'M-Files <version>. Manually whitelisted.';

Option 2: get the hash of the assembly file in any other way and add it as trusted assembly. You can get the hash for example from the error message that reports the lack of trust for MFMSSQLCLRObjs.dll:

USE master;

-- Apply the assembly hash to the @hash parameter below

EXEC sys.sp_add_trusted_assembly

       @hash = 0x8204FAF4E3CBEACDD0E6FB1FD3DBF3663A91643EF76F220501789F0F47C445DAC85EF22977113DCA3B89158D3198AD28371A97A60A7B3EF1F3D57947141E3423,

@description = N'M-Files <version>. Manually whitelisted.';

 

Still need help?

On this page