title: How to make file references to local disk work in Azure Web Site?
body: <p>In my Azure Web Site I have in my AppSettings section in Web.Config some references to files on my disk. When deployed to Azure those references doesn't count any more. I know that you can overwrite AppSettings in Web.Config in the Azure environtment. But what is the file structure there?</p>
  
  <p>A couple of examples from my web.config that I have to solve:</p>
  
  <pre><code>&lt;add key="DataMapPath" value="d:\inetpub\MyWebApp\App_Data\map.xml"/&gt;
  &lt;add key="CuteWebUI.AjaxUploader.TempDirectory" value="C:\Temp\WebApp\Attachments\UploaderTemp"/&gt;
  </code></pre>
  
  <p>The first file tells our code to look for the map.xml-file in the App_Data-directory.
  The last one tells our upload-controll where to upload files. I maybe should have used Azure Blob Storage here instead but that would need some major refactoring of our code.</p>
  
  <p>Is there som best practices on this topic? </p>
  
  <p>Our WebApp is running in production today, but I want to try out MS Azure. But I doesn't want to do to many code changes to make it work in Azure.
  I have also read you can spin up an Virtual Machine (Windows Server) but that is overkill for my needs right now. We may go that way in the end, but for this testing-purpose it should be made simple.</p>
  
  <p>Any suggestions on how this could be solved? Someone done this before? I guess someone has. Indeed.</p>
  
  <p>If I do have read and write access to the file system for my Web Site I maybe could use this:</p>
  
  <pre><code>Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TheFolder");
  </code></pre>
  
  <p>This would be appropriate for both on-premise and Azure deployment. But then I have to do some changes in our code.</p>