Error HRESULT E_FAIL has been returned from a call to a COM component.
When the MOSS crawl was started, it started throwing up this exception:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
We had no clue about this one and the log messages weren't much helpful. They contained the following error:
CSTS3Accessor::InitURLType: Return error to caller
But checking the eventviewer on the app server(where the indexer was running) showed the following error:
Content sources could not be accesed.
All these messages started throwing up before forms authentication was turned on. For Forms authentication (using Active Directory membership provider) to work, imperonation was turned off.
This was the root cause of the problems. Turning on imperonation was supposed to do the trick and get everything to work, but looks like we have more bugs in the code and hence we had to go back to switch back to the default membership and role provider. Switching back to the previous state helped in indexing/crawling the content. The crawl started again without any problems.
Also careful planning is required if you plan to use forms authentication. Enterprise Search will not work with forms authentication without some workarounds. Allocate some good chunk of time to work on it. You need to create a two zones :
- Default Zone - Forms authentication for external users.
- Custom Zone - Extend the previous web application to create a new zone. Configure it use Windows authentication(with NTLM) and let the crawler crawl across this zone.
Atleast one zone must be configured to have NTLM for the search to work. Also make sure that the content access account has access to this zone.