Manager.GetCurrentConfig
Manager.GetCurrentConfig
The GetCurrentConfig method returns the contents of a registry key under the registry hive HKLM\SW\Microsoft\Passport.
Syntax
Function Manager.GetCurrentConfig(name) As Variant
Parameters
- name
String value representing the key name (attribute) of the configuration value to be retrieved. The parameter specifies the name of the key as seen in the registry.
Return values
The GetCurrentConfig method returns an object containing the value of the requested Microsoft .NET Passport configuration information.
Example
The following code snippet retrieves and displays three attributes of the configuration: the Site ID, the installation directory, and the language ID.
... Dim oMgr Set oMgr = Server.CreateObject("Passport.Manager") Response.Write (oMgr.Profile("firstName") & ": You are authenticated.") 'Using GetCurrentConfig, get the SiteID, the 'Installation Directory and the LanguageID. Response.Write ("<br>Server SiteId = " & oMgr.GetCurrentConfig("SiteID")) Response.Write ("<br>Server InstallDir = " & oMgr.GetCurrentConfig("InstallDir")) Response.Write ("<br>Server LanguageID = " & oMgr.GetCurrentConfig("LanguageID")) ...
Remarks
Use the GetCurrentConfig method to determine a particular request's matching Site ID on the basis of host-name determination. Some of the returned values are available from the Passport Manager Administration utility at the server's site.
An attempt to read an attribute will first result in a check for the requested attribute names in the .NET Passport registry that is kept on the server. If found, the named attribute is fetched and a value is returned. Requesting a name that does not exist will give a run-time error.
See Also