Access denied when trying to get SPListCollection out of SpWeb in BCS connector

I have a BCS connector.

In a constructor of its service class I want to access a SharePoint list.

using (var site = new SPSite("My site URL") {     using (var web = site.RootWeb)     {         var list = web.Lists.TryGetList("My List"); //Getting value error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))!         ...     } } 

But when I try to access the list like in the code example above, Im getting the Getting value error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))! error.

The account I’m using for crawling is the same account I’m using myself for SharePoint administration so I’m pretty sure it has access to the list since I’m the one who created it?

What is the cause of this access denied error and how can I resolve it?