hi All,
I am creating an Remote event receiver.
The receiver needs to access a list in the host web.
I am trying to access the list using the client context , but i am unable to do so.
I am getting the clientcontext object as NULL
Here is the code:
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties){
SPRemoteEventResult result = new SPRemoteEventResult();
if (properties.EventType == SPRemoteEventType.AppInstalled)
{
using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, false))
{
if (clientContext != null)
{
clientContext.Load(clientContext.Web);
clientContext.ExecuteQuery();
}
}
}
return result;
}
Can any body suggest , as to why i am getting the client context as NULL.
Thanks in Advance.
gaurav_gc