473,385 Members | 1,409 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,385 software developers and data experts.

custom server errors and wen.config

Hi, I have custom errors set in the web.config and am wanting to
redirect any bad url requests; 404 etc back to index.aspx

In web.config i have:
<customErrors mode="On" defaultRedirect="error404.aspx" />

which redirects to error404.aspx, then in error404.aspx I have:
<meta http-equiv="refresh" content="3;url=index.aspx"> which seems to
work fine if i mess with the url file name but not the file extension,
so if I typle "indx.aspx" the server will redirect back to index.aspx
but a request for "index.asp" causes a plain old 404 error.

Any ideas why this must be?
Nov 18 '05 #1
1 1301
Web.config is ASP.NET-only and is not handled when referencing a nonexistent
file or an ASP Classic or HTML file.

Jon
"Adie" <ar*******@h-o-t-m-a-i-l.com> wrote in message
news:61******************************@news.teranew s.com...
Hi, I have custom errors set in the web.config and am wanting to
redirect any bad url requests; 404 etc back to index.aspx

In web.config i have:
<customErrors mode="On" defaultRedirect="error404.aspx" />

which redirects to error404.aspx, then in error404.aspx I have:
<meta http-equiv="refresh" content="3;url=index.aspx"> which seems to
work fine if i mess with the url file name but not the file extension,
so if I typle "indx.aspx" the server will redirect back to index.aspx
but a request for "index.asp" causes a plain old 404 error.

Any ideas why this must be?

Nov 18 '05 #2

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

Similar topics

7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
5
by: jonhyland | last post by:
Hey all, I'm writing a .NET application where I want all HTTP errors such as 404 to redirect back to the home page. Since .NET only handles HTTP errors if the client is requesting a .NET...
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...
4
by: Pat | last post by:
In my Web.config i have :- <customErrors mode="On" defaultRedirect="genericerror.htm"> <error statusCode="404" redirect="pagenotfound.aspx"/> </customErrors to get page not found error but...
2
by: kramer.newsreader | last post by:
I am develoing a C# web application on a remote server. I have publish access to this server, but not permission to change configuration setting. When I try to load my page, I get the following...
8
by: Mark A. Sam | last post by:
Hello I am working locally with Visual Web Developer 2005 Express. Before I even installed it, the information from Microsoft was that you could FTP it to a remote site and it should work. The...
0
by: gilly3 | last post by:
I'm coming across all kinds of frustration implementing custom errors in ASP.NET 1.1. First, 401 - Authorization Failed My application uses Windows Integrated Authentication, and restricts...
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: Alias | last post by:
Hi - I'm trying to implement a custom RoleProvider based on the SqlRoleProvider. I keep receiving a an error that it can't load type 'MyRoleTest.MyRoleProvider' when trying to load my...
4
by: =?Utf-8?B?QWxm?= | last post by:
Hello all, I am having trouble dealing with ~(tilde) in my .Net 1.1 web application, specially when it comes through the URL. For example, when someone requests the following URL:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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
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: 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...

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.