Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

Microsoft Dynamic AX 2009 : .NET Business Connector - Inside .NET Business Connector

6/16/2013 5:12:49 PM

.NET Business Connector is a versatile platform component. It contains the Dynamics AX kernel and provides a runtime environment for executing X++ code and interacting with other elements in the AOT. Nearly the entire Dynamics AX development and runtime environment is based on X++, and the kernel is responsible for interpreting and executing this code, part of the reason .NET Business Connector is so powerful.

1. Logical Component Stack

In .NET Business Connector, the following three logical components (illustrated in Figure 1) interoperate to deliver functionality:

Figure 1. Logical component stack within .NET Business Connector


Managed Classes

The managed classes component is a set of .NET Framework–based classes that expose the functionality you can access through .NET Business Connector. It includes the following classes: Axapta, AxaptaBuffer, AxaptaContainer, AxaptaObject, and AxaptaRecord. The functionality of the managed classes is mostly equivalent to the COM Business Connector, which will be discontinued in future versions of Dynamics AX.

Transition Layer

In the transition layer, .NET Framework objects and types are mapped to their Dynamics AX equivalents. This mapping occurs as part of both the request and the response processing in .NET Business Connector.

Interpreter

The interpreter is the part of the Dynamics AX kernel that is responsible for parsing and executing X++ code. Dynamics AX allows code to be executed locally in the kernel of .NET Business Connector or remotely in the kernel of the AOS. The interpreter manages local and remote code execution. It also manages connectivity to the AOS and other infrastructure, such as session management and security.

2. Run Time

At run time, .NET Business Connector interacts with the AOS. Figure 2 depicts the run-time interaction.

Figure 2. .NET Business Connector run-time interactions


The following list describes the important interactions among .NET Business Connector, the AOS, and the Dynamics AX database:

  • .NET Business Connector authenticates against the AOS when the Axapta.Logon method is called. The credentials that .NET Business Connector passes to the AOS must correspond to an existing Dynamics AX user, who must be enabled and have the appropriate rights, granted through security keys, to use .NET Business Connector.

  • The AOS completes the authentication and establishes a session for the Dynamics AX user.

  • Other .NET Business Connector classes and methods are invoked as needed. Once the session is established, .NET Business Connector can be used to create, read, update, or delete (CRUD) Dynamics AX data. In addition, the X++ business logic that resides in the Dynamics AX metadata store, the application object data can be invoked and executed either on the AOS or in .NET Business Connector.

3. Web Interoperability

The Dynamics AX development environment includes a Web framework, the Enterprise Portal framework. This framework is used to develop the Web-based functionality in X++, which is then exposed in Enterprise Portal. Enterprise Portal uses .NET Business Connector to integrate with Dynamics AX, and .NET Business Connector can interoperate with Microsoft Internet Information Services (IIS) and Microsoft ASP.NET to provide access to the HTTP context information, including requests, responses, and view state, necessary to enable Web-based functionality.

Figure 3 illustrates how Web interoperability works.

Figure 3. .NET Business Connector Web interoperability


Managed Web applications, including Enterprise Portal, execute in IIS within an application domain. Upon initialization, the application domain loads and instantiates .NET Business Connector. The managed application then uses .NET Business Connector to invoke Dynamics AX Web framework elements, such as Web menu items, Web forms, and Web reports. The X++ code stored in the application object data that defines these elements accesses the HTTP context as needed through the following classes (located in the AOT under System Documentation\Classes):

  • IISApplicationObject

  • IISContextObject

  • IISPostedFile

  • IISReadCookie

  • IISRequest

  • IISRequestDictionary

  • IISResponse

  • IISServer

  • IISSessionObject

  • IISStringList

  • IISVariantDictionary

  • IISViewState

  • IISWriteCookie

For example, you could write an X++ class to retrieve a variable from the HTTP context, which you could then use in another X++ class. In the following code example, the method takes a parameter, which is the name of the HTTP context variable, the value of which is obtained using IISRequest.

str getIISServerVariable(str 80 var)
{
    IISRequest request;
    str res;
    ;
    request = new IISRequest();
    res = request.serverVariables().itemTxt(var);
    return res;
}


If you want to develop a new, custom Web-enabled application that integrates with Dynamics AX and can access managed HTTP context information, you can use both ASP.NET and .NET Business Connector. The interoperability among IIS, ASP.NET, and .NET Business Connector allows you to access HTTP context information from X++ code that is part of your application.

Note

To successfully run with Dynamics AX 2009, existing applications developed with the previous version of the COM Business Connector and ASP that accessed the unmanaged HTTP context must be migrated to ASP.NET.


4. Security

This section highlights the security mechanisms in place for .NET Business Connector and covers authentication, authorization (including security keys), and code access security.

Authentication

Integrated Windows authentication is implemented throughout Dynamics AX 2009, including .NET Business Connector. The managed classes use parameters that are specific to Integrated Windows authentication.

Authorization

.NET Business Connector has an associated set of Dynamics AX security keys that control access to different parts of its functionality. Table 1 describes these security keys. You can find more information about these keys in the Data Dictionary under Security Keys.

Table 1. Dynamics AX Security Keys
Security KeyDescription
SysComEnables or disables the use of COM Business Connector and .NET Business Connector
SysComDataControls the user’s level of access to data
SysComExecutionControls access to execution rights of classes and jobs in .NET Business Connector
SysComIISControls whether .NET Business Connector is accessible to users when it’s running in the context of IIS

You can create sessions in .NET Business Connector either directly or indirectly. The direct approach uses the credentials of the current Dynamics AX user. The indirect approach uses the proxy impersonation mechanism whereby an AX user can be impersonated using the LogonAs API. You can control the use of .NET Business Connector in different user groups in Dynamics AX by configuring these security keys. If you do configure these security keys, they will apply only in sessions created directly.

Code Access Security

Code access security (CAS) was introduced in Dynamics AX 4.0. CAS is a mechanism intended to help Dynamics AX developers write code that invokes protected X++ APIs in a manner that minimizes the potential for them to be maliciously exploited. A protected API is an X++ API method that has been secured by using CAS. CAS also ensures that the protected APIs are executed only on the AOS, not on the Dynamics AX client or .NET Business Connector. CAS therefore restricts the X++ APIs that can be executed locally in .NET Business Connector. If an attempt to use a restricted API is made, a CAS exception is returned.

Other -----------------
- Microsoft Dynamic AX 2009 : .NET Business Connector - Introduction
- Windows Server 2012 : Installing and Managing Hyper-V in Full or Server Core Mode - Installing Windows Server 2012 and Microsoft Hyper-V Server 2012
- Windows Server 2012 : Installing and Managing Hyper-V in Full or Server Core Mode - Enabling the Hyper-V role
- Windows Server 2012 : Installing and Managing Hyper-V in Full or Server Core Mode - Verifying Hyper-V requirements
- Windows Server 2012 Requirements and Installation : Customizing the Interface with Features on Demand
- Windows Server 2012 Requirements and Installation : Deploying Minimal Server Interface
- Windows Server 2012 Requirements and Installation : Switching Between Install Modes
- Windows Server 2012 Requirements and Installation : Installing Server 2012 (part 2) - Server with a GUI Install
- Windows Server 2012 Requirements and Installation : Installing Server 2012 (part 1) - Server Core Install
- Windows Server 2012 Requirements and Installation : Server 2012 Editions, Server 2012 Requirements
- SharePoint 2010 : Farm Governance - Restricting web part access in the farm
- SharePoint 2010 : Farm Governance - Installing a feature and activating it
- Microsoft Lync Server 2010 : Planning for Voice Deployment - Voice Resilience
- Microsoft Lync Server 2010 : Planning for Voice Deployment - Voice Routing
- Windows Server 2003 on HP ProLiant Servers : The Pilot
- Windows Server 2003 on HP ProLiant Servers : Build Guides
- Windows Server 2003 on HP ProLiant Servers : File and Print Services, Selection of ProLiant Servers for the Enterprise
- Maintaining Dynamics GP : Troubleshooting issues with a DexSQL log
- Maintaining Dynamics GP : Speeding security setup with User Copy
- Maintaining Dynamics GP : Validating balances with the Reconcile utility
 
 
Most view of day
- Microsoft Dynamic AX 2009 : Report Customization (part 1) - Creating Promotional Materials
- Microsoft Visio 2010 : Modifying a Graphic (part 1) - Resizing a Graphic
- Client Access to Exchange Server 2007 : Using Cached Exchange Mode for Offline Functionality
- SQL Server 2012 : Data Architecture (part 2) - Smart Database Design
- System Center Configuration Manager 2007 : Creating New Reports
- Microsoft Dynamics Ax 2009 : RunBase Framework Extension (part 1) - Property Method Pattern, Pack-Unpack Pattern
- Windows 7 Mobility Features : Power Management (part 2) - Power Options Control Panel
- Windows Server 2008 : Designing the Active Directory Administrative Model (part 3) - Planning to Audit AD DS and Group Policy Compliance, Planning Organizational Structure
- SQL Server 2008 R2 : Creating and Managing Stored Procedures - Deferred Name Resolution
- Microsoft Lync Server 2010 : Planning for Voice Deployment - Media Bypass
Top 10
- Windows Phone 8 : Scheduled Tasks - Scheduled Task API Limitations
- Windows Phone 8 : Scheduled Tasks - Updating Tiles Using a Scheduled Task Agent
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 5) - Editing an Existing To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 4) - Creating the To-Do Item Shell Tile, Saving a To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 3) - Debugging Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 2) - TodoService, TodoItemViewModel
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 1) - TodoItem,TodoDataContext
- Windows Phone 8 : Scheduled Tasks - Using Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- Windows Phone 8 : Windows Phone Toolkit Animated Page Transitions - Reusing the Transition Attached Properties
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro