Monday, October 31, 2011

Plan a Succesful AX 2009 System Topology


Today I would like to talk about a topic that, when followed with professionalism, can differentiate a good consultant from a bad one.

If you think about it, Microsoft Dynamics AX has become the way to help companies become more efficient, and to also help them save money. However, is also true that AX (in general) has become a big boom where some (low quality) partners and developers are not following up certain guidelines to make an implementation a successful one.

The result ... Customer dissatisfaction and a bad taste for AX.

In this article I would like to discuss the basics to plan a good system topology. In other words, what do we need to have in mind when faced with this task. What kind of question should we be asking the customer.

For example,  A large business with multiple locations might experience different challenges compared to a smaller business with one location and only a few users.

So, a good tip would be to start the implementation process by (1) creating an inventory of the customer's current hardware and software, and (2) determining the deployment scenario that best meets the business’ current needs and future growth.

 So, before the actual installation occurs, we must collect information about the customer's requirements to help prepare the correct topology.

1- Define and document these items with the customer:
  • Number of transactions
  • Number of users
  • Uses of system (modules and features to be implemented)
  • External user access required
  • Web access required
  • Required availability
  • Projected growth rate
  • Number of sites

2- Evaluate and document the existing infrastructure:
  • Existing hardware
  • Bandwidth
  • Operating system
  • Databases present
  • Applications to integrate

3- After collecting this information, determine how to structure the system. Key decisions are as follows:
  • If there are any computer roles that can be combined on a single computer? If computer roles can be combined, consider which ones to combine.
  • Determine whether there are any network load-balanced clusters to host the AOS.
  • Select a backup system for the Microsoft Dynamics AX environment.


If the customer's requirements are focused on not allowing users outside the domain, then use the following topologies:

Minimal Base Topology

Clustered Base Topology (You can install the application file server on a AOS server as you will have more than one AOS server)

Enterprise Portal Topology

There are two (1) Intranet (Simple and Large-Scale), and (2) Internet-Facing


Intranet Large-Scale

Internet-Facing Enterprise Portal

Standard Perimeter Network
With a standard perimeter network the Active Directory domain contains:
  • All internal users to be added to Microsoft Dynamics AX 2009.
  • Special users required for Microsoft Dynamics AX functionality.
  • An organizational unit that contains any users from outside the organization that require Enterprise Portal access. These users’ rights must be restricted in that the users cannot:
                      Log on locally
                      Access network

Traditional Perimeter Network
Basically, the traditional perimeter network contains two Active Directory domains: the internal domain and the external domain. The internal domain contains:
  • All internal users to be added to Microsoft Dynamics AX 2009.
  • Special users required for Microsoft Dynamics AX functionality.
  • Group required for application integration server functionality.
[From Microsoft Training Material]
The perimeter network contains a second domain controller with a one-way trust relationship to the first domain controller. The second domain controller contains any users from outside the organization that require Enterprise Portal access.
These users cannot have any rights in the internal domain, and their rights must be restricted in the perimeter network domain so that the users cannot:
  • Log on locally
  • Access network

 Report Server Topology (This is installed on IIS and is not Internet-Facing)

Application Integration Server Topology (This is also installed in IIS and is not Internet-Facing)

Let's be consistent in the work that we do. Let's provide a great customer satisfaction so Microsoft Dynamics AX can keep growing and helping businesses succeed. By following the above suggestions, we can make a huge difference in how new businesses experience AX implementations.

Take care!

Thursday, October 27, 2011

AX 2009 Workflow - Run batch jobs through a Job

When working with Workflows, sometimes  have encountered a situation where my workflow item just don't run.
This might be due to a problem on the Batch Server. To test (run) the workflow mimicking the batch server we can write the following job.
static void workflowJobs(Args _args)
    SysWorkflowMessageQueueManager  queueManager;
    WorkflowWorkItemDueDateJob      workItemDueDateJob;

    queueManager = SysWorkflowMessageQueueManager::construct();;
    workItemDueDateJob = new WorkflowWorkItemDueDateJob();;

Another alternative is to go to AOT > Forms > Tutorial_WorkflowProcessor and click the start button.

Unable to validate the AX 2009 Workflow Webservice URL on a Windows Server 2008 R2 x64 - The request failed with HTTP status 405: Method Not Allowed.


I was having some issues yesterday validating an URL in Windows Server 2009 R2 - 64. I have done this a few times already and the process have been really smooth and straight forward. However, in the environment I'm working on right now I the The request failed with HTTP status 405: Method Not Allowed error.

I found this post that helped me solve the problem, which basically was changing the property value of the MicrosoftDynamicsAXWorkflow50 application pool in IIS Manager to "Enable 32-Bit Applications".

Here is the link:

Configuring Kerberos Authentication with Enterprise Portal in AX 2009


I remember the first time I had to setup the AX 2009 EP. Oh man, it was painful at the time and I wished I could have had the document I'm about to share/

In a way I feel lucky I had to do it and figure it out on my own as the document really makes sense, and I see now what where the steps I did not followed correctly.

Here is the link!

How is X++ converted to MSIL


I found a superb video about how Microsoft is translating  X++ code to MSIL. I remember that this great new model was anounced at Convergence 2011.

Here it is.

Thursday, October 6, 2011

Standalone AOS and AOS Clusters

The following is an explanation of some of the possible combination we can have when it comes to AOS’s in our environments.

For what I have learned over the years, we can have several different AOS setups, starting from a single AOS environment (usually used in a development and/or test machine) to a multi AOS (cluster) environment.

So, the following are the differences (based on my opinion)

Standalone AOS Environment

It is obvious that this is the simplest configuration. Usually, I would follow this pattern when I have to create a development and/or test environment. The reason is that for development scenarios (in small –mid companies) we don’t deal with 70 – 80 developers at a time.

In addition, we can add (if we want to) extra AOS servers if the need to handle a larger number of users and/or connections is necessary. This will create a side by side configuration.

Multiple AOS’s (not clustered)

As stated earlier, we know that multiple AOS's in a single Ax environment can exist side by side. Typically the way it works is that a user will connect to the AOS that has been configured in the AX configuration Utility. However, if we were to have more than one AOS listed in the AX configuration utility, the first available will be used to fulfill the connection request by a client.

I guess that if we are listing (and using) more than one AOS in our AX configuration utility is a good thing as this will ensure that a connection is guaranteed to the client because it will use the first available(except if all the AOS servers are down of course).

Side Note:  When using multiple AOS’s we can also define how the user connects to it. For example, in the project I’m working on right now we deal with two different time zones (USA and Asia), so in our cluster we define that the users in Asia will connect to AOS Asia, and the users in the US to the AOS US.

I guess the side note above opened the conversation to yet another type of setup, and this is the Clustered AOS.

There are two types of cluster mode for AOS.

1-      Cluster mode without Load Balancer
2-      Cluster mode with Load balancer

Cluster mode without load balancer

When a client starts, it sends a request to the first server that is listed in the client configuration. When this happens, the server returns the list of active AOS instances in the cluster, sorted by workload.  Then, the client attempts to connect to the first AOS instance in the list, and if that connection fails, the client attempts to connect to the second AOS instance in the list, and so on.
It will be logical to conclude that the only criteria to manage the load is the number of clients that are connected to a specific AOS, this includes threads, BC, etc.

Cluster with load balancer

If we set up a cluster that includes a load balancer, the load balancing AOS instance is dedicated to distributing the user load (NOTE: A load balancer AOS does not require a license nor does process Microsoft Dynamics AX business logic or data)

Side Note: We need to ensure to set up all the client configurations to connect ONLY to the load balancing AOS instance.

So when a client starts, it connects to the load balancing AOS instance. Then, the load balancing AOS returns a list of active AOS servers (instances) that exist in the cluster, usually sorted by the workload. Then, the client attempts to connect to the first AOS instance in the list. If that connection fails, the client attempts to connect to the second AOS instance in the list, and so on.

So, we can conclude that this is very similar to the non-clustered AOS mode, and I guess the only difference using a configuration like this is that we can add and/or remove other AOS instances from the cluster without updating client any of the configurations, which is really cool. Now the question is, even though the Load Balancer AOS is kind of free, do we really need it? Or what happens if the Load balancer AOS fails?

Channel 9 - AX 2009 AIF Web Services

The following link will take you to a Channel 9 screen cast where you can learn about the new features of the AX 2009 AIF Web Services.

The following are some of the enhancements to Application Integration Framework (AIF) in AX 2009 AIF Web Services.

1.       Create, read, update, and delete operations are now supported.
2.       The programming model for AIF supports document services that encapsulate business logic and are the interface between AX 2009 and external systems.
3.       AIF provides functionality for consuming external Web services from within X++.
4.       New document services for additional commonly-used documents.

Wednesday, October 5, 2011

Loop through SELECTED records on an AX Form - AX 2009

We have the ability to loop through SELECTED records on a AX form in X++.

There are many ways to accomplish this in AX, but based on my requirements I made the choice of looping through the selected records in a button's click() method.

CustInvoiceJour                     localCustInvoiceJour;
FormDataSource                      form_ds;
Common                              common

//Set form data source
form_ds = CustInvoiceJour_ds;

for(common = form_ds.getFirst(true)?form_ds.getFirst(true):CustInvoiceJour_ds.cursor(); 
     common = form_ds.getNext())

        localCustInvoiceJour = common;


Tuesday, October 4, 2011

Error code 122 - AX 2009

While modifying some code on my devlopment machine i came across the following error...
Error in file: D\MDAX\AppFiles\..while writing in record = 336985 Windows error: = Error code: 112 = Unknown Error
 The above error (based on the msdn description) means that the disk is full (ERROR_DISK_FULL: There is not enough space on the disk)
The problem is that the AOS is trying to save the changes I making to my code into the *aod files, but there is not enough space on the hard disk (in my case D) for it to accomplish that.
We can solve this problem by freeing up disk space on the AOS machine.