I've adapted the C# Protocol Handler to my particular search requirements, and I'm trying to get SharePoint to use it.

  • I've registered the DLL with regasm
  • I've installed it in the GAC. (I've also tried using regasm /codebase instead of installing in the GAC.)
  • I've added it to the list of protocol handlers at HKLM\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ProtocolHandlers (e.g. key custprot, value MOSSPH.ProtocolHandler)
  • I've added a content source using the protocol

As far as I can tell, this should be all I need to do.

However, whenever I try to crawl the source, I merely get the error "The protocol handler cannot be found. Check that the handler has been installed." in the crawl log and ULS log.

On one occasion, I did the following:

  • Change the above-mentioned registry key to point my custom protocol at the existing FILE handler. (My 'protocol' basically crawls a fileshare but extracts different metadata, so the FILE handler would work for it.)
  • Run a crawl - this successfully started crawling files in the fileshare.
  • Stop the crawl.
  • Change the registry key back.
  • Run another crawl.

This resulted in my handler being called! (I'd put a Debugger.Launch call in it.) Then it threw an exception, so I fixed the exception code (rebuilt, reinstalled in GAC) and ran the crawl again.

"The protocol handler cannot be found. Check that the handler has been installed."

So... I've managed to get it to work, but only once.

Any tips on figuring out exactly what's going wrong, and how to fix it?

link|improve this question

50% accept rate
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.