using (SPSite site = new SPSite("http://LocalSPServer:1000/", SPUserToken.SystemAccount))
{
using (SPWeb web = site.OpenWeb())
{
var list = new List<QuarterlyIncidents>();
SPList lstQIncidents = web.Lists["QuarterlyIncidents"];
if (lstQIncidents != null)
{
var result = (from SPListItem i in lstQIncidents.Items
orderby i.ID
where lstQIncidents.ID != null
select new
{
i.ID,
i.Title,
i.UniqueId
}
);
foreach (var item in result)
{
var resItem = new QuarterlyIncidents();
resItem.IncidentCount = item.ID;
resItem.SectorName = item.Title;
list.Add(resItem);
}
return list;
}
}
}I am reading data from SharePoint list in a WCF service using server object model. I can consume this simple service hosted in same SP server and get the data but for further complex read write operations I want to debug. I tried to debug but breakpoint does not hit.
Both app pool user is system account(Farm account).
Any clue, I checked changing platform from X86 to x64 but did not help.