title: An error occurred loading a configuration file: Failed to map the path '/'
body: <p>I get An error occurred loading a configuration file: Failed to map the path '/'. when i try to run following line to get path of web.config</p>
  
  <pre><code>Configuration config =System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
  </code></pre>
  
  <p>I am running Windows 7 , Visual studio 2010 and .net framework 4.0 . Now i know that this issue is resolved by running visual studio as administrator and i have run same code numerous times before doing run as administrator but today running as administrator is not resolving the issue as well . I have run same code on laptops of my team mates and code works perfectly and when i run that code on my laptop it does not work .</p>
  
  <p>I have tried everything , is there a way i can give an absolute path somehow to make it work temporarily and can my windows be an issue because it is in bad condition lately . Kindly help as it is wasting a lot of my time</p>