In my ASP.NET MVC application, I am trying to retrieve all items in a list with the version history, and then cast them to a custom object. To do this, I am using Microsoft.SharePoint. I was initially doing this the following way: Util.GetSPItemCollectionWithHistory method: public static SPListItemCollection GetSPItemCollectionWithHistory(string listName, SPQuery [...] read more
I'm developing a solution for SharePoint 2007, and I'm using SPSecurity.RunWithElevatedPrivileges a lot, passing in UserToken of the SystemAccount. After reading http://hristopavlov.wordpress.com/2009/01/19/understanding-sharepoint-sprequest/ I finally began to understand why I get these System.Runtime.InteropServices.COMException (0x80010102): Attempted to make calls on more than one thread in single threaded mode. (Exception from HRESULT: 0x80010102 [...] read more
I have a couple of question regarding developing multithreading webparts in Sharepoint. First, let me explain the idea. I have a page with 5-7 different webparts. These webparts are constructed all in the same way, which means: a) the retrieve some data from some SPLists b) transform that data to [...] read more
While using System.Threading.Tasks.Task in my code,I am getting the below exception: > SPException: Attempted to make calls on more than one thread in single > threaded mode. (Exception from HRESULT: 0x80010102 > (RPC_E_ATTEMPTED_MULTITHREAD)) Please point out in which all cases this exception gets generated. read more