I have an AppWeb Remote event receiver bound to ItemChanged event on list which is in AppWeb scope(defined in sharepoint project declaratively). Whenever an item in this list is changed, i need to access different list, which is present in the HostWeb scope, and make there some changes.

ClientContext hostContext = TokenHelper.CreateAppEventClientContext(properties, false) 

does not work since i am in appWeb context. I cannot even access this way

ClientContext hostContext = new ClientContext(properties.AppEventProperties.HostWebFullUrl)

since AppEventProperties are null (because RER is bound to ListItemEvents). Is there any way i could achieve this without having to hardcode the HostWebUrl? Thanks alot!


Look at this: http://www.sharepointnutsandbolts.com/2014/07/remote-event-receivers-on-host-web-ClientContext.html

I think Chris is describing there exactly your issue.

  • Although this article did not describe exactly my issue, since it is talking about creating the context of host web, it helped me to find the solution. – Martin Jul 28 '15 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.