Hello, I trying to use API to programmatically add assignment from the event handler (sharepoint event handler - not http).
Using CreateAssignment demo project I receive the following error:
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
p(Guid siteId, Guid webId, Guid fileId, Int32 versionId)
web, Guid fileId, Int32 versionId)
at Program.CreateAssignment(String packageUrl, Nullable`1 organizationIndex,
String assignmentWebUrl, String title, String instructorLoginName, String lear
at Program.Main(String args)
Same I receive in my handler.
It seems that problem appear inside the library, when SPContext.Current accessed (seems that in both console app and in handler it's null).
Please, suggest what I'm doing wrong.
Thanks in advance.