Registration(String) Method

The Registration method of the Query Service Web service returns the name of a portal site.

Parameters

registrationXml A string that contains the registration request.

Return Value

A string that contains the registration response.

If you like to know more about the XML schema of the Query Service or about developing for the Research pane, check out the following articles and the Microsoft Office Research Service Software Development Kit:

Remarks

The registration request contains a single element, the RegistrationRequest element.

Example

The following code example shows the XML for the registration request and how to execute the registration method for the portal site specified by server_name.

[C#]

private void Page_Load(object sender, System.EventArgs e)
{       
    queryService = new QueryService();
}

...

public void Register
{
    string registrationString = "<RegistrationRequest revision=\"1\" xmlns=\"urn:Microsoft.Search.Registration.Request\" action=\"NEW\"/>";

    // Set Url for Web service to query
    try
    {
        queryService.Url="http://<iterm>server_name</iterm>/_vti_bin/search.asmx";
    }

    catch (Exception e)
    {
        // Handle exception
    }

    // set authentication
    NetworkCredential Credential = CredentialCache.DefaultCredentials.GetCredential(new Uri(queryService.Url), "NTLM");
    queryService.Credentials = Credential;

    // Register with Web service
    string result = null;

    try
    {
        result = queryService.Registration(registrationString);
    }

    catch (Exception exp)
    {
        // Handle exception
    }
}   

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://server_name/_vti_bin/search.asmx

Security: Code Access Security