Hi,

"TwC : Assert usage of API COM.Save because it is protected by Code 
Access 
Security" is best practice deviation error that I get when I compile 
(at 
level 4) with axapta 4. I've downloaded the "Microsoft Dynamics AX 
4.0 
Writing Secure X++ Code" white pages to get some insight and I've 
used the 
following code;

InteropPermission permission = new InteropPermission
(InteropKind::ComInterop);

permission.assert();
com = new COM('@EAM3628'); // label for my com object
com.Save();

CodeAccessPermission::revertAssert();

All of this still yield the same problem. What can I do to fix this?


Reply via email to