Enabling X++ Code Coverage in Visual Studio and Automated Build



AD FS Configuration – SSL certificate must be from a public certificate authority


We're seeing a lot of activity in configuring environments for use of the AX mobile apps. One of the more complex steps in the configuration is setting up Active Directory Federation Services (AD FS).  One consistent issue we are seeing is lack of an SSL cert issued from a certificate authority (CA). Since the mobile app is exchanging credentials and tokens with AD FS, SSL is used to avoid eavesdropping on that exchange.  

In some cases a "self-signed" or "self-issued" cert is being used. Unfortunately in that case the mobile app won't make an authentication request to AD FS since SSL isn't correctly enabled. In order to use SSL, the site to which the mobile app is communicating (in this case AD FS) must have an SSL certificate issued from a recognized CA. The CA validates that the certificate is being issued to the owner of the domain from which the mobile app requests authentication. The cost for SSL certs ranges from less than 100 USD and up.

There is also another certificate involved in AD FS configuration known as the token signing cert. The purpose of that cert is to sign the token which is being provided to the mobile app after authenticating the user's credentials. The token signing cert can be self-signed and does not need to be issued from a CA.

Following are some helpful references:

Here's a link which explains the certificate requirements for AD FS https://technet.microsoft.com/en-us/library/dd807040(v=ws.10).aspx

This article explains the process to request a cert from a CA https://msdn.microsoft.com/en-us/library/windowsazure/gg981937.aspx.

For general information about SSL, refer to this article https://msdn.microsoft.com/en-us/library/windows/desktop/aa364691(v=vs.85).aspx.

Hopefully that will help clear up some of the confusion about SSL certs and AD FS.


Apps for Android phone and iPhone are updated and are now available worldwide


This update features a complete UI refresh and adds category and merchant fields to the expense capture page.

These fields will allows you to select an applicable category for your expenses e.g. Taxi, Hotel, etc. Once you choose a category, you will then be able to enter the name of merchant you used, or select one from a list, if your company has one configured for the selected category.

We also released the apps (in English) to all markets worldwide.   We're working on localized versions for a future update.

With this update, we aimed to improve the usability and performance of the app, and add functionality that we hope our customers will find useful!

You can download the Dynamics AX apps from Google play and iTunes.

https://play.google.com/store/apps/details?id=microsoft.dynamics


  

 

https://itunes.apple.com/us/app/dynamics-ax/id663448683?mt=8


Azure Service Bus cost is minimal for AX Companion Apps


As customers and partners are planning to add the companion apps to their implementation, there have been numerous questions about the cost of the Windows Azure Service Bus. The companion apps leverage Service Bus to relay messages between devices (not on corpnet) and the on-premises instances of AX. So what is the cost of using Service Bus? In order to answer this question, we did some measurement and calculations this week. Following are the results.

Scenario

We tested the use of the Windows Store Dynamics AX 2012 Expenses app since it is the most message and data intensive of the apps. We used the app to create an expense report which had 9 expenses with 4 typical receipts. The receipts were captured with the Windows Phone Dynamics AX app. We then extrapolated that usage over 40,000 expense reports in a month (for example 20,000 employees with 2 expense reports per month).

Cost

The resulting monthly charge from Azure for Service Bus for 40,000 typical expense reports per month is approximately $21.97. That's it – the cost is measured in 10s of dollars per month for a fairly high transaction volume. This is consistent with the numbers we are seeing inside Microsoft for use of the companion apps for our internal deployment of Dynamics AX 2012 Expense Management. If you'd like to understand the details behind this number, then please read on. Otherwise rest assured that the cost of using Service Bus is minimal compared to the value provided by using the AX companion apps. Its worth noting that most of the MSDN subscriptions include an Azure monthly credit which can apply to Service Bus usage. 


Chargeable Usage

Azure charges are based on the following measures for usage of the Service Bus (pricing details):

  1. Relay hours: The total number of hours during which an app or service was listening to an address. In the case of companion apps this includes the on-premises connector which is typically listening 24/7 for requests from the apps and the apps which connect for very small intervals while interacting with the on-premises connector. The price is $.10 for every 100 relay hours.
  2. Number of Messages: Each request and each response which is relayed across the service bus is considered a message. The price is $.01 for every 10,000 messages
  3. Data Transfers through the Azure service: Data going out of the Azure service is priced at $.12 for per GB (for Zone 1 – US, Europe) or $.19 for per GB (for Zone 2 – other locations). The first 5 GB/Month is free.

Note: these reflect the current measures and rates as of this blog post

 Measured Usage

For the scenario described above, the following were measured.

For a single expense report:

App Relay Hours

0.0075

Messages

173

Data Transfer (bytes)

1,497,837

 

Extrapolating for monthly volume of 40,000 expense reports:

Connector Relay Hours

4,320

App Relay Hours

300

Total Relay Hours

4,620

Messages

6,920,000

Data Transfer (GB)

59.9

 Note: We assumed the on-premises connector was running 24/7 during the month and had 3 addresses (1. W8 Expenses app, 2. phone expense capture app, 3. address to provide config info to the apps). We also assumed 2 connectors for redundancy.

Calculated Costs

The calculated costs based on those measures are:

Relay

 $ 4.62

Messages

 $ 6.92

Transfer

 $ 10.43

Total

  $ 21.97

Note: We used the higher Data Transfer rate of $.19 per GB.  

Azure provides a pricing calculator that can be used to replicate these calculations.

Conclusions

  1. The cost is minimal for a relatively high transaction volume.
  2. For the Expenses app costs are likely to be most sensitive to the size and quantity of receipts which will drive the data transfer costs.
  3. Adding the other companion apps will cause an increased fixed-cost based on the on-premises connector. With all apps deployed (for the existing set of apps) the connector is listening on 8 total addresses.
  4. The Time and Approvals apps are likely to be less message and data intensive than the Expenses app.

We hope this helps clear the perceived hurdle of the cost of using Service Bus. We'd love to hear from customers and partners as you deploy the companion apps get more actual transaction volume and associated service bus costs.


Customize the Approvals app with the latest update


Along with the Expenses app, we've also released a an update for the Approvals app to support customization of different approval types. With this update, partners can choose which fields and charts to expose for different approval types.

The original version of the app shipped with immersive experiences for approving Expenses and Timesheets. This update enables creating similar experiences for any workflow approval type. It also enables customizing the Expense and Timesheets experiences.

This feature is explained in detail in the following whitepaper (https://mbs.microsoft.com/partnersource/northamerica/deployment/documentation/msdaxcustomizedataapprowin).

 


Easily set up an Azure demo environment for mobile apps


Trying out and demonstrating the Dynamics AX 2012 R3 companions apps just became a lot easier using Lifecycle Services for Dynamics AX to deploy AX 2012 R3 VMs on Azure.

1.  As a first step, LCS makes it very easy to deploy an Azure-based VM with AX 2012 R3 already installed.  Details are here https://technet.microsoft.com/en-us/library/dn741581.aspx

 2.  Then simply follow the config steps to connect the AX phone and tablet apps to your  AX VM in Azure: https://mbs.microsoft.com/files/customer/AX/Downloads/Servicepacks/HowtoConnectMobileAppsNAXinAzurePartner.pdf

Now you'll have a trial / demo environment (accessible from anywhere) that you can tweak and use to explore the apps.   You can turn the VM on or off as needed.

Give it a try and we look forward to hearing your feedback!


FAQ for Companion Apps


As we see activity in configuring environments for AX mobile apps, we are seeing some common questions. We'll keep this post updated with frequently asked questions. Feel free to post your questions.

Q. How do I set up Fiddler?

A. Fiddler is a great tool for debugging network traffic!

Here are some instructions on how to get Fiddler up and running.

Getting Started with Fiddler: https://docs.telerik.com/fiddler/configure-fiddler/tasks/configurefiddler

Monitor Windows Phone: https://www.spikie.be/blog/post/2013/01/04/Windows-Phone-8-and-Fiddler.aspx

Configure Fiddler for Windows 8 applications: https://docs.telerik.com/fiddler/configure-fiddler/tasks/configurefiddlerforwin8

 

 Q. After installing the mobile apps hotfix and completing setup, the timesheet app times out and sends me back to the sign in page.

The event viewer log on the machine running the mobile connector shows the following errors:

Unhandled Exception calling Microsoft.Dynamics.Framework.RapidStart.Connector.Modules.AXMobile.TimeService.GetProjectDetails.
User: (domain\username(domainnamehere)).

System.ServiceModel.ActionNotSupportedException: The message with Action 'https://schemas.microsoft.com/dynamics/2011/01/services/TSTimesheet/getProjectDetails' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

 A. This can happen in cases where the service was not deployed properly. Launching the AOT and redeploying the TimesheetServices under AOT\Service Groups\ will resolve this issue.

  

Q. After deploying the mobile apps hotfix and creating and configuring a new service bus. Logging into the mobile application gives me the following error (retrieved from fiddler):

ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer.

A. In this particular instance, the ADFS setup was done correctly.

This error can be caused if the thumbprint was copy/pasted into the thumbprint field in the Connector for Mobile Applications. Deleting the thumbprint and manually retyping it fixes this issue. It could
also be the case when using a self-signed token signing certificate, that certificate has not been imported into the certificate store of the machine running the mobile connector. Importing the certificate will resolve the issue.


Get started developing mobile apps for Dynamics AX 2012


Our prior blog posts have focused on the mobile applications that Microsoft is shipping for Dynamics AX 2012.  In addition to those apps, we know there's a need for developers to build lots of other great apps for AX.   We have captured what we learned in developing our apps, and have shared it with the AX community.  I wanted to remind developers of the information available to them.  These resources apply to phone or tablet apps and across windows, iOS and android platforms. 

Learn about the patterns and approaches used to develop the mobile apps in this whitepaper: Microsoft Dynamics AX 2012 WhitePaper: Developing Mobile Apps

Links to the code samples referenced in the above document

https://code.msdn.microsoft.com/Developing-Secure-Mobile-02105158

https://code.msdn.microsoft.com/Developing-Secure-Mobile-b6ba16a2

 

Build 2013 session on building the W8 apps for Dynamics AX 2012

https://channel9.msdn.com/Events/Build/2013/2-9193

We'd love to hear about your AX mobile apps (developed or under development) so feel free to comment below.