none
App_Data folder cleared\deleted on azure continous integration build

    Question

  • Hi guys.

    I just got my App_Data folder empty after a build.  I'm not an expert yet when it comes to automated deployment and msbuild. What should I configure to keep this folder untouched?


    Thursday, July 25, 2013 11:08 AM

Answers

All replies

  • Hi,

      >> I just got my App_Data folder empty after a build

    According to your description, I am not sure whether you are using Website, cloud service, or virtual machine. In order to reproduce the issue, it would be better if you can let us know whether the App_Data folder is on your local machine or the cloud machine.

      >> What should I configure to keep this folder untouched?

    If you mean the App_Data folder on your local machine is deleted after you publishing your web site using WebDeploy (no matter deploy to Windows Azure or somewhere else), then you may want to invoke msdeploy manually: http://stackoverflow.com/questions/4289440/make-msdeploy-visual-studio-not-delete-app-data-folder-but-delete-everything-e

    Best Regards,

    Ming Xu


    Ming Xu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Friday, July 26, 2013 9:06 AM
    Moderator
  • I'm using Azure Website. The folder is in the cloud.

    I forgot an important thing to note: the previous content (that was dynamically added to the folder by site) gets cleared.

    I use the folder to store my blobs there. However, it is bad choice in the cloud, therefore I better just go with Azure Blob Storage.

    Friday, July 26, 2013 12:05 PM
  • Hi,

      >> I'm using Azure Website. The folder is in the cloud.

    Thanks for your clarify, but it seems still has some confusions since remote desktop cannot be used to connect to a website (remote desktop is just using in cloud service and virtual machine). So I would like to know how you know this folder is deleted. I assume what you mean is you're storing some files in this folder, and your code tries to access it, but can't read anything. In this case, I cannot reproduce this issue on my side. I tried to read/write a text file stored in App_Data folder, which worked fine.  

      >> I forgot an important thing to note: the previous content (that was dynamically added to the folder by site) gets cleared.

    One possible cause in my mind is you have two or more instances of your website. You store the data in one instance, and it cannot be found in another instance. This is a desired behavior, and is one of the reason why it is not recommended to store permenant data in the website itself. This will force us to use a single instance only (unless we manually synch the data among all instances) and thus removes the scability feature offered by Windows Azure (the best feature of cloud computing).

      >> However, it is bad choice in the cloud, therefore I better just go with Azure Blob Storage.

    Yes, you can use blob storage to store files, and use Windows Azure SQL Database to store relational data.

    Best Regards,

    Ming Xu


    Ming Xu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Sunday, July 28, 2013 11:34 AM
    Moderator