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?      
  • I have added all the Aras DLL files from the server/bin folder and now it works. My question is now; what DLL files need to be referenced ? I did't find this in: Aras Innovator 11 Programmer’s Guide
  • Hi, just adding a reference to the IOM should have worked. Maybe for some of this variables you must type them, like "myConnection" should be initialized with:
    private HttpServerConnection myConnection= null;
    Let me know if this helps.
  • I am getting same error 999 HTTP Error HttpServerConnection System.TypeInitializationException: The type initializer for ‘Aras.Net.WindowsAuthenticationHelper’ threw an exception. string serverAddress = "">localhost/.../InnovatorServer.aspx"; string database = "InnovatorSolutions"; string userName = "admin"; string password = "607920b64fe136f9ab2389e371852af2"; Innovator innovatorinstance = null; HttpServerConnection innServerConnection = IomFactory.CreateHttpServerConnection(serverAddress, database, userName, password); Item loginResponse = innServerConnection.Login(); if (loginResponse.isError()) { throw new Exception(loginResponse.getErrorString()); } else innovatorinstance = loginResponse.getInnovator();     Please let me know what could be the reason
  • Hello, I am using the same and got same error. Is there any update on this ?   Many Thanks.
  • I was getting the same error.

    I was using the wrong IOM.dll (the one from the Server/bin/ Directory). After reading the programmer's guide, i found the correct DLL on the install CD Aras Innovator 11.0 SP11 IOM SDK Zipfile.