locked
Install event tested locally RRS feed

Answers

  • Well, there you go, you have your answer. You cannot use event receivers on a SharePoint hosted app. It has to be auto-hosted or provider-hosted (which you can test locally BTW), that is why your context token is always null because there is no context token. oAuth only kicks in when you are calling resources not hosted on SP.


    Program Manager, Office Developer Platform.

    Tuesday, March 5, 2013 4:17 AM

All replies

  • VS 2012 added a prj to my solution to implement the app's install/uninstall/upgrade event but my ClientContext is always null.


    salvatoredifaziosharepoint.blogspot.com

    Twitter: @Salvodif
    MVP SharePoint Server

    Thursday, February 28, 2013 5:16 PM
  • what type of app are you building? auto-hosted? provider-hosted?

    Program Manager, Office Developer Platform.

    Friday, March 1, 2013 12:21 AM
  • SharePoint hosted app.

    I enabled the event app in the SharePoint hosted app. I know that is not ok but I should have a way to test it locally


    salvatoredifaziosharepoint.blogspot.com

    Twitter: @Salvodif
    MVP SharePoint Server

    Friday, March 1, 2013 9:12 AM
  • Well, there you go, you have your answer. You cannot use event receivers on a SharePoint hosted app. It has to be auto-hosted or provider-hosted (which you can test locally BTW), that is why your context token is always null because there is no context token. oAuth only kicks in when you are calling resources not hosted on SP.


    Program Manager, Office Developer Platform.

    Tuesday, March 5, 2013 4:17 AM
  • ok that's fine and I agree with you, off course. But could I test it on a locally iis? I think so. I tried some way to do that but I have some problem that are caused,  I think, because my apps site is hosted on https.

    salvatoredifaziosharepoint.blogspot.com

    Twitter: @Salvodif
    MVP SharePoint Server

    Tuesday, March 5, 2013 5:23 PM