I have heard you can't have server side code in sharepoint hosted apps.
Does this mean you don't have access to feature and event receivers?
|
I have heard you can't have server side code in sharepoint hosted apps. Does this mean you don't have access to feature and event receivers? |
|||
|
|
|
What kinds of things would you be looking to do in a feature receiver for a SharePoint-hosted app? The app installation process handles deploying all the necessary resources (such as HTML/CSS/JS assets, site column/content type definitions, etc.) to the app web. In terms of event receivers, you can create "Remote Event Receivers" in apps for SharePoint--just not in a SharePoint-hosted app. When you attempt to add a Remote Event Receiver to a SharePoint-hosted app project, Visual Studio will add a new web application project to the solution that includes a remote event receiver WCF service. Because a remote event receiver relies on a WCF endpoint to "remotely" handle the events being raised from SharePoint, and this WCF endpoint contains server-side code, by definition it cannot run in a SharePoint-hosted app. For more information, see this remote event receiver how-to on MSDN. |
|||
|
|