Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

Remote Event Reciever : client context coming as NULL

$
0
0

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


Viewing all articles
Browse latest Browse all 8089

Trending Articles