title: Additional information: 'M:/uploads/' is a physical path, but a virtual path was expected
body: <p>I need to place uploaded files to our common drive which is accessible from the server. But it is giving <code>Additional information: 'M:/uploads/' is a physical path, but a virtual path was expected.</code></p>
  
  <pre><code> &lt;appSettings&gt;
      &lt;add key="DirPath" value="M:/uploads/"/&gt;
    &lt;/appSettings&gt;
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>String fileName = Path.GetFileNameWithoutExtension(file.FileName);
   String extension = Path.GetExtension(file.FileName);
   var directory = Server.MapPath(@ConfigurationManager.AppSettings["DirPath"]
                                      .ToString(CultureInfo.InvariantCulture));
  </code></pre>
  
  <p>How to access that path? </p>