IOM TypeInitializationException error with Login

I have been trying to use IOM on 11SP9 but I'm unable to get this code working...  
// url = "">myserver/InnovatorServer";
url = "">myserver/.../InnovatorServer.aspx";

var myConnection = IomFactory.CreateHttpServerConnection(url, db, user, password);
 var objItemRes = myConnection.Login();

if (objItemRes.isError())
 {
 MessageBox.Show("Login error " + objItemRes.dom.InnerText);
 }
It gives this error: 999 HTTP Error HttpServerConnection System.TypeInitializationException: The type initializer for 'Aras.Net.WindowsAuthenticationHelper' threw an exception.   My project is build on .NET 4.5.2 and I have referenced IOM.dll Version 11.0.0.6549 (1/19/2017)   What can be wrong?      
Parents
  • Hai ,

    I had the same issue , solved by following steps

    1. Make sure you are working with .NET version .NET 6.0 


    2. Check for the below libraries 

    Aras.Cryptography, Version=16.0.0.0
    Microsoft.Extensions.Http, Version=6.0.0.0
    System.Configuration.ConfigurationManager, Version=4.0.3.0

    System.Security.Permission
    Nito.AsyncEx.Context

    3. Use the correct version of below assesblies


    After that the login was successful!


    Thanks
    Salini

  • I currently face the same error with Release 2023 and Release 2025. I use the same classic connection as shown at the beginning of this thread.

    So far I think my IOM.DLL and other DLL-version are correct. But I still get the error. I tested various Innovator version and various dll versions.

    Does anyone have an idea?

Reply Children
No Data