473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changing the 404 Page not found page.

JB
I have found where I can change the page that is displayed for 404 in IIS.
Question is - can I use an aspx page? I want to have the page send me an
e-mail of the URL of the page they are trying to access. The main site is a
..Net 2.site.

TIA - Jeff.
Mar 8 '07 #1
4 1132
I doubt it. Since 404 means the document was not found, it's never going to
enter an application.

I've been wrong before, though.

Inside your application you should trap every error - which means you'll
need something in Global.asax to mop up everything you might have missed in
your try{} blocks.
Peter

"JB" <jb@nowhere.comwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
>I have found where I can change the page that is displayed for 404 in IIS.
Question is - can I use an aspx page? I want to have the page send me an
e-mail of the URL of the page they are trying to access. The main site is a
.Net 2.site.

TIA - Jeff.


Mar 8 '07 #2
>I have found where I can change the page that is displayed for 404 in IIS.
>Question is - can I use an aspx page? I want to have the page send me an
e-mail of the URL of the page they are trying to access. The main site is a
.Net 2.site.
http://www.xefteri.com/articles/show.cfm?id=11
Mar 8 '07 #3
This page [1] shows one approach. There are actually classes in the
framework that can be used to get the property of the code. The mail part is
documented all over the place. But what I'm still trying to figure out is
when Google went down?

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

[1] http://blogs.msdn.com/mattwag/archiv...07/368605.aspx

"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
>I doubt it. Since 404 means the document was not found, it's never going
to enter an application.

I've been wrong before, though.

Inside your application you should trap every error - which means you'll
need something in Global.asax to mop up everything you might have missed
in your try{} blocks.
Peter

"JB" <jb@nowhere.comwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
>>I have found where I can change the page that is displayed for 404 in IIS.
Question is - can I use an aspx page? I want to have the page send me an
e-mail of the URL of the page they are trying to access. The main site is
a .Net 2.site.

TIA - Jeff.



Mar 8 '07 #4
You can.

But should warn you. If it's an Internet application that might be bad idea.
There are many crazy robots walking out there that hits your website with
some random URLs.
You will get a lot of emails.

It's much better if you have some kind of analyzing software that analyzes
logs of your webserver. To check for 404 errors.

But nevertheless custom 404 is nice. Just do not forget to set correct
return code 404. with Response.StatusCode = 404; (i am just using my memory
here, check MSDN)
Otherwise ASP.NET will send 200 wich means evetrything is OK. Thus messing
up your IIS logs.
George.

"JB" <jb@nowhere.comwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
>I have found where I can change the page that is displayed for 404 in IIS.
Question is - can I use an aspx page? I want to have the page send me an
e-mail of the URL of the page they are trying to access. The main site is a
.Net 2.site.

TIA - Jeff.


Mar 8 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt | last post by:
Hi group, Here's a problem I've been trying to solve for the past several weeks. I have the standard WebBrowser object added to a form so it can access websites, and I have it load a default...
3
by: Ron Brennan | last post by:
Good morning. I have a page displayed and want to get information from a user using showModalDialog, and then send a request to the server for more information based on the user info from the...
7
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
2
by: david | last post by:
Problem: There is a search button, Search, in form, for searching patient info list. The error occurs after the following steps: 1. search first time is OK, and all found the records are...
2
by: John Dalberg | last post by:
The below html validates correctly on w3.org's html validator when the file has an html extension. When the same file gets an aspx extension, I get the error below from the validator. This tells me...
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
2
by: paul.gibson | last post by:
I have a released web app where I have found a bug that can be fixed simply by moving a JavaScript <scriptblock from the bottom of an ASPX page to the top. Is it a safe/accepted practice to...
0
by: Jonathan Wood | last post by:
I had the strangest thing happen yesterday. I was playing with the EnableViewState property for some table controls, ran my Web project to the page I was working on, clicked a button that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.