Discovery Sample

Corporate administrators can set up the Research feature in Microsoft® Office 2003 to use a discovery Web service to dynamically update appropriate research services on client computers. When a user opens the Research task pane in a supporting Microsoft Office 2003 application or in Microsoft Internet Explorer, the client computer calls the discovery Web service, which then checks the installed research services on the client computer and sends a registration response that lists appropriate new research services, and optionally, adds them to the client computer.

Adapting the sample Discovery research service to your setup

The Research Service Software Development Kit provides a sample Discovery Web service that deploys or updates the Toolkit and Query Viewer research services for a client computer.

Before you run the Discovery research service, specify the URLs of the Toolkit and Query Viewer research services within the RegistrationPath tags in discovery.asmx.cs, based on how you have set up the research services.

For example, if you have installed the Toolkit and the Query Viewer research services on a server named MyServer, the URLs are http://ServerName/ToolsServices/Toolkit/toolkit.asmx and http://ServerName/ToolsServices/QueryViewer/queryviewer.asmx. After you have specified the URLs, build the Discovery service.

For more information about setting up the Toolkit and Query Viewer research services, see Toolkit Sample and Query Viewer Sample.

Building the Discovery research service

Requirements

  • Microsoft® Office 2003
  • Microsoft .NET Framework 1.0 or later
  • Microsoft .NET Framework 1.0 Software Development Kit, or a later release
  • Microsoft Internet Information Services (IIS) 5.0 or later

Note  IIS should be installed before you set up the Microsoft .NET Framework SDK. If you have installed or re-installed IIS after setting up the Microsoft .NET Framework SDK, you will experience unexpected behavior when you try to view ASP.NET pages. To fix this, register ASP.NET with IIS again by running the aspnet_regiis.exe utility. For more information, see Knowledge Base article 306005 , "HOWTO: Repair IIS Mapping After You Remove and Reinstall IIS."

Build the Web service

  1. Do one of the following:

    • If you have installed the Research SDK on the computer that hosts the IIS server ServerName, go to step 2.

    • If you have installed the Research SDK on a computer other than ServerName:

      1. Create a folder Discovery Sample on ServerName.

        Note  To avoid access problems when running the Discovery Web service, do not place the Discovery Sample folder in the My Documents folder.

      2. From the computer that the SDK is installed on, copy the contents of the Discovery Sample folder (under drive:\Program Files\Microsoft Office 2003 Developer Resources\Microsoft Office 2003 Research Service SDK\Samples) to the Discovery Sample folder on ServerName.

  2. Map the Discovery Sample folder to a virtual directory named DiscoveryService on IIS server ServerName.

    1. From the Microsoft Windows® Start menu, click Control Panel , and then double-click Administrative Tools.
    2. Double-click Internet Information Services.
    3. In the Internet Information Services folder tree, expand the folders for the local computer, the Web Sites directory, and the Default Web Site.
    4. Create a new virtual directory DiscoveryService by right-clicking Default Web Site and selecting New and Virtual Directory. Follow the instructions in the Virtual Directory Creation Wizard.
  3. On ServerName, at the Windows command prompt, change to the DiscoveryService\Discovery folder and run the make.bat file. This file will compile and build the Web service. The assembly file discovery.dll will be generated in the DiscoveryService\Bin folder.

    Note  Make.bat uses the Microsoft® Visual C#® .NET command-line compiler, csc.exe, which is available as part of the Microsoft .NET Framework SDK. If necessary, modify make.bat to include a search path for the compiler.

Using the Discovery Web service

Research

Set up the Discovery Web service in the registry

For example, to set up the first Web service to the previously mentioned Discovery Web service, under the optional registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Common\Research\Discovery, specify a value DiscoveryPath1 with the data http://ServerName/DiscoveryService/Discovery/discovery.asmx.

When the user first opens the Research task pane on the client computer, after adding the Discovery registry key and server settings, the Microsoft Office 2003 application calls the Discovery Web service. The Discovery Web service returns a registration response that includes the Toolkit and Query Viewer research services. Optionally, you can modify the Discovery Web service to dynamically check for other research services, and install other research services.

For more information about Discovery Web services, see Configuring Service Discovery.