Announcements
No record found.
Dears,
I called C# forms in AX as a job and testing connection for one Partition. The code in C# is working fine and connected me to Specific partition. But same action when I called in AX system generated an error InvalidLogonInSingleSessionException. Please let me know how can I solve this error.
Unfortunately you forgot to explain your scenario.
Let me guess:
You have a Windows Forms application communicating with AX 2012 via Business Connector. Then you took the WinForms form and embedded it AX client through the ManagedHost control. Now your .NET code is trying to create an Business Connector session from inside AX.
If so, then you shouldn't be doing that at all. You don't need Business Connector, because your code is already running inside AX. You don't have to create another AX client as if you're running code outside AX. Simply expose methods (that can be called from AX) and events (that can trigger methods in AX).
Thanks Martin. Yes I forgot to explain above scenario. As you said the classes and methods running inside the AX don't require Business connector. But I have simple requirement what If I need to create a customer in two AX partitions than how code would be from C# ? Using Business connector there is possibility to pass a value of company name(partition).
That's a very strange requirement. Doesn't it mean that your setup is wrong and it should be all in the same partition? Because partitions are used if you need a complete isolation and you seem to be working against this only reason for using multiple partitions.
If you insist of using multiple partitions, consider utilizing runAs() - partition is one of its parameters. Or synchronize the data through a table shared across partitions (SystemTable=Yes, SaveDataPerPartition=No).
If you want to use Business Connector for some reason, I think you should keep the logic outside AX (e.g. running as a Windows service). But it would be my last choice, only if everything else failed.
You can see how important is beginning with describing your goals instead of just digging in implementation details of a single, possibly sub-optimal solution. When you tell us what you're actually trying to achieve, we can tell you how.
Ok great. I know this is a strange requirement. I totally completed my project and I dont want to go from scratch with webservices. I found your verified answer for similar error. Could you please explain me with an example. The verified answer is not clear to understand. Please find Link.
If you've completed your project, than what are we discussing here? It rather seems to me that your solution doesn't work at all.
The verified answer of the linked thread is what I suggested in the first reply of this thread. If you do that and stop using Business Connector, then you'll indeed have no problems with Business Connector anymore.
Note that if I was you, I would first review the whole idea about multiple partitions.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 694
André Arnaud de Cal... 646 Super User 2026 Season 1
CP04-islander 337