title: How to link resources outside the application directory for ASP.NET MVC applications?
body: <p>I have a Javascript source file that is common to different projects, which I want to move out of application specific directories and move into a common spot which all my projects can reference.</p>
  
  <p>However I can't seem to reference the file in the <code>&lt;script&gt;</code> tag of my Views. I've tried using the <code>..</code> symbol to escape up the directory chain but the HTML page doesn't seem to recognize the resource. Which would make sense because how would the HTML page know about a directory above the root of the application? Speaking of the root, I tried using <code>~</code> to indicate the application root and then I got the following error:</p>
  
  <p><code>Cannot use a leading .. to exit above the top directory</code></p>
  
  <p>Is it simply not possible to link to outside resources?</p>
  
  <p><strong>EDIT:</strong> After adding the <code>ASP.NET v4.0</code> app pool to the access control list for the <code>.js</code> file, the <code>GET</code> request succeeded. However, in my controller action where I am grabbing the file, I am going through the virtual directory I had previously created. If this is the case, shouldn't I just be able to source the file using the virtual directory instead of my controller action? When I try to do this, the <code>GET</code> request fails again. When I try to navigate to this source manually, I get an <code>Internal Server Error 500.19</code>. It seems to be looking for a nonexistent <code>web.config</code> file.</p>