4458 Views // 0 Comments // Not Rated

The HybridProvider - Search

An issue came up today with my Hybrid Provider that I felt I should address. Actually, the issue wasn't something not working; instead, it was a case where I had forgotten how I did it! And we all know this happens in programming, and especially in SharePoint. When, at about 3:47 AM you stumble onto a solution, you are more likely to want to move on with your life and put the issue behind you than you are to blog about it and dwell upon it.

Well the issue we had today was about search. We created an SSP and a search scope and a crawler and everything you need to search in SharePoint for a web app that was using the HybridProvider for authentication. However, we were getting a permissions error (and I apologize, but the exact error never made it to me...I'll try to get it posted here).

The underlying problem is that the account that SharePoint impersonates to crawl content really really really wants to get into your site via Windows auth; the HybridProvider uses forms auth. Therefore, the search account, even if granted Jesus permissions, won't be able to crawl your app.

So all you need to do to get search working through the HybridProvider is to extend your existing web app to a new zone that uses Windows auth. Extending a web app is beautiful, since we are exposing the same content database through an entirely independent IIS web site.

Interestingly, this was my biggest push-back on the HybridProvider: Why do we need it? Why can't we just have one content database, and extend it over two web apps, one with SQL auth and one with AD? Well, the big shortcoming of this is that Windows users and SQL users can't be in the same SharePoint groups, which crushes collaboration. Also, it gives us an extensibility to have explicit control over our authentication mechanism as SharePoint grows and changes with your organization.

Here's what to do:

  1. Fire up Central Admin.
  2. On the "Application Management" tab, click "Create or extend Web Application."
  3. Click "Extend an existing Web application."
  4. Now we are on a page that looks like the one we use to create a web app.  The only different is that you pick the existing web app you want to extend.  Fill out the rest, specifying all the IIS settings and whatnot.  Click OK.  The web app is extended.
  5. Make sure the note the URL, since "extended" web apps aren't treated as first class citizens.  The don't show up in the web application list in Central Admin, so (like I did) it's easy to forget about them.
  6. Make sure your Jesus service account can log in through this URL via Windows auth.
  7. Back in Central Admin, go into your SSP settings (which is (probably) the last link in the quick launch menu).
  8. Under "Search" click "Search Settings."
  9. Click "Content Sources and crawl schedules."
  10. Click "New Content Source."
  11. On this page, give it a name, and NOT the URL to your public-facing, HybridProvidering web app, but the URL to the EXTENDED one.  
  12. Set up your crawler schedule on this page as well (keeping in mind that this HAMMERS your database server).  Click OK when done.
  13. Do a crawl.  Have a few cocktails then come back.
  14. Now we have a create a search scope so that the search page on your public app uses the results from the search of the extended app.  Click "View Scopes."
  15. Click "New Scope."
  16. Give it name and description but most importantly, the URL of your PUBLIC site's search page.  Just browse to it and copy and paste on this form.  Click OK.
  17. It should show up in the list back on the View Scopes page.  Click it.
  18. The last thing to do is set a Rule for this Scope to feed the correct searched content to our public site's search result page.  Click "New Rule."
  19. Choose "Content Source" in the first radio button list.
  20. Choose the content source we defined in step #12 in the drop down.
  21. Click OK.

There are a lot of steps there, but not actually a lot to do. I've noticed that users get a little bit touchy about search, (which is fine, since we are now living in the Google age) so explore all the search settings available through an SSP. Get search working smoothly, and you'll be an administrative rock star. Have fun searching!

7 Tags

No Files

No Thoughts

Your Thoughts?

You need to login with Twitter to share a Thought on this post.