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.

  • One of the purposes is setup permissions for a group.
    – Alexander
    Sep 19 '13 at 7:38

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.