Share via


Secured APIs

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Certain APIs that ship with Microsoft Dynamics AX use Code Access Security. When these APIs are run on the server, a class derived from CodeAccessPermission must be used. This helps make the APIs more secure. When you upgrade from a previous version of Microsoft Dynamics AX, you must modify calls to these APIs to ensure that the code executes correctly.

Note

The security feature is enabled by default. You can disable the feature or simulate the feature when you're testing code by using the following command at the command-line window.

ax32serv.exe -console 01 -caslevel=[enable/disable/trace]

When you use the trace switch to simulate the feature, Infolog reports any APIs that are called incorrectly.

When you run ax32serv.exe from the command line, you are running an instance of Application Object Server (AOS) as a non-service.

APIs that use Code Access Security are shown in the following list. For more information about calling these APIs, see How to: Secure an API on the AOS.

AOSLoadGen.new method

AsciiIo.new method

BinaryIo.new method

BinData.loadFile method

BinData.saveFile method

CLRInterop.new method

CLRInterop::getAnyTypeForObject method

CLRInterop::getLastException method

CLRInterop::getObjectForAnyType method

CLRInterop::staticInvoke method

CLRObject.dispatch method

CLRObject.new method

COM.new method

COMDispFunction.call method

Comma7Io.new method

CommaIo.new method

CommaTextIo.new method

DictClass.callObject method

DictClass.callStatic method

DictTable.callObject method

DictTable.callStatic method

DLL.new method

DLLFunction.call method

evalBuf function

Io.new method

runAs function

runBuf function

Statement.executeQuery method

Statement.executeUpdate method

TextBuffer.fromFile method

TextBuffer.toFile method

TextIo.new method

Thread.new method

Thread::executeInUIThread method

Thread::getThisThread method

TreeNode.treeNodeExport method

WinAPIServer::copyFile method

WinAPIServer::createFile method

WinAPIServer::deleteFile method

WinAPIServer::fileExists method

WinAPIServer::fileSize method

WinAPIServer::getFileModifiedDate method

WinAPIServer::getTempPath method

WinAPIServer::pathExists method

XmlDocument.load method

XmlDocument.save method

XmlDocument::newFile method

XmlNode.transformNode method

XmlReader::newFile method

XmlReaderSettings.prohibitDtd method

XmlResolver.allowFileAccess method

XmlResolver.allowWebAccess method

XmlResolver.baseUrlOverride method

XmlResolver.useCredentials method

XmlSchema.writeToFile method

XmlSchema::newFile method

XmlTextReader::newFile method

XmlTextReader.prohibitDtd method

XmlTextWriter::newFile method

XmlTransform::execute method

XmlWriter::newFile method

XppCompiler.new method

XppCompiler.execute method

XppCompiler.executeEx method

xRecord.skipAosValidation method

See also

How to: Secure an API on the AOS

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.