This method can be used to reload COM Servers from within your Web Connection application code. The most common scneario for this feature is to refresh configuration file settings.
This method calls the Web Connection Server Release URL which forces servers to shut down and restart and re-reread their startup configuration file settings.
- Must be operating in COM mode
- Server.cCOMReleaseUrl must be set properly and point at the appropriate Release URL
- You are responsible for providing username and password if security is enabled
This operation fires an asynchronous HTTP request against the ComReleaseUrl. The asynchronous call makes it possible to return a server response from a request that fires it.
Note Username and Password are likely required and your application will have to provide this info somehow in order to allow access to this administrative URL. Some ways to do this is either to store the information somewhere and read it in at runtime, or prompt the user for it as part of the operation that triggers the restart.
Username required to access the Release Url.
Password required to access the Release Url.
Optional - the URL to the COM ReleaseUrl. If not provided Server.cComReleaseUrl is used - make sure this value is set correctly in YourApp.Ini or in Server.SetServerEnvironment.
*** Example of Process method that updates the Server Config file FUNCTION UpdateConfig IF !Request.IsPostBack() *** Page that displays Config editing Response.ExandTemplate(Response.GetPhysicalPath()) RETURN ENDIF *** Update Configuration Settings *** Do whatever you need to modify config settings. Request.FormVarsToObject(Server.oConfig.oMyApp,"txt") *** Save the Configuration settings back to the INI file Server.oConfig.Save() *** Reload COM Servers causing re-reading of INI settings IF Server.ReloadComServers("rstrahl",GetSystemPassword(),Server.cComReleaseUrl) this.StandardPage("Submitted servers for reloading.") ELSE this.StandardPage("Couldn't reload servers.") ENDIF ENDFUNC
See also:Class wwServerConfig
Comment or report problem with topic