Fatal RunAs error in AIF

When I try to receive a message using the Application Integration /framework, I get the following error.

Message (07:27:01)
The RunAs session (Server) attempted to invoke a client call that is not supported when Microsoft Dynamics AX is running as another user. Method called: processAsUser
(S)\Classes\EAMOrgProjDetail\GetNumberSeq - line 7
(S)\Classes\AxdEAMFailure\prepareForSave - line 18
(S)\Classes\AxdBaseCreate\deserializeDocument - line 99
(S)\Classes\AxdBaseCreate\createDocument - line 31
(S)\Classes\AxdBase\create - line 15
(S)\Classes\AifDocumentBroker\create - line 101
(S)\Classes\AifRequestProcessor\executeCreate - line 80
(S)\Classes\AifRequestProcessor\processInboundMessage - line 103
(S)\Classes\AifInboundProcessingService\processRequest - line 37
(S)\Classes\AifInboundProcessingService\processAsUser - line 25

Could anyone please give me some ideas as to what I could look for, or where I should look, to get this resolved? This happens with existing messages (CreateSalesOrder) and my own custom docs / messages.

Thanks in advance.

Narrowed it down a bit : Fault occurs at call to DictClass.callObject in AIFDocumentBroker. Seems like a Code Access Security issue.

Will keep looking, but I hope someone can save me some time with an answer.