IIS 404 Error..

In IIS I've configured the 404 error to point to my own error file, which works fine.

But is it possible to find out the page name that doesn't exist and hence caused the 404. (Maybe with Javascript history?)

This so I can give the user the option to send an email to myself with page details.

(I'm using ASP as well so if your answer involves ASP fine!)
LVL 4
rupertsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
xabiConnect With a Mentor Commented:
Hi there:
I use this technique:

-Use MMC to open your web properties.
-Select Web properties
-Tab Custom errors
-404
-Edit properties
-Message type = URL
-Point to your presonalized page (I use an ASP page)
-OK, OK, OK

My personalized page get the bad url request with

<%
sBadURL = Request.QueryString
%>

This is an example of what I get in sBadURL:

404;http://telcoserver/xabi/test.aspsdfs

So you can use this value as you want.

Xabi
0
 
rupertsAuthor Commented:
Right I will try it tonight on my webserver, currently the one at work is "suffering".

But I recall having problems using ASP pages when redirecting from custom errors.
0
 
rupertsAuthor Commented:
Still waiting to test it!

Proxy server is down, so I can't access the site (long story)...
0
 
xabiCommented:
Don't worry

Xabi
0
 
rupertsAuthor Commented:
Doh...I set it up as a file not a URL, no wonder I was having problems.

Thanks..
0
All Courses

From novice to tech pro — start learning today.