Share via


Reading Groove Data Bridge Registry Keys

The following examples show you calls to make to get registry keys when you are running Groove Data Bridge. You are responsible for guaranteeing that Groove Data Bridge is actually running. Getting the Groove request key and port number on the Groove Data Bridge is similar to getting them on a Groove system but has the following differences:

  • The keys are stored in a different location in the registry.

  • The Groove Data Bridge supports remote Groove Web Service calls. Remote client applications using services on the Groove Data Bridge cannot read the Groove request key or port number from their local registry. The Groove Data Bridge system administrator sets the remote request key and should provide the key or a mechanism to access the key to the developer. The administrator sets the remote key using the Groove Data Bridge administrator interface. See the Office Groove Data Bridge 2007 Administrator's Guide for more information.

Warning

For security purposes, you should read in these values every time you need them.

You must determine on your own whether or not you are using remote access. If you are, you must use supply your own information regarding what request key to use, what port number to use, and the HTTP address of the host server.

Getting the Groove Keys from the Registry

The registry keys are stored in the LocalMachine registry hive. The following code reads the registry keys:

// define strings for keys
string requestKey = "";
string responseKey = "";
string httpPort = "";
int groovePID = 0;

// Get request key and response key
grooveWebServicesRegKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(
  "Software\\Microsoft\\Office Server\\12.0\\Groove\\WebServices");

if (grooveWebServicesRegKey != null)
{
  Object regValue = grooveWebServicesRegKey.GetValue("LocalRequestKey");
  if (regValue != null) requestKey = regValue.ToString();
  regValue = grooveWebServicesRegKey.GetValue("LocalResponseKey");
  if (regValue != null) responseKey = regValue.ToString();

  Microsoft.Win32.RegistryKey grooveWebServicesHTTPortRegKey =
    Microsoft.Win32.Registry.LocalMachine.OpenSubKey(
    "Software\\Microsoft\\Office Server\\12.0\\Groove");

  if (grooveWebServicesHTTPortRegKey != null)
  {

    regValue =    
      grooveWebServicesHTTPortRegKey.GetValue("GrooveLocalHTTPPort");

    if (regValue != null) httpPort = regValue.ToString();

    regValue = 
      grooveWebServicesHTTPortRegKey.GetValue("GrooveLocalHTTPServerPID");

    if (regValue != null) groovePID = regValue.ToString();
  }
}
if (requestKey == "")
{
  // Groove Data Bridge is not running, handle error
}

See Also

Reference

Groove Web Services Registry Keys

Concepts

Reading Groove Registry Keys
Security in Groove Web Services