Web
Summary
This page details the steps to publish an application to the web. It will also explain how to change the port number, some possible errors the user might face and how to solve them.
Web server is a software that accepts client requests to deliver a web page. A web server must be configured in order for ADISRA SmartView to display an application on the web. It can be any web server, but in this document we will use Microsoft Windows solution called Internet Information Services (IIS).
Installing Internet Information Services (IIS)
To install the IIS, follow the steps below:
Open the Control Panel and click on “Programs”:
Click on “Turn Windows features on or off”:
Enable the option “Internet Information Services” and click “OK”:
To confirm the IIS was installed correctly, type “localhost” in the browser’s address bar and press enter; if the IIS was installed correctly this page will be displayed:
If the IIS was not installed correctly, this page will be displayed:
Configure Web Folder
Follow the steps below to configure the folder where the HTML files will be saved:
In the ADISRA SmartView settings ribbon, go to “Web” and select the “Default Web Folder” button, please make a note of the path because we will use it later.
It is possible to change this path if another folder is preferred. To select another folder, click the “…” button located on the left side within the WebPath box. Choose the folder where the HTML files are to be saved.
The “Web” folder can also be created inside the IIS web server folder. In our example, we will save the web files directly to the IIS wwwroot folder. Please select the wwwroot path as shown in the image below and create the following folder structure (i.e. WebProject\Web). “C:\inetpub\wwwroot\WebProject\Web”. If doing so, please skip the third chapter:
Generate HTML files
To generate the HTML files, right click the Graphics node in the ADISRA SmartView Navigation tree and left click the “Save HTML” option.
Other methods can be used, as shown below, to generate the HTML files:
Method 2 – Generate HTML files for all opened Graphics Documents.
It is important to understand that if the startup graphic (“Settings” -> “Graphics” -> “Startup Graphic”) is not opened, it will not generate the index (or HTML) file:
Method 3 – Generate HTML file for a specific Graphic Document:
Configuring the Web Project Folder
Follow the steps below to Configure the Web Project folder:
Using the file explorer, go to the project folder and copy the “Web” folder, then go to “C:\inetpub\wwwroot” and create a new folder called “WebProject”. Inside the “WebProject” folder, paste the “Web” folder.
Configuring IIS and the Web Project
Press “Windows+R”, type “inetmgr”, and press OK to open the IIS:
On the IIS Manager, make sure the service is started by selecting “Default Web Site” and check if it has started, if not, click the start button:
On the IIS Manager, select the created WebProject folder, then select “Directory Browsing”, and click on “Open Feature”:
Enable the feature and close the IIS:
In the browser type the address “localhost/WebProject/Web”. If the project has a startup graphic configured, it will be the index page and will open as shown in the image below:
If the project does not have a startup graphic configured, it will open the directory in order for a file to be chosen and opened, as shown in the image below. We will open Graphics1.html in this example:
The runtime must be executing in order for the web pages to run, the runtime must be executing, otherwise it will appear like this:
Note: A page can also be accessed by typing the complete URL: “http://localhost/WebProject/Web/Graphics1.html”
The web counts as client/viewer. If the application has reached its clients limit when trying to access the web page from another machine, the page shown in the image below will appear:
Change Default Port
Follow the steps below to change the default port:
Press “Windows+R”, type “inetmgr”, and press OK to open the IIS. Select “Default Web Site” and click on “Bindings…”:
Select the item to edit and click the “Edit…” button:
Type the new port to be used and press OK:
Restart the Default Web Site on the IIS:
In ADISRA SmartView settings ribbon, go to “Web” and type in the new port. The change will take effect when starting the next the RunTime:
Check Ports Being Used
Press “Windows+R”, type “cmd”, and press OK to open the Command Prompt:
In the Command Prompt, type ”netstat -an” in order to see the ports that are being used:
Possible Errors
In this section, we will show how to resolve some errors that may occur:
Runtime Not Started
When trying to access the web page, the message shown in the image below appears:
To resolve this error, restart the project’s Runtime.
Port Already Being Used
When trying to start the web server, a message appears stating the configured port is already in use, or in the case of IIS, the message shown below appears:
First, check if the configured port is being used by opening the Command prompt and typing “ netstat -aon | findstr port_number ”. Instead of “port number”, type the configured port to be checked. If the port is being used; the result will display as shown in the example below:
The number in the last column, in this example, “25360” is the process ID. In order to find which process this ID belongs to, open the task manager. In the “Details” tab, search for the ID number under the “PID” column, as shown in the example below:
Either end the task that is using the port or configure a new port number.