Our SharePoint Hosted App has a configuration file needs to be updated during App upgrade. I understand that event-handling code can't be used for SharePoint Hosted App. It will be painful for an administrator to visit each App to update the configuration file manually if the app has been deployed to hundreds of subsites.

I was thinking to have the app home page to update the file automatically when a user access the app first time, but it can run into permission issue as not all users can write the file. Now I am thinking of creating a tool for the administrator to update all sites at once, but I don't feel it is a good solution.

1 Answer 1


Been there too. I think best that the config should be in an App Web List or an App Web Property in json form. This way you won't worry for permissions. If you include a version number in your javascript and copy / cross check it with an app weeb property, then you have your own Upgrade event receiver. If the version number in the javascript is not the same with the stored in the App Web Properties, then this time it runs just from an upgrade action. Even better, keep the version as a string, in the exact same form that there is in the AppManifest.xml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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