Quantcast
Channel: Iulian Cordobin's Groups Activities
Viewing all articles
Browse latest Browse all 1084

How to use LogonAs to logon to another AX server

$
0
0

hi all,

Currently, I'm using this code to login to one AX server (AX 2012) from my computer:

                //test logon AX 
                System.Net.NetworkCredential nc = new System.Net.NetworkCredential("akason", "123abcd");
                using (Session session = new Session())
                {
                    try
                    {
                        session.LogonAs("akason", "AXDEV", nc, "DAV", "en-us", "02@AX12R3CU9:2713", "");
                        string result = session.isLoggedOn().ToString();
                    }
                    catch (Exception ex3)
                    {
                        logger.Error(ex3.ToString());
                    }
                }

But I cannot connect to this AX server. I got the error: "Could not load file or assembly 'Microsoft.Dynamics.AX.ManagedInterop, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Did anyone login success before? please advise.

Thank you so much.


Viewing all articles
Browse latest Browse all 1084

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>