D
Dunc
Has anyone got a way to get asp.net to return a result code of 404
with a friendly page of any substance?
I have been trying to do a Server.Transfer from the global.asax.cs
Application_Error function, but because there's no access to the
session at this point (Application_OnAuthenticateRequest hasn't fired)
and my master page checks session values based on the transferred
context (that has no session when transferred from the error handler),
I get an error.
If I use Response.Redirect or the <customerrors> tag, I get a response
code of 302.
I've set up IIS to point to the aspx file, but that only works if the
user hits a non-existant page without an aspx extension; any aspx file
gets handled by .net and we end up with either a response code of 302
or an error.
This is REALLY annoying, as every time a page name changes, I end up
with legacy search engine traffic I don't want. I've been trying to
do this for a long time now; there must be some solution out there?
Thanks in advance,
Duncan
with a friendly page of any substance?
I have been trying to do a Server.Transfer from the global.asax.cs
Application_Error function, but because there's no access to the
session at this point (Application_OnAuthenticateRequest hasn't fired)
and my master page checks session values based on the transferred
context (that has no session when transferred from the error handler),
I get an error.
If I use Response.Redirect or the <customerrors> tag, I get a response
code of 302.
I've set up IIS to point to the aspx file, but that only works if the
user hits a non-existant page without an aspx extension; any aspx file
gets handled by .net and we end up with either a response code of 302
or an error.
This is REALLY annoying, as every time a page name changes, I end up
with legacy search engine traffic I don't want. I've been trying to
do this for a long time now; there must be some solution out there?
Thanks in advance,
Duncan