• Can not create default Keyset when using AXBuild

    We have a large deploy with a customer this week which is a very bad time for AXBuild to stop working… really bad time. And ofcourse that is what happened Smile (screw you Murphy). There are of course other ways to to a compile in AX byt doing it from within AX is really slow so AXBuild is much nicer and faster.

    The problem was that when I launched AXBuild the process kept crashing with this error:

    clip_image002

    I also got the following events in Event viewer:

    Error 14.11.2016 17:49:05 Dynamics Server 01 110 None
    Object Server 01:
    Can not create default Keyset. Error code -2146893809.

    Error 14.11.2016 17:49:05 Dynamics Server 01 110 None
    Object Server 01:
    The license information can not be decoded.

    Error 14.11.2016 17:49:06 .NET Runtime 1026 None
    Application: Ax32Serv.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception
    Exception Info: System.Runtime.InteropServices.SEHException
    Stack:
    at <Module>.wmainCRTStartup()
    at <Module>.wmainCRTStartup()

    When doing research we found that this is most likely a permissions issue and I got somen hints on what to check:

    • Are you running elevated: Check
    • Are you local admin on the AOS computer: Check
    • Is the AOS user local admin on the AOS computer: Check
    • Check AOS user permissions on the AX database and modelstore: Check

    I was not able to find the solution so I resorted to Microsoft Support and they sait the same thing… it is a permission issue. So finally I fired up ProcessMonitor (which I don’t do often enough) and the it was after some looking around and filtering. I filtered out everything except the Ax32Serv.exe process and I also removed the SUCCESS lines.

    The issue was that my user (the one doing the the compiling) got access denied on a file in the folder:

    C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

    I changed the permission on the file and Presto! (or as one of my colleugues said – I am going to get a Cappuchino with cinnamon)

    The compile is running and things are good

    /Johan

  • CREATE TABLE permission denied in database ‘tempdb’

    This morning we had an incident with a customer who during the night had failed over their SQL cluster during the night and then failed it back again and now AX had stopped working. The error was this:

    image

    The problem is that when SQL is restarted the permission on tempdb is reset. AX solves this is a “special” way. When AX is installed the install created a stored procedure in master on the SQL server which it calls to set the permissions in case they get lost.

    2016-11-10_09-15-41

    These was unfortunately missing on one of the nodes so I used Management Studio to script them out and the create them on the node where they were missing

    /Johan

  • Problems using Excel Workbook Creator in AX “7”

    We have started working with some customers who are looking into implementing The New Dynamics AX (aka AX 7) and one of the very useful features in AX are integration with the Microsoft Office. This has historically been done using an Office Addin which has been installed from the AX Install CD (of deployed by IT). In the new AX version this is done a little differently. You need to install a plugin from the Office Store (which I talk about here).

    The other day one of my colleagues came to me and told me that it did work to use the Excel workbook creator… the login failed Sad smile. The login started, the user was redirected to our ADFS site and it was visible for a moment and then it was redirected to a blank place with the address: https://az689774.vo.msecnd.net/dynamicsofficeapp/v1.2.1.0/App/DynamicsApp.html#id_token

    SNAGHTMLdc73d34

    This is an issue with Office and how Office handles ADFS logins according to this article. According to Microsoft this has been fixed in the 16.0.6868.2060  build of Office 2016. This build is at the moment (2016-05-20) only available for Office Insiders which means that if you are using Office 365 your admin needs to enable you for Current Channel and you need to reinstall Office. 

    Links:

    https://ax.help.dynamics.com/en/wiki/office-integration-troubleshooting/

  • SQL Express and the missing config file

    When you install Microsoft SQL Server the install generates a configuration file. This is great if you want to create an unattended install of SQL. If you want to do a second install (or third or fourth…) just run: 

    Setup.exe /ConfigurationFile=ConfigurationFile.INI

    and you get the same install again.

    Today I wanted to do the same with SQL express… but no file was created… Hmmm…

    Apparently you need to start the install using this:

    Setup.exe /ACTION=INSTALL /UIMODE=Normal

    /Johan

    Links

    http://www.codeproject.com/Questions/713204/SQL-Server-How-to-generate-a-configuration-fi

  • AX 2009 Firewall Issues

    Today we are looking into an AX 2009 install…

    If you install AX 2009 on a server with the Firewall enabled the setup program will create a new firewall rule called Dynamics AX 5.0-[AXInstanceName]. This would be all good if it wasn’t for the fact that the rule was wrong Sad smile

    The rule points to this path:

    C:\Program Files\Microsoft Dynamics AX\50\Server\[AXInstanceName]\Bin\Ax32Serv

    This should of course be:

    C:\Program Files\Microsoft Dynamics AX\50\Server\[AXInstanceName]\Bin\Ax32Serv.exe

    Change it and everything will work Winking smile

    /Johan

    Links:
    https://blogs.msdn.microsoft.com/emeadaxsupport/2009/04/28/unable-to-connect-to-the-aos-with-windows-server-firewall-enabled-on-windows-server-20082008-r2/

  • Using Office Integration in Dynamics AX

    Today one of my customer had trouble using the Excel Workbook Designer in Dynamics AX (“7”). He got the following error when he tried opening the workbook in Excel:

    SNAGHTML1023f908

    The Error is No Applet Registration found

    Turns out he had not installed Microsoft Dynamics Office Add-in which can be found here: https://store.office.com/microsoft-dynamics-office-add-in-WA104379629.aspx?assetid=WA104379629&sourcecorrid=a8afb77b-cfe0-4b70-baeb-f93fa38ad77b&searchapppos=0

    Once this was install it worked great Smile

    /Johan

  • Enabling the demo users in Microsoft Dynamics AX

    Today a customer asked me if the could get a user and test Microsoft Dynamics AX (for search engine reasons i will add AX7) in our demo environment. The customer does not use Azure Active Directory yet and this made things a bit tricky. If they hade a AAD tenant I would just use this method.

    After searching around a bit I found that there is a way to enable the demo users. These are users created by Microsoft which are in a AAD tenant owned by MS.

    Note that these users are static and you cannot change the password which means that everyone can use these users to log in to your system if you enable them. This is not recommended in a sensitive environment.

    To enable the users just edit the user and add contosoax7.onmicrosoft.com to the domain field. The end result should be https://sts.windows.net/contosoax7.onmicrosoft.com

    image

    The users all use the password Pass1Word

    /Johan

    Links
    http://kaya-consulting.com/how-to-enable-the-contoso-personas/

  • Adding users from another AAD tenant to AX7

    In AX 2012 and prior it was a little tricky to add external users. You basically could not, so you needed to add an Active Directory Account to your AD and import it as a AX user. You might not want to add external users in your AD.

    This is much easier in AX7 (it should be Dynamics AX but it is much harder to search for on the internets)… much, much easier… you see AX 7 does not handle identity at all…  it trusts Azure Active Directory for this. A requirement is that the external company uses Azure Active Directory.

    Note (Added later): If you have set up the AX install in Azure using LCS the “default” Azure Active Directory is the one connected for your Azure tenant. These users are not treated as external users and do not need the modification below.

    So, to add an external user to AX you go to System Administration – Users and click New to add a new user. The user we want to add in our example is Kalle Kula, Kalle has the email address kalle.kula@innoworks.com

    image

    The only thing missing is that we need to specify the Azure AD tenant in the domain field and set it to https://sts.windows.net/innoworks.com (which is not completely visible in the screenshot)

    image

    Save the user and add roles and we are all set!

    /Johan

  • Exporting to Excel in AX7

    So, last week Microsoft released the RTW version of the new AX version called Microsoft Dynamics AX.

    One of my colleagues was playing around with it a bit and bumped into a problem. When he tried to export to Excel he got the following:

    The browser tries to connect to this address (and obviously this does not exist)

    http://127.0.0.1:10000/devstoreaccount1/office-exports/

    The reason for this is of course that the web app is trying to access the server on IP 127.0.0.1 port 10000 and since I am not doing this logged into the server console it will not work (it does work if i am logged in to the console)

    To get this working you need to do these operations:

    1. On the server edit the file C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe.config and change the IP to the correct address (or name)
    2. Edit the file C:\CustomerServiceUnit\DOBind\Packages\Cloud\AosWebApplication\AosWebApplication.csx\roles\AosWeb\approot\web.config and change <add key=”AzureStorage.StorageConnectionString” value=”UseDevelopmentStorage=true” /> to <add key=”AzureStorage.StorageConnectionString” value=”UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://YourLocalIP” />
    3. Open the tcp ports 10000, 10001 and 10002 to the server
    4. Links:
      https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Faxforum.info%2Fforums%2Fshowthread.php%3Fp%3D325949 (with a little help from Google Translate)
  • Workflow issues in “AX 7” Onprem Demo environment

    We have set up the new AX demo environment on our Hyper-V lab environment. Most of the features are running fine but there are some issues which we are trying to fix as they arise. Today my colleague was trying to edit a workflow and got an error. Turns out you need a specific application to edit the workflow and this app is downloaded and installed on the fly when you click the link. The problem here is that the SSL certificate in the AX environment is not trusted, this is not an issue when you use a normal browser since you can ignore the error, but it prohibits my computer from installing the application. Here is how you solve the error:

    NOTE: THIS IS A TEMPORARY SOLUTION, IT IS IMPLEMENTED TO ACCESS A TRUSTED LAB ENVIRONMENT. YOU SHOULD NEVER EVER EVER DO THIS WITH A CERTIFICATE YOU COMPLETELY TRUST!!!!! IF YOU DO THIS WITH THE INCORRECT CERTIFICATE IT MEANS THAR BAD GUYS CAN SPY ON YOUR SECURE TRAFFIC!!!!!

    1. Browse to your AX site, click on the Certificate Error button and select View Certificates

      image

    2. On the windows that appears click Install Certificate and select to install it into your Trusted Root Certificate

      image   image 

      image  image

      image

    3. Restart your browser and log back into your AX environment and verify that there no longer is a certificate warning

    image

     

    Now when you go to edit a Workflow you do not get an error Smile

    image  image

    You just login and the install will start automatically and you can edit the workflow.

    image

     

    NOTE AGAIN: THIS IS A TEMPORARY SOLUTION, IT IS IMPLEMENTED TO ACCESS A TRUSTED LAB ENVIRONMENT. YOU SHOULD NEVER EVER EVER DO THIS WITH A CERTIFICATE YOU COMPLETELY TRUST!!!!! IF YOU DO THIS WITH THE INCORRECT CERTIFICATE IT MEANS THAR BAD GUYS CAN SPY ON YOUR SECURE TRAFFIC!!!!!