Step 2: Deploy and Test the Federated Search SQL Server Connector

Applies to: SharePoint Server 2010

After you have created the ASPX page for the Federated Search SQL Server Connector, you must do the following:

  1. Deploy the ASPX page.

  2. Create the federated location for the connector.

  3. Configure the Federated Results Web Part.

  4. Test how results from the AdventureWorksDW database appear in a Federated Results Web Part.

To deploy the ASPX page and verify that data connectivity is working

  1. Create a folder named FederatedConnectorSample in the following path:

    %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\TEMPLATE\LAYOUTS\

  2. Copy the SearchResellers.aspx.cs file and SearchResellers.aspx file to the FederatedConnectorSample folder.

  3. Browse to the path http://YourServerName/_layouts/FederatedConnectorSample/SearchResellers.aspx.

    Notice on the SearchResellers.aspx page, an RSS feed that shows several results from the DimResellers table in the AdventureWorksDW database.

    Note

    You must change the server name that is specified in this URL to match the Web server that you are using.

To create the federated location

  1. On the Search Administration page, click Federated Locations, and then click New Location.

  2. In the Location Name field and Display Name field, type AdvWorksResellers.

  3. In the Description field, type text to describe the location, such as Search DimResellers table in the AdventureWorksDW database.

  4. For the Location type field, click OpenSearch 1.0/1.1.

  5. In the Query Template field, type https://localhost/_layouts/FederatedConnectorSample/searchresellers.aspx?q={searchTerms}.

  6. In the "More Results" Link Template field, type https://localhost/_layouts/FederatedConnectorSample/searchresellers.aspx?q={searchTerms}&f=htm.

  7. In Specify Credentials, select the appropriate authentication protocol. For example, you could select Common: NTLM - Specify a username and password, and then type the credentials for an account that has access to the AdventureWorksDW database.

  8. Click OK.

To configure the Federated Results Web Part

  1. Navigate to the page where you want to display the search results, for example:

    http://ServerName/Pages/results.aspx.

  2. Click Site Actions, and then click Edit Page.

  3. Click Edit for the Federated Results Web Part, and then click Edit Web Part.

  4. In Location Properties, on the Location list, click AdvWorksResellers, and then click OK.

  5. Click Site Actions, and then click Exit Edit Mode to close the Edit page.

To test the Federated Search SQL Server connector

  1. Type a search term in the search box that will return results from the DimResellers table. For example, type bicycle.

  2. Verify that the Federated Search SQL Server Connector is working. You should see search results from the AdventureWorksDW database on the search results page.

See Also

Concepts

Step 1: Create the Project for the Federated Search SQL Server Connector

Code Sample: Federated Search SQL Server Connector

Architecture Guidance for Building Federated Search Connectors