- Full compilation
- Full CIL
- Refresh AIF services from AOT form "AIFService"
- Register services from AOT under "Services" node
- Check your AOS host file under "Windows/System32/Driver/Etc/Host.Config for any wrong entry for the AOS machine name
------------------------------------Error Message--------------------------------------------------------
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->
System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication
because it is in the Faulted state.Server stack trace: at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) at
System.ServiceModel.Channels.ServiceChannel.System.IDisposable.Dispose()Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData& msgData, Int32 type) at System.IDisposable.Dispose() at Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModelCache.SetDataTypeCache()
at Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModelCache.Create(IAxClient client, String templateName, String domainUser, String companyId, Boolean
runtimeCache) at Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModel.Create(String templateName, String companyId, String owner, String domainUser)
--- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke
(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at
Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.InvokeClrStaticMethod(ClrBridgeImpl* , Char* pszClassName, Char* pszMethodName, Char* assemblyName, Int32
argsLength, ObjectWrapper** arguments, Boolean* argsAreByRef, Boolean* isException)
See also the following link, which highlight a problem with the 'using' block.
ReplyDeletehttp://stackoverflow.com/questions/530731/how-to-make-sure-you-dont-get-wcf-faulted-state-exception