The scenario is:
- A MySiteHost site collection (example name: MY SITE). Web application's application pool account is spmysite.
- A TeamSite site collection (example name: TEAM SITE). Web application's application pool account is spteamsite.
- A webpart at MY SITE is retrieving data from TEAM SITE; specifically it's trying to retrieve SPGroups.
- Hitting the following SQL Exception during data retrieval that MY SITE's application pool account could not login to TEAM SITE's content DB.
- Changing MY SITE's application pool account to be the same as TEAM SITE's (spteamsite). Data retrieval successful! But we have a requirement that different web applications must have different application pool accounts. :(
- Changing MY SITE's application pool account to the farm account (ex: spfarm). Data retrieval successful! But we have a requirement that we should not be using the farm account.
- In TEAM SITE's content DB, granted SPDataAccess or DBOwner role to spmysite. Unsuccessful. Side effect is in accessing MY SITE, it's hitting the "This website is not shared to you" error page (Cannot make sense).
We're pretty sure it's more of a configuration problem.
Appreciate your time and help.