Error While Activating The Inbound Port In AX2012 R2

Stop AOS

Delete all files from XPPIL folder

Start AOS

Full compile the Dynamics AX application object (Should have zero error)

perform full CIL compilation

I hope this will solve your problem

Please verify and update with your findings.