473,406 Members | 2,312 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,406 software developers and data experts.

Custom Error Pages

Hi
I have created a Web.config file with theses settings:
<customErrors mode="RemoteOnly"
defaultRedirect="/errorpages/generic.aspx">
<error statusCode="403" redirect="/errorpages/noaccess.aspx" />
<error statusCode="404" redirect="/errorpages/filenotfound.aspx" />
</customErrors>

If a user tries to go to a folder that does not exist then I get my default
HTML error page for directory not found.
If a user tries to go to an aspx page in a folder that does not exist that
get a horrible error page telling them that of A Runtime Error and that they
should changes the Web.config error mode to off to see the Error. How can I
make it that they go to one of my nice looking Error pages.

Thanks
Nov 17 '05 #1
2 1630
Hi Kenneth,
Have u navigated to /errorpages/filenotfound.aspx to
ensure that this page loads up okay by itself? You might
be getting an error because of some code on this page. To
check if this is a case, create a test "filenotfound.html"
and set web.config so that 404 status takes u
to /errorpages/filenotfound.html instead of the aspx page.
If this works okay, u know there is something wrong with
ur particular aspx page.
-----Original Message-----
Hi
I have created a Web.config file with theses settings:
<customErrors mode="RemoteOnly"
defaultRedirect="/errorpages/generic.aspx">
<error statusCode="403" redirect="/errorpages/noaccess.aspx" /> <error statusCode="404" redirect="/errorpages/filenotfound.aspx" /> </customErrors>

If a user tries to go to a folder that does not exist then I get my defaultHTML error page for directory not found.
If a user tries to go to an aspx page in a folder that does not exist thatget a horrible error page telling them that of A Runtime Error and that theyshould changes the Web.config error mode to off to see the Error. How can Imake it that they go to one of my nice looking Error pages.
Thanks
.

Nov 17 '05 #2

"Priya" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Hi Kenneth,
Have u navigated to /errorpages/filenotfound.aspx to
ensure that this page loads up okay by itself? You might
be getting an error because of some code on this page. To
check if this is a case, create a test "filenotfound.html"
and set web.config so that 404 status takes u
to /errorpages/filenotfound.html instead of the aspx page.
If this works okay, u know there is something wrong with
ur particular aspx page.


The page seems to work fine but the fault occurs if you try to get to a
folder called publications
Why would this be the case.
Nov 17 '05 #3

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

Similar topics

3
by: Steve | last post by:
All -- This occasionally happens, and there's no set pattern on why this is... perhaps it happens a few times every few months or so. I have a custom ATL COM object that handles data from...
14
by: sinister | last post by:
I have some CGI programs that spit out error pages when the user enters illegal form input. These custom error pages, while informing the user of errors, are otherwise just standard web pages. ...
3
by: CoreyMas | last post by:
This is what i am trying to do I have a DAL that contains all of my database connections/reads etc. I have a separate GUI layer that has my web pages I would like to pass my exception errors...
9
by: Nick | last post by:
the customError feature is not working. I have it setup as the help says in my web.config file. <customErrors defaultRedirect="DsAppError.aspx" mode="RemoteOnly"/> I tried in a couple...
3
by: Bubu | last post by:
Hello this is robert, I need some suggestion, I have a website, hosted in windows 2003 server,shared hosting. I would like to have a custom 404 error page, for missing files. In the help file of...
2
by: Matt | last post by:
Hello all, The app we are working on uses custom errors extensively to provide friendly error pages to users whilst logging the actual exceptions behind the scenes. However.... We are now...
0
by: Rhys666 | last post by:
OK, an issue I've come across before, but never found a cause for or resolution of, has decided to become the bane of my life again with ASP.Net Custom Error Pages. Basically, my web application...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
1
by: Ryan | last post by:
I am trying to log events to SQL Server instead of the computers event log, but, although I get no errors, I have no luck. The webevents_events table is empty. I have a custom event that I am...
5
by: rote | last post by:
I'm using ASP.NET 2.0 and i have copied and pasted the code below to my Global.asax file but it desn't trap the error I want to trap the 401 access denied void Application_Error(object sender,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.