Monday, 21 September 2015

Dynamics AX Async Server Installation and configuration

Hi Folks,

Before we start with our new assignment of installation and configuration of of Async Server.  We need to keep few things into consideration which are as follows:

1. Set-ExecutionPolicy : The Set-ExecutionPolicy cmdlet enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer. Windows PowerShell has four different execution policies:
  • Restricted - No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned - Only scripts signed by a trusted publisher can be run.
  • RemoteSigned - Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted - No restrictions; all Windows PowerShell scripts can be run.
Command for Setting : Set-ExecutionPolicy Unrestricted

2. Check IIS is installed and in working Condition.
3. Check you are using Service Account for the installation of Async Server
5. Create a Self signed certificate of enterprise certificate in server where you are installing Async Server.

Now start with installation Part

Install the Async Server From Dynamics AX 2012 R3 Media

  1. Start Microsoft Dynamics AX Setup. Under Install, select Microsoft Dynamics AX components.
  2. Advance through the first wizard pages.
  3. If the Setup Support files have not yet been installed on this computer, the Select a file location page is displayed. The Setup Support files are required for installation. Provide a file location or accept the default location, and then click Next. On the Ready to install page, click Install.
  4. On the Select an installation option page, click Microsoft Dynamics AX.
  5. On the Select installation type page, click Custom installation, and then click Next.
  6. On the Select components page, select Async Server, and then click Next.
  7. On the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors, see Check prerequisites. When no errors remain, click Next.
  8. On the Configure Async Server page, select the check box to configure Async Server by using Setup. If you clear this check box, the application files are installed, but Async Server is not configured.
    If you’re configuring Async Server, enter the following information:
    • Application name – The name of the web application that hosts Async Server.
    • App pool name – The name of the application pool that the web application runs under.
      We recommend that you specify separate application pools if multiple Retail components are installed on the same computer. Multiple web applications can share an application pool if resources on the computer are limited. However, if the shared application pool fails, all of the applications that use it will stop responding. In addition, if one application is heavily used, it can negatively affect the performance of the other applications in the pool.
    • Website name – The name of the website that Async Server runs on.
    • User name and Password– The credentials for the application pool identity.
    • HTTPS port – The port on which Async Server receives HTTPS requests. You can specify any available port. Verify that the port is open in Windows Firewall, and record the port number. The port is used to create the URL for Async Server in the following format: https://<server name>:port/<web application name>. This URL is required when you configure instances of Async Client that connect to this instance of Async Server.
    • TCP port (optional) – The port on which Async Server receives TCP requests. Specify a TCP port if your environment uses high-performance data synchronization. You can specify any available port. Verify that the port is open in Windows Firewall.
    • AOS service user – The user account that the instance of Microsoft Dynamics AX Application Object Server (AOS) runs as.
    • SSL certificate thumbprint – The thumbprint for the Secure Sockets Layer (SSL) encryption certificate. You must obtain a valid, registered certificate from a provider.
  9. On the Select a database to use with Async Server page, create a new message database for Async Server. If you install a subsequent instance of Async Server for load balancing, you must select the same message database.
  10. On the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors, see Check prerequisites. When no errors remain, click Next.
  11. On the Ready to install page, click Install.
  12. After the installation is completed, click Finish to close the wizard.
If you don't want to configure the Async Server at the time of installation then you can do it manully through PowerShell
  1. Open the folder where the Windows PowerShell scripts are installed. By default, the files are located at C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Async Server\Tools.
  2. Create a copy of the ss-settings.xml file for each instance of Async Server that you plan to deploy. We recommend that you not change the original file.
  3. Open your copy of the ss-settings.xml file in a text editor, such as Notepad. Change the parameter in the XML File.
  4. Save the changes.
  5. Open Powershell in the Administrator mode.
  6. Enter the command:  $Cred = @((New-Object System.Management.Automation.PSCredential('domain\user', (ConvertTo-SecureString 'password' -AsPlainText -Force))))
  7. Enter the edited  configuration Command :  .\DeployAsyncServer.ps1 -TopologyXmlFilePath $topologyFileName -SettingsXmlFilePath $updatedSettingsFileName -Credentials $Cred                                                                     such as Example:
    .\DeployAsyncServer.ps1 -SettingsXmlFilePath “C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Async Server\Tools\ss-settings.xml” -TopologyXmlFilePath “C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Async Server\Tools\ss-topology.xml” -Credentials $Cred –Verbose $true
After you configure check the services through open the url which is generated at the IIS in my case lets say 
https://nishant:8105/nishantAsync/Uploadservice.svc
format:
Https://Servername:PortNumber/AsyncInstanceName/UploadService.Svc

if the page is without error that means you are done.

Happy Daxing !!!!!




How to get the list of Fields From SQL Table

SELECT
    c.name 'Column Name',
    t.Name 'Data type',
    c.max_length 'Max Length',
    c.precision ,
    c.scale ,
    c.is_nullable,
    ISNULL(i.is_primary_key, 0) 'Primary Key'
FROM  
    sys.columns c
INNER JOIN
    sys.types t ON c.user_type_id = t.user_type_id
LEFT OUTER JOIN
    sys.index_columns ic ON ic.object_id = c.object_id AND ic.column_id = c.column_id
LEFT OUTER JOIN
    sys.indexes i ON ic.object_id = i.object_id AND ic.index_id = i.index_id
WHERE
    c.object_id = OBJECT_ID('XXXX TableName')