Error: The type initializer for 'SAP.Middleware.Connector.RfcConfigParameters' threw an exception

I get this error while trying to test SAP R/3 Connection -> ( [System.Exception] The type initializer for 'SAP.Middleware.Connector.RfcConfigParameters' threw an exception.)

I have

One Identity Manager 9.3

SAPNCo 3.1.6

.NET version 9.0.301

VS Redistribution 2010 & 2015

Based on another article https://support.oneidentity.com/identity-manager/kb/4378228/error-the-type-initializer-for-sap-middleware-connector-rfcconfigparameters-threw-an-exception

I found the "sapnco.dll" and "sapnco_utils.dll" But I don't seem to find the "cpc4n.dll" and "ijwhost.dll"

So if you can provide a path for these files so I can copy them to the One Identity Manager folder or is there a perquisite that I am missing ?

  • First of all, you need the .NET 8 runtime and not .NET 9, but both can be installed in parallel.

    Secondly, are you sure that you picked the correct SAP NCo package? The correct one has the file name sapnco31dotnet8P_6-70002627.zip.

    It is the NCo 3.1, 64bit version in the section Compiled for .NET (formerly .NET Core)

  • I think I have .NET 9 runtime if not I will install it.
    And the file name I got is "sapnco31P_6-70002627.zip"  
    After a lot of searching I saw an article that said you can extract the zip file into the one identity manager folder and that should fix it so I'll definitely try that too 

  • I did try and installed .NET 8 runtime and extracted the SAPNCo files and extracted it in the manager folder and still the same issue 

  • Where did you get the exception, in Synchronization Editor or in a job executed by the Job Server? If in the Synchronization Editor, do you use a remote connection or not?

    You can check the installed .NET runtimes in the command line (or PowerShell) with dotnet --list-runtimes

  • The issue is in the Synchronization Editor not the Job Server because i'm still testing the connection for the correct permissions and no i'm not using remote connection 

    Also when I tested the dotnet --list-runtimes

    Microsoft.AspNetCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.WindowsDesktop.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

  • I just figured, your ZIP File is wrong, based on the naming.

    You need to download the one in the section Compiled for .NET (formerly .NET Core) and then the second one named SAP Connector for Microsoft .NET 3.1.6.0 for Windows 64bit (x64) 

    The required DLL can be found directly in the ZIP file.

    And according to SAP you need to have the necessary C++ runtime files version 14.x installed.  A link is on the SAP Website for the NCO 3.1

    NCo 3.1

    NCo 3.1 supports .NET framework versions 4.6.2 up to 4.8.1 as runtime and starting with patch level 3.1.5 also .NET 8.0.x.. It requires the Microsoft C++ Runtime DLLs version 14.x (this version is contained in Visual C++ Redistributable package for Visual Studio 2015, 2017, 2019, and 2022). You can get the installer from the Microsoft download page(opens in new tab).




  • Thank you Markus, apparently the SAP Connecter file needed was the one for ".NET Core" and what I had was the one for ".NET"

    Just extracted the files and copied them to the One Identity Manager installation folder and that was it