<p>I have an authentication script (<strong><code>CheckLogin.aspx</code></strong>), and if any of the credentials do not match my application will redirect (via <strong><code>Server.Transfer</code></strong>) to the access denied page (<strong><code>forbidden.aspx</code></strong>).  Each time my script runs,it gets an <strong><code>InvalidOperationException: Failed to map the path '/forbidden.aspx'</code></strong>.  Here is a mockup of my applications file structure:</p>

<pre><code>&lt;root&gt;
..default.aspx
..forbidden.aspx
..&lt;inc&gt;
....scripts.js
..&lt;auth&gt;
....CheckLogin.aspx
</code></pre>

<p>As you can see, the <strong><code>CheckLogin.aspx</code></strong> page is in a folder inside the root, and the <strong><code>forbidden.aspx</code></strong> page is inside the root itself.  The path I am telling my application to redirect to is <strong><code>/forbidden.aspx</code></strong>.</p>

Sometimes you have to precede the page path with a tilde to indicate the root directory:
```
```
'~/forbidden.aspx'
```
```