![pc remote receiver app pc remote receiver app](https://img.joomcdn.net/0d4133e79e95cb707fcee3b2477e71f62e1e6f5f_original.jpeg)
Using (ClientContext clientContext = new ClientContext(myurl)) Public void ProcessOneWayEvent(SPRemoteEventProperties properties)
#Pc remote receiver app code#
The below code just appends the string “changed by RER” to the title of a list item. This is one-way event that can handle past events (“-ed”).Īdd the following code to “ProcessOneWayEvent” as we chose to implement the “Item was added” event. Such as after a user adds an item to a list or deletes an item from a list. ProcessOneWayEvent(): This is a asynchronous event that handles events that occur after an action occurs. Two way event that can handle current events (“-ing”) that can callback to SharePoint.Ģ. Such as when a user adds or deletes a list item. ProcessEvent(): This is a synchronous event that handles events that occur before an action occurs. Now, coming back to the walk-through, if you see the code file of the service, you’d see two methods.ġ. Remote events (app events and remote event receivers) are NOT supported in SharePoint-hosted apps. So, if you want to handle events, your app needs to be either an Auto-hosted app or a Provider-hosted app.
#Pc remote receiver app windows#
Auto-hosted app means that you do not have to worry about hosting the remote web project as SharePoint will deploy and host the remote project for you (in Windows Azure web sites). Your app will now be an Auto-hosted app and NOT SharePoint-hosted.ĥ. Thus you see a remote web project being added to the project you created above. The only way to host a WCF service for SharePoint to call back when a remote event occurs is to host the service in a remote web project.Ĥ. Again in other words, remote events requires server side code.ģ. Remote events in SharePoint require a WCF service to call back when a remote event occurs.
![pc remote receiver app pc remote receiver app](https://i.ytimg.com/vi/b2qyBtqZ0Ko/maxresdefault.jpg)
In other words, no server side code is possible.Ģ. SharePoint-hosted apps can only use JavaScript CSOM. This is because remote event receivers does not work with SharePoint-hosted apps for the following reasons:ġ. VS creates a web application behind the scenes, which actually makes this an Auto-hosted app. !!IMPORTANT!! At this time, this is not really a SharePoint-hosted app.
![pc remote receiver app pc remote receiver app](https://rukminim1.flixcart.com/image/416/416/remote-controller/6/r/a/smiledrive-usb-pc-mac-remote-control-your-computer-original-imaezufusyf6ddwy.jpeg)
Once you click “Finish”, a web application is created with a web service that contains a code file. For e.g., let’s use “Item was Added” (ItemAdded – Asynchronous) event. Choose “Remote Event Receiver” and give it a name, e.g., “MyReR” and click “Add”.Ĭhoose the event receiver. Right-click solution explorer and click “Add” and then “New Item”. Right-click the project and add “New Item”.Ĭhoose List and give it a name, e.g., “MySampleList”. Let’s first add a list within the app so that whenever an item it added, the remote event receiver will be invoked.