Session log on for Microsoft Dynamics failed. Dynamics Adapter Logon failed.

After starting the Dynamics AX 2009 Synchronization Service, the Project Server Integration components wouldn’t install and the following error got written twice each second into the server application log:

Session log on for Microsoft Dynamics failed.

Dynamics Adapter Logon failed.

Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.NonFatalSessionException
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.HandleException(String message, Exception exception, HandleExceptionCallback callback)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.Logon(String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.SyncServices.SyncAxSession.OnLogon(IAxaptaAdapter axaptaAdapter)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Init(ICacheContext context)

Microsoft.Dynamics.BusinessConnectorNet.NoSecurityKeyException
   at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon(BC_PROXY_ACCOUNT_INFO* pBCProxyAccountInfo, String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon(String company, String language, String objectServer, String configuration)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.Logon(String company, String language, String objectServer, String configuration)

The workaround is to assign the Admin group to the Synchronization Service Account in Dynamics under Administration/Administration Area/Users.  Being a member of the SyncAdmin group alone didn’t seem to do the trick. Afterwards, restart the Dynamics AX 2009 Synchronization Service.

Advertisements

HTTP could not register URL http://+:8000/SyncServices/. Your process does not have access rights to this namespace. Access is denied

The following error occurred when trying to start the Dynamics AX 2008 Synchronization Service:

—ERROR MESSAGE—
An error occurred while starting the synchronization service

—MORE DETAILS—
HTTP could not register URL http://+:8000/SyncServices/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).
Access is denied

—STACK TRACE—
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at Microsoft.Dynamics.SyncServices.SyncServiceBase.OnStart(String[] args)

As explained in article 70353, the workaround is to run the following command on the server:

netsh http add urlacl url=http://+:8000/SyncServices user=[domain][User]

Refreshing a grid with code changes

FormDataSource formDataSource = PurchLineTable.dataSource();
Common common = formDataSource.cursor().data();
;

//Updates the selected record
PurchLineTable.PurchStatus = 3;
PurchLineTable.update();

//Refreshes the datasource
formDataSource.research();

//Reselects the selected record
formDataSource.findRecord(common);

//Updates the form by refreshing the view of all the records in the data source.
formDataSource.refresh();

Suspending code execution with events

This appears to be a bug which still persists in 2009, where breakpoints in events are ignored. To get around this, one has to add the line of code: “breakpoint;”.