X Dispatch Server Installation (Server 2016)

The following tutorial will demonstrate the setup of X Dispatch Server on a machine running Windows Server 2016. If you have any questions or are in need of assistance at any time, please visit our ServiceDesk Portal to open a ticket.

All file paths and locations referenced in this article are Default and may vary in your individual environment. This tutorial is also based on the concept that this is being done on a machine connected to a domain environment. 

Terminology

Database ServerA database server is a server that houses a database application that provides database services to other computer programs or to computers.
Application ServerAn application server is a software framework that provides both facilities to create web applications and a server environment to run them.
Web ServerWeb server refers to software or hardware dedicated to running a website and serves it's contents to the World Wide Web. It processes network requests over HTTP & other related protocols.

X Dispatch Install Types

Single Server When you use just one machine for both the database, web, and even potentially remote desktop roles, this is a single server or combination server setup.
Multi Server 

When you are just running one role per machine, this would be a multi server setup.

Example: You have one machine for the database, one machine for web, etc.

This tutorial will be following the single server concept. So when we reference "database server" in the steps, this infers the machine holding all of the roles. Some customers may choose to split these roles onto dedicated servers in a multi-server setup, however, this is a more complex configuration that requires advanced skills. If you would like to go the route of distributing your server's installation, we recommend contacting CXT Support.

Prerequisites

 Minimum Hardware / OS Requirements
  • 2.5 GHz Intel® or AMD x86-x64 (Quad-core processor)
  • 8 GB RAM
  • 100 GB available disk space
  • Microsoft Windows Server 2016
  • Windows Powershell 3.0
  • Microsoft SQL Server 2012 R2
 Important Information About Virtualization

CXT Software recommends using a physical server for X Dispatch database server role, however, it is possible to use a Virtual Machine and requires expert level virtualization skills. If a Virtual Machine is configured, it's important to note that performance failures can occur in the Host Operating System (OS), the Virtualization Layer, and Guest Operating System (OS). To minimize potential performance failures, these areas must be configured properly. 

For specific virtualization instructions please refer to your virtualization technology documentation. 

 Domain Accounts

You will need to create three domain administrator accounts to handle various back-end processes and roles for X Dispatch. 

  1. cxtbll - For running the cxtbll COM+ application.
  2. cxtjobs -For running the App Pools in IIS and X Stream.
  3. cxtsupport - For RDP access and troubleshooting.

Once these accounts are created you can move on to installing roles and features in the last prerequisite below.

 Server Roles & Features

Application Roles Notice

The Application Server role was deprecated in Server 2016, however, all of the individual roles are still available for install. These roles were previously set up in step 4 (configuring middle tier) in 2012r2 tutorials.

It is crucial to ensure all roles and features are installed and properly configured or it could affect the proper installation of X Dispatch Server. Before moving to any other steps, take the time to ensure the below listed roles and features are installed.

Server Roles

  • File and Storage Services
    • Storage Services
  • Web Server
    • Web Server
      • Common HTTP Features
        • Default Document
        • Directory Browsing
        • HTTP Errors
        • Static Content
      • Health and Diagnostics
        • HTTP Logging
      • Performance
        • Static Content
      • Security
        • Request Filtering
      • Application
        • .Net Extensibility 3.5
        • .Net Extensibility 4.6
        • Application Initialization
        • ASP
        • ASP.NET 3.5
        • ASP.NET 4.6
        • ISAPI Extensions
        • ISAPI Filters
        • Server Side Includes
        • WebSocket Protocol
    • FTP Server
      • FTP Service
    • Management Tools
      • IIS Management Console
      • IIS Management Scripts and Tools

Features

  • .Net Framework 3.5 Features
    • .Net Framework 3.5
  • .Net Framework 4.6
    • .NET Framework 4.6
    • ASP.NET 4.6
    • WCF Services
      • TCP Port Sharing
  • Enhanced Storage
  • Windows PowerShell
    • Windows Powershell 5.1
    • Windows Powershell 2.0 Engine
  • WoW64 Support

Database Server Setup & Configuration

 Step 1 - Configuring DEP (Data Execution Prevention)
  1. Right click on the Windows start button
  2. Click on System
  3. In the system window click on Advanced system settings
  4. In the System Properties window click the Advanced tab. 
  5. Under the Advanced tab click the Settings button under Performance. 
  6. In the Performance Options window click the Data Execution Prevention tab. 
  7. Select the Turn on DEP for essential Windows programs and services only then click OK.
  8. Click OK on the popup to restart the server, then close all active windows and restart. 
 Step 2 - Configuring UAC (User Account Control)
  1. Click on the Windows Start button
  2. Start typing "UAC" in the search box.
  3. Click on Change User Account Control settings
  4. Drag slider to lowest Never Notify setting.
  5. Click OK.
  6. Click on the Windows Start button
  7. Start typing "Regedit" in the search box. 
  8. Click on Regedit.
  9. Turn off UAC via registry by changing the DWORD "EnableLUA" from 1 to 0 in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system". 
  10. Restart the server.

 Step 3 - Configuring COM+ (Component Object Model)
The below process must be "Run As Administrator" to avoid issues with the configuration. 
  1. Click on the Windows start button.
  2. Start typing "Administrative Tools" in the search box.
  3. Click on Administrative Tools.
  4. In the Administrative Tools window click on Component Services.
  5. In the Component Services window expand Component Services, then Computer.
  6. Right click on My Computer and select Properties.
  7. In the My Computer Properties window click the Options tab.
  8. Change the Transaction Timeout from 60 to 600. 
  9. Click on the Default Properties tab.
  10. Check the Enable distributed COM on this computer and the Enable COM internet services on this computer options, if not already. 
  11. Click the COM Security tab.
  12. Click on the Edit Limits button located in the Access Permissions section.
  13. Check that the Everyone and ANONYMOUS LOGON users are listed.  If they are not listed, click the Add button and add each user. 
  14. Verify that all the Allow checkboxes are checked for Everyone and ANONYMOUS LOGON users.
  15. Repeat steps 12 - 14 for Edit Limits and Edit Defaults in the Access Permissions and Launch and Activation Permissions sections. 
  16. Click OK.
  17. Click OK in the My Computer Properties window
  18. Click Yes on the DCOM Machine Wide settings window.
  19. In the Component Services window expand My Computer
  20. Expand Distributed Transaction Coordinator
  21. Right click on Local DTC and click Properties
  22. In the Local DTC Properties window click on the Security tab.
  23. Under the Security tab check the following boxes, Network DTC AccessAllow Remote ClientsAllow Remote AdministrationAllow InboundAllow OutboundNo Authentication Required, And Enable XA Transactions
  24. Click OK
  25. Click Yes on the MSDTC Service window.
  26. Click OK to the MSDTC Restart message. 
  27. Close the Component Services window.
 Step 4 - SQL Server Installation & Configuration
You must use "Run As Administrator" to properly install SQL Server 2016 and avoid issues with the configuration. 
  1. Download Microsoft SQL server here. (SQL Server Express is Free to use but is limited to a Database of 10 GB)
  2. Follow Microsoft instructions to register and download Microsoft SQL Server 2008 R2  Express with Mgmt Tools. (64 Bit ENU\x64\SQLEXPRWT_x64_ENU.exe, 32 Bit ENU\x86\SQLEXPRWT_x86_ENU.exe)
  3. Right Click on the downloaded SQL Server installer and click Run as Administrator
  4. In the SQL Server Installation Center window click on New SQL Server stand-alone installation or add feature to an existing installation.
  5. Check the box I accept the license terms and click Next. 
  6. On the Products Updates page check the box to Include SQL Server product updates, then click Next.
  7. On the Feature Selection page check the boxes Database Engine ServicesSQL Server ReplicationManagement Tools - BasicSQL Client Connectivity SDK, then click Next
  8. On the Instance Configuration page select Named Instance and name it "MSSQLSERVER", then click Next.
  9. On the Server Configuration window ensure the SQL Server Database Engine is configured to use the NT AUTHORITY\SYSTEM account.
  10. On the Database Engine Configuration page set Authentication Mode to Mixed in Database Engine Configuration window. 
  11. Set the Password and confirm.
  12. Click ADD and add the 3 users created at the start (cxtbll, cxtjobs, cxtsupport) click Next.
  13. Click Next to start the installation.
  14. Once the installation is complete click Close then Close again.
  15. Click on the Windows start button.
  16. Start typing "SQL Server Configuration Manager" in the search box.
  17. Click on SQL Server Configuration Manager
  18. In the SQL Server Configuration Manager window expand SQL Server Network Configuration so that Protocols for MSSQLSERVER is visible.
  19. Click on Protocols for MSSQLSERVER.
  20. Right click on Shared Memory and select Disable.
  21. Click OK.
  22. Right click on TCP/IP and select Enable.
  23. Click OK
  24. Click on SQL Server Services
  25. Right click on SQL Server Browser and select Properties
  26. Select the Service tab. 
  27. Click Disabled on Start Mode to show options, then select Automatic
  28. Click OK
  29. Right click on SQL Server (MSSQLSERVER).
  30. Click Restart
  31. Right click on SQL Server Browser
  32. Click Start
  33. Close all windows.
 Step 4.5 - Attaching a database

Existing or New?

If you are using an existing database, then start this part with steps 1 & 2. For a new instance, you can skip the first two steps, download the baseline database, and start at step 3.
  1. Create a full backup of both CxtData and CxtArchiveData databases.
  2. Move backup files to a new server if necessary.
  3. Click on the Window start Button.
  4. Start typing "SQL Server Management Studio" in the search box.
  5. Click on SQL Server Management Studio
  6. In the Connect to Server window ensure the Server Type is set to Database Engine.
  7. Enter a period (.) in Server name since the SQL instance has previously been named MSSQLSERVER. 
  8. Under Authentication, you should set it to be Windows Authentication.
  9. Click Connect.
  10. Expand Databases in the tree on the left to view all Databases. Note cxtData and cxtArchiveData are not there.
  11. If you did a backup and are restoring to the new SQL server, right click on Databases and click New Database
  12. In the New Database window enter cxtData as the Database name and click OK.
  13. Repeat steps 11-12 for cxtArchiveData database.
  14. Right click on cxtData and select Tasks > Restore
  15. Select Device then click the ... button.
  16. In the popup, click the Add button, navigate to the location of the backup file, and select the file.
  17. Press OK then OK
  18. Verify that the information is correct and click OK

    Quick Tip

    To attach a baseline, right click on Databases and choose Attach. Follow the on-screen instructions to navigate to the location of the database files, choose the files, and click OK. The file must be in a location that the accounts have read write access to.

 Step 5 - Installing X Dispatch Server
  1. Download the latest version of X Dispatch Server here.
  2. Extract the downloaded file. 
  3. Right click Run as Administrator
  4. Agree to the terms. 
  5. Click Next.
  6. Click Install
  7. Accept the ASP.NET MVC Install. 
  8. Click Finish ASP.NET MVC.
  9. Click the Windows start button.
  10. Start typing in "Services" in the search box.
  11. Click on Services
  12. Scroll down to X Stream.
  13. Double click and open the X Stream service.
  14. Click the Log On tab. 
  15. Change from Local System account to the domain account cxtjobs. 
  16. Click OK.
  17. Click OK on the account has been granted permissions pop up. 
  18. Click OK to the restart Ppp up. 
  19. Right click On X Stream and Click Restart
 Step 5.1 - Updating the database
  1. Click the Windows start button.
  2. Start typing "Powershell" into the search bar.
  3. Right click Powershell and select to Run as Administrator.
  4. In the Powershell window, type the following command and press Enter: set-executionPolicy RemoteSigned
  5. In the Powershell window, type the following command and press Enter: cd "\Program Files (x86)\Connexion"
  6. In the Powershell window, type the following command and press Enter: .\update.ps1
  7. Close Powershell.
  8. In File Explorer, navigate to "C:\Program Files (x86)\Connexion".
  9. Review the Update.txt file. If any errors are listed, enter a support ticket.
 Step 5.5 - CXTBLL Configuration
  1. Click the Windows start button.
  2. Start typing "Component Services" in the search box. 
  3. Click Component Services.
  4. Expand Component ServicesComputersMy ComputerCOM+ Applications.
  5. Right click on cxtbll and click Properties
  6. Click the Identity tab
  7. Click on This User.
  8. Enter the cxtbll account created in Step 1, click OK.
  9. Close Component Services.
  10. Open X Dispatch.

Web Server Setup & Configuration

The Database Setup & Configuration must be completed and have the IIS Role installed.

The web portion of this installation will go through the setup and configuration of all CXT web apps such as Rapidship, X Tracking, and various X Dispatch web modules.


XT Overview

X Tracking allows the plotting of orders, routes, and delivery personnel on a web-based map in real time. This means that delivery personnel can be tracked to their last GPS fix, or if GPS devices are not used, to their last pickup or delivery. Unassigned and assigned orders are shown in addition to route stops that are plotted in sequential order for a true graphical representation of a single or multiple routes. Several reports can be created, such as the Driving Distance report which shows true GPS driving distance the delivery personnel. All of these features add up to an easy and intuitive tool that can be used to more effectively manage the fleet.

 Step 1 - App Pool & Sites Configuration
  1. Click on the Windows start button
  2. Start typing "IIS" in the search box.
  3. Click on Internet Information Services (IIS) Manager
  4. Expand the server in the tree on the left.
  5. Right click on Application Pools, click on Add Application Pool...  
  6. In the Add Application Pool window, set the Name to .NET 2.0 and the .NET CLR Version to .NET CLR Version v2.0.50727
  7. Click OK
  8. Right click on Application Pools, click on Add Application Pool... 
  9. In the Add Application Pool window set the Name to .NET 4.0 and the .NET CLR Version to .NET CLR Version v4.0.30319
  10. Click OK.
  11. Right click on the .NET 2.0 application pool, then click on Advanced Settings...
  12. In the Advanced Settings window click on ... under Identity.
  13. Select Custom account and press the Set... button.  
  14. Enter cxtjobs domain account information for the server, then click OK
  15. In the Advanced Settings window set the Enable 32 Bit Applications to True, then click OK
  16. Repeat steps 11 - 15 for the .NET 4.0 Application Pool.
  17. Unzip X internet. Download here.
  18. Copy the second XInternet folder (there is a XInternet folder inside the XInternet folder) to C:\Inetpub\wwwroot so all the content is in C:\Inetpub\wwwroot\XInternet. These are the web files.
  19. Expand the Sites folder in the tree on the left.
  20. Right click on Sites, then click Add New Site.
  21. Name the new site "XInternet".
  22. Click on the Select... button.
  23. Select .Net 2.0 as Application Pool.
  24. Click OK

    Quick Tip

    • If the "Duplicate..." message appears, press OK to continue.  
    • If the "Default" website exists and is not used, right click on it and select Remove
    • Click on Sites and check the status of XInternet site.  If the status is "Stopped" then click on XInternet and select Start from the right pane.
  25. Set the Physical path to where you saved the web files.
  26. Open a web browser and navigate to 127.0.0.1 to verify the site is running. 
  27. In IIS, click on the Server then click Server Certificates.
  28. Check for existence of current license under Name. If the license doesn't exist, select Create Self-Signed Certificate
  29. Specify a friendly name for certificate and press OK
  30. Select the XInternet website.
  31. Select Bindings.
  32. In the Bindings window set the Type to https.
  33. Set the SSL certificate to the one created.
  34. Click OK.
  35. Close the Bindings window.
  36. Right click on the XInternet site and select Add Application... 
  37. In the Add Application window, name the application "CxtWebService".
  38. Click Select... to set Application Pool to ".Net 4.0". 
  39. Set the Physical Path to "C:\Program Files (x86)\Connexion\XInternet\CxtWebService".
  40. Press OK.  
  41. Right click on XInternet site and select Add Application...
  42. In Add Application window, name the application "XInternetMVC". 
  43. Click Select... to set Application Pool to ".Net 4.0". 
  44. Set the Physical Path to "C:\Program Files (x86)\Connexion\XInternet\v2". 
  45. Click OK
  46. Click on CxtWebService.
  47. Click on Authentication.
  48. Right click on Anonymous Authentication and select Enable
  49. Right click on Anonymous Authentication and select Edit
  50. Select Application Pool Identity and press OK
  51. Verify that the status is enabled.
  52. Repeat steps 48 - 51 for XIntenetMVC.
  53. Click on CXTWebService and open Application Settings
  54. Select Add from pane on right.  
  55. Enter "RemoteServer" as Name and Data Source=127.0.0.1;Initial Catalog=cxtdata;Integrated Security=SSPI into Value field. The IP address (127.0.0.1 is used as this is a single server replace with IP address of Database server for multi server setup..) 
  56. Right click on XInternet site and select Add Application
  57. Enter "ROWS" for Alias.
  58. Select ".Net 2.0" for Application Pool
  59. Set  Physical path to "C:\Program Files(x86)\Connexion\ROWS".
  60. Press OK
  61. Right click on X Internet, and select Add Application
  62. Set Alias to XInternet.
  63. Set Physical Path to "C:\Program Files(x86)\Connexion\XInternet".
  64. Set Application Pool to ".NET 2.0".
  65. Press OK
  66. Change Connect As user to cxtbll. 
  67. Click Test Settings... to verify path and user account are accurate. 
  68. Select the XInternet application and open Application Settings section.
  69. Set the AspAddress value under Application Settings to URL location of ASP site. " / " can be entered if a virtual directory is created under ASP website and ASP website is the default website in IIS.
  70. Select Add under Actions to add a new Application Setting.
  71. Set Name to "RemoteServer" and enter the IP address of X Dispatch Server under Value.
  72. Click OK
  73. Add (for new installations) or modify (for upgrades) the following settings below. 
         - Name: XTrackingWebserviceURL
         - Value: http://127.0.0.1/XInternet/CxtMappingWebService.svc?wsdl
  74. Click OK.
  75. Close IIS.


Firstly, the IIS CORS module needs to be installed:

  1. Download the Web Platform Installer (if it is not installed)

  2. Install the CORS module


Next, the ApplicationHost.config file needs to be updated to include the CORS information.

  1. Find the ApplicationHost.config file. Normally, it can be found under: C:\Windows\System32\inetsrv\config

  2. Under the <system.webServer> tag, add the following:


Save the file and restart IIS.


Remote Desktop Setup & Configuration

The Database Setup & Configuration must be completed and have the IIS Role installed.

Detailed instructions for installing Remote Desktop is beyond the scope of this documentation, however, brief notes are provided below. Remote desktop is a standard remote connectivity platform from Microsoft and your IT team should have the ability to install this Microsoft product.


 Step 1 - RDS Setup
  1. Open Server Manager.
  2. Click on Local server.
  3. Scroll down to Roles and Features
  4. Click the Task dropdown and select Add Roles and Features
  5. If you receive the "Before you begin" page click Next.
  6. Select Role-Based or Feature-based Installation, then click Next
  7. Select the server and click Next.
  8. Check Remote Desktop Services under the Select Server Roles screen, then click Next.
  9. Add required features, then click Next.
  10. Click Install.


If this server is a standalone remote desktop server, then X Dispatch Workstation must be installed.

Installation Troubleshooting Tips & Tricks

When launching X Dispatch, if it gets stuck at X%

  • 32% Cannot connect to Remote Server (Database) or it is blank opens server select utility
  • 35% cxtbll COM+ Application  may not be  configured correctly
  • 36% Fails here may mean SQL is not running
  • 94% Check the DEP settings

Multi-Server Setup - on-premise: X Internet will not log in

Review the Global.asa file located in the c:\inetpub\wwwroot\XInternet directory.

  • RemoteServer - Default "127.0.0.1"    - This should be pointed at the DB Server 
  • XInternetURL - Default "/XInternet/" 
  • XInternetMvcURL - Default "/XInternetMVC/" 

Multi-Server Setup - on-premise: X Mobile will not work

Review the gps.asp file located in the c:\inetpub\wwwroot\XInternet directory.

  • The default should be Application("RemoteSever") but it can be a fixed address pointing at the DB Server
    • ogps.Process(Application("RemoteServer"))
    • ogps.Process("192.168.100.100")