Skip to main content
Participating Frequently
March 4, 2010
Answered

can the "mode" tag in vhost.xml file be edited using getconfig() and setconfig()?

  • March 4, 2010
  • 1 reply
  • 991 views

can the "mode" tag in vhost.xml file be edited using getconfig() and setconfig()?

    This topic has been closed for replies.
    Correct answer SE_0208

    thnks a lot!!!setconfig is working....but we need to retrieve the values of the tag in the vhost.xml file..say for example...we need to retrieve the value of mode tag initially as local or remote...and only after tht we need to change it if needed...so can you help with the code to retrieve tag values using getConfig() or getconfig2()?


    Use exact same code which I had given before, just replace :

    admin_nc.call("setConfig2",new Result1(),"Proxy/Mode","remote","Adaptor:_defaultRoot_/VHost:_defaultVHost_");

    by

    admin_nc.call("getConfig2",new Result1(),"Proxy/Mode","Adaptor:_defaultRoot_/VHost:_defaultVHost_");.

    Redefine Result1() as:

    function Result1() {

          this.onResult = function(info) {

              if (info.code == "NetConnection.Call.Success" ) {

                   for(i in info.data){

                        trace(info.data); 

                     }

              }

         }

    }

    1 reply

    Participating Frequently
    March 4, 2010

    Yes you can , please use getConfig2() and setConfig2() instead as one's you mentioned are now deprecated.

    vavoottyAuthor
    Participating Frequently
    March 4, 2010

    is it possible to edit the vhost.xml file of a remote system..say an edge server's vhost.xml file directly from the origin server?

    Participating Frequently
    March 4, 2010

    Should be , you just need to have Admin Server running on that edge server so that it can listen to commands issued from you Origin Server.