Creating a Content Source and More for Searching MCMS with SharePoint - Search Rights for the MCMS Application Pool Account
(Page 2 of 4 )
SharePoint portals typically do not allow anonymous users to access the site, and users must log in. The SearchResultControl included with the MCMS Connector, which we'll use in a moment, uses the account of the application pool identity that contains the MCMS site from which a search query is triggered to access the SharePoint search service.
- Browse to the portal we created earlier by opening Internet Explorer and navigating to http://portal.tropicalgreen.net. Then, click Site Settings in the upper right corner.
- Under the General Settings section, select Manage security and additional settings.
- On the Manage Site Groups page, click Add a Site Group. When prompted to enter information about the new group, enter the following values:
Property | Value |
Site group name | Search Only |
Description | This site group grants a user the right to query the search index |
Rights | Search Search the portal site and all related content |
When you select Search Search the portal site and all related content, SharePoint automatically checks the View Pages View pages in an area option. Uncheck the View Pages option after you check the Search option.
On the Manage Site Groups page, click Search Only, the name of our new group.
- On the Members of "Search Only" page, click Add Members. Add the account that's configured as the identity of the application pool your MCMS site runs under. Once you've selected the account, click OK.
To find the identity of the application pool your MCMS site runs under, open Internet
Information Services. Expand the nodes for local computer | Application Pools. Look for the application pool that your MCMS site is configured to use and view its properties.
The identity is listed under the Identity tab.
- After selecting the account, on the Add User page, ensure that Search Only under the Step 2: Choose Site Groups section is checked and click OK.
- On the last page, where SharePoint asks you to confirm the details of the account you're adding, make sure the Send the following e-mail to let these users know they have been added option is unchecked, and click Finish.
Our MCMS site now has the permissions needed to log in to our portal and execute a search.
Adding a Search Page to the MCMS Site
We have two options available to implement a search capability for our Tropical Green site:
- Leverage the ASP.NET Server Controls included in the MCMS Connector for SharePoint Technologies that allow search queries to be executed.
- Create our own solution.
The MCMS Connector includes the following three controls that assist you in implementing search functionality for an MCMS site by leveraging SharePoint search scopes:
- SearchResultControl: Takes search criteria entered in the SearchInputControl, executes the search against the SPS search Web Service, and displays the results in list form.
- SearchMetaTagGenerator: Creates HTML META tags based on the PropertyType setting. META tags generated can include standard page properties as well as custom properties.
You can use these three controls on the same page or separate pages. This is very convenient as you may wish to include a small search keyword input box on all pages in your site that submits the search to a separate results page, but you might want to provide the search input on the search results page as well.
Once we have created a working search page using the MCMS Connector controls, we'll create a custom solution that won't include anything provided in the MCMS Connector. Our solution will include an advanced search, specific to our site, and a customized search result listing.
Both options have distinct advantages and disadvantages. Which one you'll implement on your MCMS site will depend entirely upon your requirements, customization needs, and available development time. The following table outlines a few of the more prominent advantages and disadvantages of using the MCMS Connector controls as well as rolling your own solution:
Implementing search leveraging MCMS Connector controls:
| Advantages | Disadvantages |
| Fast install and integration into pages & templates | No customization of search input controls |
| Will work out of the box with minimal configuration | No customization of search result list |
Implementing search with a custom solution:
Advantages | Disadvantages |
Complete control over layout of search input form | Requires extra development time and testing |
Complete control over search result list | |
Create special advanced search based on specific site requirements | |
Next: Searching with the MCMS SharePoint Connector >>
More Windows Scripting Articles
More By PACKT Publishing
|
This article is excerpted from chapter five of the book Advanced Microsoft Content Management Server Development, written by Lim Mei Ying et al. (PACKT, 2005; ISBN: 1904811531). Check it out today at your favorite bookstore. Buy this book now.
|
|