User Guide
26 Server Management ActionScript Language Reference
Returns
If the call succeeds, the server sends a reply information object with a level property of
status, a code property of NetConnection.Call.Success, and a data property that is an
XML string for the specified tag.
If the call fails (that is, if the specified configuration key isn’t found), the server returns an
empty string.
Description
This API has been deprecated; use getConfig2() instead. Gets information for the specified
configuration key in a specified configuration file. Flash Media Server has four configuration
files: Server.xml, Adaptor.xml, Vhost.xml, and Application.xml.
Virtual host administrators can view configuration keys in the Vhost.xml file and
Application.xml files for their own virtual hosts.
You must be a server administrator to view most of the configuration keys for the Server.xml
and Adaptor.xml files.
For a description of the XML configuration files, see Managing Flash Media Server.
Examples
The following examples show how to get configuration keys in each of the four XML files:
// Establish connection to server.
nc = newNetConnection();
nc.connect("rtmp://localhost:1111/admin", "JLee", "xm1472dy");
// For a virtual host administrator, find key in Server.xml.
key = "Admin/Server/UserList/User:JLee/Password";
nc.call("getConfig", new onGetConfig(), key, "/");
// For a server administrator; find key in Server.xml.
key = "Server/LicenseInfo";
nc.call("getConfig", new onGetConfig(), key, "/");
// Find key in Adaptor.xml.
key = "Adaptor:_defaultRoot_/HostPortList/HostPort";
nc.call("getConfig", new onGetConfig(), key, "/");
TIP
It is possible to have more than one XML tag with the same name at the same level in the
XML tree. In the configuration file, you should distinguish such tags by using a name
attribute in the XML tag (for example, if you have more than one
VirtualHost tag:
<VirtualHost name="www.redpin.com"></VirtualHost>). When you call the getConfig
command and specify the configuration subkeys, you can indicate which tag you want
by specifying the tag name, followed by a colon and the correct
name attribute, for
example,
Admin/Adaptor:_defaultRoot_/VirtualHost:www.redpin.com.