<p>I have a site where I use CustomErrors in the web.config to specify a custom error page, and that's working just fine.  The custom 404 page is also specified in the IIS configuration (because if it's not, I don't get my custom 404 page).</p>

<p>But I have some logic that kicks in if a user gets a 404 that looks at their requested URL and make a navigation suggestion, if appropriate.  This logic relies on the aspxerrorpath value.  On my development PC, the aspxerrorpath is correctly appended to the URL, like so:
<em><a href="http://localhost:3092/FileNotFound.aspx?aspxerrorpath=/badpage.aspx" rel="noreferrer">http://localhost:3092/FileNotFound.aspx?aspxerrorpath=/badpage.aspx</a></em>, but on my test site, there's no aspxerrorpath appended to the URL, so all of my custom logic is bypassed and my suggestions don't work.  I'm not sure if this is an IIS config issue or something else.  The web server is Windows Server 2008 with IIS 7.</p>

<p>Any thoughts?</p>

<p>Many Thanks.</p>

The aspxerrorpath parameter is passed if the error was caught by .NET (and the error page specified in web.config is used). This happens if you're using the development web server, or if IIS is configured not to check that the file exists.
If IIS checks that the file exists, then the custom error configured in IIS is used, and the requested URL is included in the querystring as something like
```
http://example.com/FileNotFound.aspx?404;http://example.com/badpage.aspx
```