Skip to main content

i4scada Knowledge Base

Setting up a Remote server after publishing


Open this article and follow the provided steps to learn how to set up a Remote server after publishing the i4scada App Template project.

  1. Navigate to the folder where the i4scada App is hosted on the IIS. A common location is C:\inetpub\wwwroot\YourAppName.

  2. Open the index.html in a text editor of your choice, using administrative privileges.

    If the application folder is on a protected drive, such as the Windows system drive, the text editor must be opened as Administrator in order to be able to save any edits.

  3. Search for the //var remoteIISServer = "localhost"; line. It is located near the top of the body HTML tag, inside a script tag.

        <div id="applicationHost">
            {% autoescape false %}{{ splashContents }}{% endautoescape %}
        <script type="text/javascript" src="Scripts/vendor1.bundle.js?v={{appVersion}}"></script>
        <script type="text/javascript" src="Scripts/vendor2.bundle.js?v={{appVersion}}"></script>
        <script type="text/javascript" src="Scripts/vendor3.bundle.js?v={{appVersion}}"></script>
    	<script type="text/javascript">
            var urlPath = window.document.location.href;
            var remoteIISServer = window.document.location.hostname;
    	 //var remoteIISServer = "localhost"; 
  4. By default, the remoteIISServer variable is set to the local machine, assuming that the same machine running the application is also running the web services. To point the remoteIISServer variable to a remote server running the web services, un-comment the commented line and replace its default value with the name/IP of the remote server. Then comment the line above it, pointing to the default hostname.

    <script type="text/javascript">
            var urlPath = window.document.location.href;
            //var remoteIISServer = window.document.location.hostname;
    	 var remoteIISServer = "YourRemoteServerNameOrIP";
  5. Save the modified index.html and open/reload the application in the web browser. The application will now use the web services hosted on the specified remote server.