Dears,
I have partitions in AX and each partition is different company with different business. Now here I have issue if wants to connect initial partition with company name I can able to connect to AOS but if I wants to logon to another partition/company I'm not able to connect AOS. Please suggest me!
lets say:
PartitionA: company1
PartitionB: company2
PartitionC: company3
How to reach above companies company1, company2, company3 with .net business connector
CODE:
private void LogonAs_Click(object sender, EventArgs e)
{
// Create an instance of the Axapta class.
Axapta DynAx = new Axapta();
// Add the proxy user.
// Replace the ProxyUserID and password parameters with the
// proxy user name and password that you specified
// in the Business Connector Proxy.
String sCompany = this.textboxCompany.Text;
String slanguage = "en-us";
String sAOS = this.textboxAOS.Text;
//System.Net.NetworkCredential nc = new System.Net.NetworkCredential();
//string strUserName = "Axservice";
//nc.UserName = this.textBoxProxy.Text;
//nc.Password = this.textBoxPassword.Text;
// Test the connection to the .NET Business Connector.
try
{
// DynAx.LogonAs(strUserName.Trim(), "", nc, "", "", "", "");
//DynAx.LogonAs(strUserName.Trim(), "enpro.com", nc, "dat", "en-us", "enpr@AXTEST:2712", "");
DynAx.Logon(sCompany, slanguage, sAOS, "");
MessageBox.Show("Success");
DynAx.Logoff();
MessageBox.Show("Logoff completed.");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
MessageBox.Show(ex.Message);
}
}
*This post is locked for comments
I have the same question (0)