AX 2012 R3 CU8: System.ServiceModel.FaultException: An error occurred

ⅰ亾dé卋堺 提交于 2019-12-24 08:33:17

问题


I'm trying to update an existing sales order using AIF services. When I invoke the service operation, I get the following error message:

System.ServiceModel.FaultException: An error occurred.

Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

The client is a VisualStudio .net C# console project. The call is wrapped in a try/catch block.

        try
        {

            Console.WriteLine("Making call to update sales order...");
            proxy.update(callContext, entityKeys, newSalesOrderDoc);
            Console.WriteLine("Updates completed successfully.");
            proxy.Close();

        }
        catch (FaultException<AifFault> e)
        {
            foreach (var item in e.Detail.InfologMessageList)
            {
                Console.WriteLine(item.InfologMessageType + " -- " + item.Message);
            }
            proxy.Abort();
        }
        catch (Exception e)
        {
            Console.WriteLine(e.ToString());
            proxy.Abort();
        }

I've set a breakpoint on the first catch, but execution never stops there. I'm able to invoke other operations on the inbound port without a problem.

Is there any way to get additional information?

Thanks.


回答1:


Check AIF Exceptions in the AX (System administration - Periodic - Services and Application Integration Framework - Exceptions).

You can also enable message logging on the Inbound port (under Troubleshotting select All document versions) and Include exceptions in fault. Don't forget to disable in production or periodic cleanup.



来源:https://stackoverflow.com/questions/30760943/ax-2012-r3-cu8-system-servicemodel-faultexception-an-error-occurred

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!