title: Relative path from Service Website on Azure Cloud Service
body: <p>I have a Azure Cloud Service with a WCF web role.  I am trying to access a file within App_Data and I don't want to hardcode the path.  I've tried using: </p>
  
  <p><code>System.Web.HostingEnviroment.MapPath("~/App_Data/myfile");</code> </p>
  
  <p>as well as turning on aspNetCompatibilityEnabled and using <code>Server.MapPath()</code></p>
  
  <p>but both ways return: </p>
  
  <blockquote>
    <p>d:\windows\system32\inetsrv\App_Data\myfile</p>
  </blockquote>
  
  <p>The actual location of the file is:</p>
  
  <blockquote>
    <p>E:\sitesroot\0\App_Data\myfile</p>
  </blockquote>
  
  <p>Is there any way I can access this file short of hard-coding the path?</p>