Troubleshooting a simple BC.Net application

Here's a simple checklist if you have problems to connect to the AOS (Dynamics Ax 4) with the BC.Net. Your code might look like this:

   1:  Microsoft.Dynamics.BusinessConnectorNet.Axapta ax; 
   2:  string configuration = "C:\\Sample.axc"; //see step 3
   4:  ax = new Microsoft.Dynamics.BusinessConnectorNet.Axapta(); 
   5:  try 
   6:  { 
   7:      ax.Logon(string.Empty, string.Empty, string.Empty, configuration); 
   8:  } 
   9:  catch (Exception i) 
  10:  { 
  11:      Console.WriteLine(i.Message); 
  12:  }

So check these things:

1) Open the Ax-client with the axc-file. (to check if the config is valid and that you have a valid user account for Ax)

2) Applications that are using the BC.Net should always be compiled with the x86 flag, since the BC.Net doesn't work in a 64bit process

3) Put the axc file in folders that doesn't require special credentials (like the root, windows-, program files directory are requiring)

4) Verify the reference to the BC.Net assembly. Maybe you have different BC.Net versions installed on your system

If you think that one ore more steps are missing, please post them. 😉

Comments (0)

Skip to main content