I've written some custom code in a K2 workflow and I am using the Microsoft.SharePoint assembly.
I set my site to
string mySiteURL = "http://mysite/";
Then using the class
SPSite omySiteCollection = new SPSite(mySiteURL);
Unfortunately when I try to do so I get the following error
Line 12449: "58589103","2014-03-31 16:16:06","Info","General","0","InfoMessage","Approval Workflow","0 http://mysite/","XXXXXX :D:Program Files (x86)K2 blackpearlHost ServerBin","58589103","731f9125afa5469b8624367b4220239a",""
In reading about this error it seems as though it could be caused by K2 code executing outside of IIS causing a permissions error.
Questions:
- Is it possible to use the Microsoft.SharePoint assemblies from within K2 in a Code Reference Event to acces a SP site?
- What privilegea must be given, and where for K2 to access a SP site from a Code Reference Event?
- Would K2 need expanded privileges on the DB Server as well, beyond what it already has to function?