Hi,
We are impersonating a SharePoint User and trying to acces a list item.
using (SPSite site = new SPSite(BAH.SN.Properties.Settings.Default.RootSiteUrl, new SPUserToken(currentUser.ImpersonationToken)))
{
using (SPWeb web = site.RootWeb)
{
SPList list = web.GetList(BAH.SN.Properties.Settings.Default.CommunitiesListPath);
if (list != null)
{
SPQuery query = CAMLHelper.GetSPQueryForCommunityListByOwner(user.UserName);
SPListItemCollection items = list.GetItems(query);
if (items != null && items.Count > 0)
{
// Read here
}
}
}
}
We are able to get a handle on the list, but as soon as we try to access any property of SPListItemCollection "items", we get a COM exception: 532459699.
We are running FBA and the user calling this code is an anonymous user.
Kind regards,