Skip to main content

Notifications

Microsoft Dynamics AX forum
Unanswered

Business Connector Won't Connect

Posted on by 5

Having a hard time with Dynamics AX 2012 R3 and the business connector. I have set it up according to what Microsoft specify. They also provide some code to test the connector.

Below is a snippet


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Dynamics.BusinessConnectorNet;


namespace LogOnAsExample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_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.
            System.Net.NetworkCredential nc = new System.Net.NetworkCredential("axproxy", "password", "");
            string strUserName = "axproxy";

            // Test the connection to the .NET Business Connector.
            try
            {
                DynAx.LogonAs(strUserName.Trim(), "actron.com.au", nc, "", "", "", "");
                MessageBox.Show("Success");
                DynAx.Logoff();
                MessageBox.Show("Logoff completed.");

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                MessageBox.Show(ex.Message);
            }

        }
    }
}

When I click run on the program and test it, I get this error;

1

If I create this user as a user in AX then I get a successful connection. Can't work out why the actual connector won't work.

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,682 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,000 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans