SetWebConfig

Configures the Web settings for the current project. The settings configured in the function are updated on the HTML files of the project.

Function Group Execution Windows Embedded Thin Client
SetWebConfig System Info Synchronous Supported Supported Executed on Server

Syntax

SetWebConfig( strServerIP, optStrBackupURL, optStrPathFile, optNumHostPort, optStrSecondaryServerIP, optNumProtocolFlag, optNumGtwPort, optStrGtwIP, optStrSecondaryGtwIP, optStrISSymbolURL )
strServerIP
Data Server IP Address. IP address (or hostname) of the computer where the TCP Server module of IWS is running.
optStrBackupURL
Optional alternative URL for the project's Web pages. The Thin Client will look for the Web pages in this URL if it does not find them in the same URL written in the Address field of the Web browser.
optStrPathFile
Optional file path and name of the HTML file to be updated. If you specify only the file path without a file name, then all of the HTML files in the specified file path will be updated.
Note: You can specify an individual file (e.g., you only want to update one file. This is especially useful for projects running on Windows Embedded target systems.
optNumHostPort
Optional TCP Port number that the Thin Client must use to exchange data with the TCP Server module of IWS.
optStrSecondaryServerIP
Optional alternative data server IP address. The Thin Client will attempt to connect to the TCP Server module of IWS in this IP Address if it is not able to connect to the TCP Server module running in the IP Address specified in the strServerIP parameter.
optNumProtocolFlag
Optional When you use the Web Tunneling Gateway option, this parameter specifies whether the Thin Client will use either HTTP to exchange data with the Web Server or HTTPS (SSL – Secure Socket Layer). If this flag has the value 0, the Thin Client will use HTTP. If this flag has the value 1, the Thin Client will use HTTPS (SSL).
optNumGtwPort
Optional TCP Port number that the Thin Client must use to exchange data with the Web Server when using the Web Tunneling Gateway.
optStrGtwIP
Optional IP Address (or hostname) of the computer where the Web Tunneling Gateway is running.
optStrSecondaryGtwIP
Optional Alternative IP Address (or hostname) of the computer where the Web Tunneling Gateway is running. The Thin Client will attempt to connect to the Web Tunneling Gateway in this IP Address if it is not able to connect to the Web Tunneling Gateway running in the IP Address specified in the optStrGtwIP parameter.
optStrISSymbolURL
Optional URL from where the updated version of ISSymbol (ActiveX control) must be downloaded if it is not properly registered in the Thin Client station.
Note:
  • You can use tags or expressions as arguments of this function. Therefore, you can use this function to configure the web settings automatically during runtime, according to the network settings of each project (IP address, Web Server URL, and so forth).
  • Only the first parameter of this function (strServerIP) is mandatory. All other parameters are optional. The parameters that are not configured in the function assume the default value configured in the Web tab of Project Settings.
  • The following parameters should be omitted unless you intend to use the Web Tunneling Gateway: optNumProtocolFlag, optNumGtwPort, optStrGtwIP, optStrSecondaryGtwIP, and optStrISSymbolURL.

Returned value

Error Description
0 No error
1 Invalid number of parameters
2 Invalid Server IP address 1
3 Invalid URL
4 Invalid optional path
5 No Web pages found

Examples

Tag Name Expression
Tag SetWebConfig( "192.168.1.28" )
Tag SetWebConfig( "192.168.1.28", "http://192.168.1.28/" )
Tag SetWebConfig( GetComputerIP(), "http://" + GetComputerIP() + "/" )
Tag SetWebConfig( "192.168.1.28", "http://192.168.1.28/", "C:\MyWebPages\" )
Tag SetWebConfig( "192.168.1.28", "http://192.168.1.28/", "C:\MyWebPages\", 1234 )
Tag SetWebConfig( "192.168.1.28", "http://200.0.0.10/", "C:\MyWebPages\", 1234, "192.168.1.29", 0, 80, "200.0.0.1", "200.0.0.10", "http://200.0.0.10/MyISSymbol/" )