Skip to main content

Notifications

Announcements

No record found.

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.

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.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans