Sharepoint 2013 Search: Error while crawling LOB contents System.UnauthorizedAcessException

indexingsearchsharepoint-2013web-crawler

I have configured and run sample code taken from the MSDN website for a custom BCS indexing connector sample for Sharepoint 2013:

http://code.msdn.microsoft.com/SharePoint-2013-MyFileConne-79d2ea26

During it's intent to crawl, the crawler shows this error in the crawl log:

myfile://servername/CustomConnectorTest
Error while crawling LOB contents. ( Error caused by exception: System.UnauthorizedAccessException Access to the path '\servername\CustomConnectorTest\MyFileModel.xml' is denied. )

Any ideas on why I'm getting this error? I covered all of the obvious (fileshare/folder has the correct permissions, default content access account has the correct permissions, etc).

Best Answer

Figured it out:

You have to make sure that the account running the Sharepoint (Search) Web Service in IIS has access to the repository. OR you can change the service accounts that manage the security components. You need to go to: Central Administration>Security>Configure Service Accounts. From there select an account for "Windows Service - SharePoint Server Search" and "Windows Service - Search Host Controller Service" that has access to the repository. If you don't have one set up then click register new managed account. Basically it.

Related Topic