Thursday, June 28, 2007

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.

2 comments:

reddy said...

Hi,

Your post was useful.
I am also getting the same error. But my web application requires to work for impersonate = false.
I dont know how to make search work for this condition. You mentioned that create a different zone. I didn't get that part . Can you please tell me how to make it work.

Thanks

Prashanth Palakollu said...

You can look at the following article. This will guide you, though it is recommended to have the impersonation enabled for sharepoint applications :

http://technet2.microsoft.com/windowsserver/WSS/en/library/378c4673-0814-4255-a79c-7c4b6a4732a51033.mspx?mfr=true

You need to extend your application, so that the user facing one will have impersonation disabled and the other one will have impersonation enabled (windows authenticated site). You need to crawl the impersonation site.

Hope this helps...

Prashanth

Post a Comment