Hostname Property

Hostname Property

Gets and sets a URL from which Microsoft Speech Server (MSS) is allowed to fetch resources.

obj.Hostname = string

Part

Description

obj

An instance of the TrustedSites class.

string

A string that specifies a URL (with no path or query string) for a site containing a speech application and related resources. A URL specifying HTTP as the protocol may also be accepted by a site that requires the HTTPS protocol; however, the reverse is not true.

Qualifier

Qualifier

Description

Key

A string that uniquely identifies an instance of the TrustedSite class.

Remarks

This property is exposed in the MSS Management Console snap-in.

Each instance of the TrustedSite class lists only a single hostname, and for each MSS installation there are as many instances of the class as there are Trusted Site URLs. By default, the list of Trusted Sites includes https://localhost.

Windows Management Instrumentation (WMI) Script Example

myComputer = "localhost"

' Use a Locator object to connect to WMI.
Set locator = CreateObject("WbemScripting.SWbemLocator")
Set namespace = locator.ConnectServer(myComputer, "root/MSS")

' Create a new instance of the TrustedSite class.
Set objTrustedSiteClass = namespace.Get("TrustedSite")
Set trustedSite = objTrustedSiteClass.SpawnInstance_

newURL = "https://www.microsoft.com/"

' Set the Hostname property of this instance.
trustedSite.Hostname = newURL

' Update the class instance in WMI.
trustedSite.Put_

Member Of

TrustedSite class