I have to write a content enrichment webservice which retrieves data from an specific SharePoint Site (SPSite). But my code doesn't run, if i make a new SPSite Object. Also no logging information in ULS Log.
The WCF service is hosted in IIS as an application within the SharePoint Portal Application Pool.
is it generally possible to use SharePoint SSOM in wcf service?
Here is some code nothing special:
public ProcessedItem ProcessItem(Item item) { try { using (SPSite site = new SPSite("http://sharepointurl")) { using (SPWeb web = site.OpenWeb()) { } } } catch (Exception ex) { } }