Microsoft Dynamics AX 2012 R3 Development-2 Locus IT Services

Microsoft Dynamics AX 2012 R3 Development-2

Locus IT ServicesMicrosoft Dynamics AX 2012 R3 Development-2

Lesson 3 – Code Access Security

Code Access Security:

Code Access Security (CAS) helps protect APIs that have potential security risks when the APIs are running on the server.

CAS-enabled APIs called on the server require the use of a permission class—one of the classes derived from CodeAccessPermission. If permission to use the API is not asserted, the following error is generated:

Request for the permission of type ‘%1’ failed.

This error is also generated if permission is asserted, but the code is running on the client. Permission is required only for CAS-enabled APIs that run on the server. The string supplied in the error message is the name of one of the following permission classes:

  • ExecutePermission
  • FileIoPermission
  • InteropPermission
  • RunAsPermission
  • SkipAOSValidationPermission
  • SqlDataDictionaryPermission
  • SqlStatementExecutePermission
  • SysDatabaseLogPermission

For a list of CAS-enabled APIs, see Secured APIs.

You can CAS-enable your own APIs. For more information, see How to: Secure an API on the AOS.

Locus IT Project Management Office
What’s it?