WebView Controls

From SEPT Knowledge Base

Errors:

WebView is unable to connect to the server:

When launching WebView, the background is white and the HMI software shows a yellow exclamation mark as below:

Resolution:

Without SSL:
  1. Close WebView
  2. Open Cogent DataHub properties
  3. Uncheck the Act as a web server checkbox
  4. Change the port to 8085
  5. Uncheck the Use secure sockets (SSL) checkbox
  6. Click Apply
  7. Check the Act as a webserver checkbox
  8. Click OK (This closes the properties window)
  9. Launch WebView again
  10. Click the dropdown button for Advanced settings
  11. Change the port to the port that was entered i.e. 8085
  12. Uncheck the Use HTTPS checkbox
  13. The background should appear alongside a green checkmark as below:

With SSL :
  1. Close WebView
  2. Open Cogent DataHub properties
  3. Uncheck the Act as a web server checkbox
  4. Change the port to 8443
  5. Check the Use secure sockets (SSL) checkbox
  6. Ensure that the SSL Certificate file is:
    C:\Program Files\Cogent\Cogent DataHub\Plugin\WebServer\etc\datahub.pem
    
  7. Click on Apply
  8. Check the Act as a web server checkbox
  9. Click on OK (This will close the properties)
  10. Launch WebView again
  11. Click the dropdown button for Advanced settings
  12. Change the port to the port that was entered i.e. 8443
  13. Check the Use HTTPS checkbox
  14. Check the Accept Untrusted Certificates checkbox
  15. The background should appear alongside a green checkmark as below:

WebView is unable to be launched:

When trying to launch WebView from the Cogent DataHub properties window, error 2 occurs as below:

Resolution:

See the section above on configurations for the web server. This occurs only when the web server is not correctly configured.

WebView is unable to load controls:

There is an error loading WebView HMI software showing the notification below:

Resolution

  1. Click ok on all notifications
  2. Close WebView
  3. Open the Cogent DataHub properties
  4. Set the Document root directory to:
    C:\Program Files\Cogent\Cogent DataHub\plugin\WebServer\html
    
  5. Click OK (This closes Cogent DataHub Properties)
  6. Launch WebView again
  7. Log in using the provided credentials

Successful configuration example:

SSL Disabled configuration
  • Port: 8085
  • SSL: Unchecked
  • Root Directory: C:\Program Files\Cogent\Cogent DataHub\plugin\WebServer\html
  • Error Log: C:\Users\MacID\AppData\Roaming\Cogent DataHub\log\error.log
  • Access Log: C:\Users\MacID\AppData\Roaming\Cogent DataHub\log\access.log
SSL Enabled Configuration:
  • Port: 8443
  • SSL: Checked
  • Root Directory: C:\Program Files\Cogent\Cogent DataHub\plugin\WebServer\html
  • Error Log: C:\Users\MacID\AppData\Roaming\Cogent DataHub\log\error.log
  • Access Log: C:\Users\MacID\AppData\Roaming\Cogent DataHub\log\access.log
  • SSL Certificate File: C:\Program Files\Cogent\Cogent DataHub\Plugin\WebServer\etc\datahub.pem
Note: Replace MacID with your MacID