Solutions
Markets
References
Services
Company
How to connect the NAV iPad App to your NAV Container using a self-signed certificate

How to connect the NAV iPad App to your NAV Container using a self-signed certificate

29. November 2017

How to connect the NAV iPad App to your NAV Container using a self-signed certificate

As you probably know there is a very nice NAV App for iOS (and Android). For very good reasons this App however only connects to NAV WebClients secured by https. This is no problem using a NAV Container as it will by default also serve an https-secured WebClient. However if you don’t use an official certificate and instead just let the Container create a self-signed one, you will still get a connection error by the App. This is also true if you use a “traditional” install of the WebClient outside of a Container with a self-signed certificate1.

The problem is easily solved with the following steps. There are a number of blog posts about it including this one by Microsoft and this non-NAV related one by Vincent Lynch but I didn’t find a simple step by step explanation and as I today had to find out how it works, I decided to share it.

  1. Run your Container, e.g.
    docker run -e accept_eula=Y --name ipadtest --hostname ipadtest.global.fum --network MyTransparentNetwork microsoft/dynamics-nav:2017-cu12-de

    As you can see, I am using a fully qualified hostname and a transparent network to make the connection easier, but depending on your situation, you might have different needs

  2. Wait until “Ready for connections!” appears. You should see a log similar to this:
    Initializing...
    Starting Container
    Hostname is ipadtest.global.fum
    PublicDnsName is ipadtest.global.fum
    Using NavUserPassword Authentication
    Starting Local SQL Server
    Starting Internet Information Server
    Creating Self Signed Certificate
    Self Signed Certificate Thumbprint 891BC16763888D9823B9478AEA87B011821D16CD
    Modifying NAV Service Tier Config File with Instance Specific Settings
    Starting NAV Service Tier
    Creating Web Site
    Creating NAV Web Server Instance
    Creating http download site
    Creating Windows user
    Enabling SA
    Creating NAV user
    Container IP Address: 10.111.95.12
    Container Hostname  : ipadtest.global.fum
    Container Dns Name  : ipadtest.global.fum
    Web Client          : https://ipadtest.global.fum/NAV/WebClient/
    NAV Admin Username  : admin
    NAV Admin Password  : Jota1878
    
    Files:
    http://ipadtest.global.fum:8080/certificate.cer
    
    Initialization took 83 seconds
    Ready for connections!
  3. Use Safari on your iPad to connect to the URL of the certificate, which you can find almost at the end of the log file, in my case
    http://ipadtest.global.fum:8080/certificate.cer
  4. This will start the so called profile import of iOS. You will need to go through that wizard and install the certificate
  5. Since iOS 10.3 you also need to trust that certificate explicitly as described in Vincent’s blog post and I am quoting it here:
    1. Open Settings.
    2. Navigate to General and then About.
    3. Select Certificate Trust Settings.
    4. Find your certificate and enable trust with the toggle on the right
  6. Now open the NAV App and enter the WebClient URL without the “WebClient” part, in my case
    https://ipadtest.global.fum/NAV/
  7. Enter username and password as you also find in the log and you should be connected!
  1. but who would run NAV outside a Container :)