I have two different web servers hosting ASP.NET 4.x web applications that connect to an AX 2012 R2 instance using the .NET Business Connector. On server A, all functionality works: read, update, etc. On server B, using the exact same piece of code, most functionality works. However, one call to update a custom field in an existing record of SalesLine fails. Being Business Connector, I only get a generic error of on the ASP.NET webserver:
Exception of type 'Microsoft.Dynamics.AX.ManagedInterop.ErrorException' was thrown.
at Microsoft.Dynamics.BusinessConnectorNet.AxaptaRecord.Update()
The AOS server records NO errors for the failed call that we can find in Event Viewer. There's a bunch of validation logic on the update. When called from server A, it succeeds and completes the update after an average of 40-45 seconds. When called from server B, it fails after an average of 20-25 seconds.
I have verified that the code being used and the business connector DLL files on both servers are the exact same. Configuration for both servers also appears to be identical. Further, all other functions from server B work just fine. I can read and update various tables and fields. Just this one function is causing problems, and only from one of the two servers.
Here's the code:
Axapta axp = new Axapta();
if(axp.Login()){
AxaptaRecord lineToModify = axp.CallStaticRecordMethod("SalesLine", "findRecId", saleslineid, true) as AxaptaRecord;axp.TTSBegin();
lineToModify.set_Field("CustomFieldName", customFieldNewValue);
lineToModify.Update(); çFAILS ON THIS COMMAND
axp.TTSCommit();
lineToModify.Dispose();
axp.Logoff();
axp.Dispose();
}
Completely baffled and not sure where else to look to try and troubleshoot.