i am migrating provider hosted app to SharePoint online by deploying it to Azure Web apps. How to handle write to file system and local folder access as we will not have file system in azure web apps?

Also what are all the changes required in web.config file of Prover hosted app while migrating it to SharePoint Online?

  • do you want to write Error log in File system or you have any other work like creating a file or updating a file using Provider hosted apps – vinit kumar Sep 20 '18 at 5:17

You have file system in Azure Web app and you can write to it. The only important thing is, that you can't rely on a file system as a permanent storage for your files. As per comments, D:\home is persisted. You can write to this directory and data should be persisted across all instances and never deleted.

Additionally, for permanent file storage solution you can use other things provided by Azure:
Azure blob storage

  • can you please check my 2nd query as well? what are all the changes required in web.config file of Provider hosted app while migrating it to SharePoint Online? Only we need to change client id and client secret or some other changes are also required? – Adarsh Awasthi Sep 20 '18 at 6:29
  • 1
    Only ClientId and Client secret, apart from that nothing else. In the end Azure Web app is just a VM with IIS, that's why everything should work. – Sergei Sergeev Sep 20 '18 at 6:34
  • Anything in D:\home\ is persisted across restarts (otherwise your app will get deleted too). D:\local (?) is temporary. App Services are also running 24/7. You’re paying for a dedicated VM whether you’re running 0, 1 or 50 sites. There is no VM spin down. The app pool on the other hand may spin down (unless you’ve configured always on). – Greg W Sep 20 '18 at 9:01
  • @AdarshAwasthi please take a note on a comment - everything in D:\home is persisted. I was not aware of such things. – Sergei Sergeev Sep 20 '18 at 13:07
  • @GregW thank for pointing that out. I should correct my answer, beause I used outdated information. – Sergei Sergeev Sep 20 '18 at 13:07

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.