The Email research service integrates a directory search into Microsoft® Office 2003 applications. It enables a search based on e-mail name, first name, last name, or full name.
Adapting the Email research service to your network configuration
This research service uses the Active Directory® directory service on a Microsoft Windows® network. Before you run this sample, you will have to modify the connection string sLDAP in email.asmx.cs to adapt the service to your network, which must support the Lightweight Directory Access Protocol (LDAP). Once you have modified the connection string, you can build the research service.
Building the Email research service
The Research Service SDK provides the email.asmx and email.asmx.cs source files for the Email research service. This section describes how to build the Email research service as a Web service based on these files.
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.”
If you have installed the Research SDK on a computer other than ServerName:
Note To avoid access problems when running the Email Web service, do not place the Email Sample folder in the My Documents folder.
Map the Email Sample folder to a virtual directory named EmailService on the IIS server ServerName.
Note Make.bat uses the Microsoft Visual C#® 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.
The research service uses a client-side smart tag to provide a richer set of features to interact with documents. If the smart tag is not installed, the research service will continue to function normally, with the exception that the smart tag menu items will not be available.
To install the smart tag on a client computer:
If you have installed the Research Service SDK on a computer other than the client computer:
regsvr32 CorpContact.dll
regedit CorpContact.reg
You will be prompted to confirm that you want to add this information into the registry.
Click Yes.Using the Email research service
Before you can search on the Email research service for the first time, you must add the research service to the Research task pane by using the URL http://ServerName/EmailService/Email/email.asmx. For more information about adding a research service, see Adding Services through the Office User Interface.
This section assumes the Email research service uses Active Directory within a Windows network.
Design of the Email research service
The Email research service specifies two Web methods: Query and Registration under the Search namespace. The Web page http://ServerName/EmailService/Email/email.asmx provides a brief description and a hyperlink to the formal definition of each of these methods.
This method searches the Active Directory service of a sample domain for a specified e-mail name, first name, last name, or full name. It returns a query response to the Research task pane, which will display the search results in the specified sort criteria. The query response supports the Microsoft.Search.Response Schema.
To adapt this sample to search other networks that support LDAP, modify the connection string for the constant sLDAP
. You can also modify the fields to be displayed in the search results with the GetSearchResult method.
This method is called when you first add the Email research service to the task pane. At this point, the service sends a registration request. The Registration method always returns a registration response. The registration response supports the Microsoft.Search.Registration.Response Schema.
For more information about the research service schemas, see XML Schemas Overview.