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:
- Close WebView
- Open Cogent DataHub properties
- Uncheck the Act as a web server checkbox
- Change the port to 8085
- Uncheck the Use secure sockets (SSL) checkbox
- Click Apply
- Check the Act as a webserver checkbox
- Click OK (This closes the properties window)
- Launch WebView again
- Click the dropdown button for Advanced settings
- Change the port to the port that was entered i.e. 8085
- Uncheck the Use HTTPS checkbox
- The background should appear alongside a green checkmark as below:
With SSL :
- Close WebView
- Open Cogent DataHub properties
- Uncheck the Act as a web server checkbox
- Change the port to 8443
- Check the Use secure sockets (SSL) checkbox
- Ensure that the SSL Certificate file is:
C:\Program Files\Cogent\Cogent DataHub\Plugin\WebServer\etc\datahub.pem
- Click on Apply
- Check the Act as a web server checkbox
- Click on OK (This will close the properties)
- Launch WebView again
- Click the dropdown button for Advanced settings
- Change the port to the port that was entered i.e. 8443
- Check the Use HTTPS checkbox
- Check the Accept Untrusted Certificates checkbox
- 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
- Click ok on all notifications
- Close WebView
- Open the Cogent DataHub properties
- Set the Document root directory to:
C:\Program Files\Cogent\Cogent DataHub\plugin\WebServer\html
- Click OK (This closes Cogent DataHub Properties)
- Launch WebView again
- 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