Getting SharePoint Search To Work With Anonymous User Access


So, I recently started working on getting SharePoint working as an externally facing site. The more i work with it the more work arounds I end up using.

Getting SharePoint search working was interesting. First of all, since it is externally facing, our configuration require claims based authentication and Forms Based Authentication (FBA) as well.

The first problem I ran into was getting it to work at all on our externally facing site. To do so, I needed to do a few things:

  1. Set up a separate search site that has anonymous access turned on
  2. Go into Site Settings >> Site Collection Administration >> Search Settings
  3. In the search settings, you’re going to want to Enable Custom Scopes and enter the URL of your new search site

This completes the site configuration, you’re not out of the woods yet though. Next you’ll need to crack open the master page to swap out the default delegate control with the search web part. To do this you’ll need to:

  1. Edit the master page you have applied to your site in SharePoint Designer (SPD)
  2. head down the mark up to where the delegate control is located
  3. comment it out
  4. Go into  Design view in SPD
  5. Insert a Search Box web part into the location where the delegate control was previously located (Insert >> Web Part >> Search >> Search Box)
  6. Now head back to Code view in SPD
  7. Here comes the important part, especially if you’re only implementing a site-wide search on your externally facing SharePoint site
  8. Add the DropDownMode=”HideScopeDD” to the SearchBoxEx tag, what this does it tell the web part to hide the scopes drop down when it renders on the master page. Also, you’ll want to turn off the chrome by adding the ChromeType=”None” tag as well
After all that, you should have a working search on your SharePoint site with Anonymous access turned on. It would also be a good idea to create a custom search page for your site. To do this, you’ll want to add both the DefaultSearchResults and SearchResultsPageURL attributes to your SearchBoxEx markup with the URL of your custom search page.
As always, if I’ve left anything out let me know!
Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: