Thursday, November 17, 2005

SharePoint Searching CMS Sites Tip

We are replacing a customer's intranet web site with a SharePoint & Content Management Server solution. I encountered an issue when configuring SharePoint to crawl CMS channels and postings.

Environment Background

Before diving into the tip, here is a brief background. SharePoint and CMS are installed on the same front-end servers in the same Default Web Site. That should be enough background. Microsoft states that you install CMS first, followed by SharePoint, and finally the CMS/Sharepoint Connector.

SharePoint's Domination of IIS

SharePoint takes over managing an IIS website when you extend it. If you have any other folders or virtual directories in a website you have to create exclusions in the virtual server settings. The virtual directory in our case is the top level Channel in CMS. There is a fantastic KB article on coexistence of CMS and SharePoint on the same web site. In addition to creating an exclusion path, you have to go into your excluded CMS virtual directory in IIS and remove the custom HTTP SharePoint Header. What we found is that SharePoint and CMS coexist fine without removing the Header.... except for Search.

Configuring Search

There is documentation all over the web to configure SharePoint to crawl CMS. We were able to get SharePoint to index the channels but not the CMS postings (web pages).

TIP: After you create a virtual directory in a SharePoint managed web site, you have to remove the SharePoint HTTP header. That's right. SharePoint monitors the IIS web site and stamps anything new with a custom HTTP header.

On our project, the infrastructure person configured the environment and then the developer created the top level channel and began developing the templates within the channels. It was a timing issue. I hope this saves somebody several hours of troubleshooting.

By the way, the Contoso Virtual Machine has the same issue. MS forgot to remove the http header for each of the Woodgrove sample sites. Ironically the CMSConnector sample site in the same IIS web site is indexed because the header has been removed.