Deploy json file in App_Data folder Azure App Service linux


Having a bit of an issue trying to deploy a json file in a .NET application to Azure App Service running in/on a linux based container.

In our nuget package, built by Team City we have a file App_Data\StubData.json.

When we deploy Azure the StubData.json file does not end up in the App_Data folder or deployed anywhere.

The Preserve App_Data setting in process step is not set so should be false by all accounts.

Any ideas?



Hi @john2

Thanks for getting in touch! Sorry to hear that you’ve run into an issue with a missing json file after deployment.

It sounds like you could set the Preserve App_Data setting in the step to true so that the delete operations in the App_Data directory are skipped.

Could you try that and let me know how you get on, please?


Hi Stuart,

That hasn’t seemed to have any effect. I altered the Project process such that Preserve App_Data was true. Re-ran and an old deployment with an old build, then created a Release with the current build and deployed. No joy :slightly_frowning_face:

For Preserve App_Data from the UI we have “Select to preserve files in the App_Data folder before deployment.” which I read as it will keep the data in there if set, but whatever it does it does it before deployment.

I have retrieved the Octopus logs from the deployment server and our file does get mention so suspect it is going somewhere - just can’t figure out where.



Ok think found the file now - it is out there - just perhaps not where we thought is was going to be. Sorry for the bother.



1 Like

Hi John,

Thank you for the response. I’m glad you were able to get it figured out.

If you have any additional questions or if there is anything else we can assist with, please let us know.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.