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

defaultRedirect in web.config doesn't work

Hi,

I've got an ASP.NET application that I would like to use the defaultRedirect
attribute of customErrors element to redirect to a custom aspx-page in case
of errors. But the page just doesn't get called, instead the default ASP.NET
error page is shown. I no Application_Error sub in global.asax.vb so the
web.config should rule this.

Any tips?

Jonas
Feb 1 '06 #1
1 2508
Use

<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx"/> in your
web.config file.

"Jonas" wrote:
Hi,

I've got an ASP.NET application that I would like to use the defaultRedirect
attribute of customErrors element to redirect to a custom aspx-page in case
of errors. But the page just doesn't get called, instead the default ASP.NET
error page is shown. I no Application_Error sub in global.asax.vb so the
web.config should rule this.

Any tips?

Jonas

Feb 2 '06 #2

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

Similar topics

5
by: Paul Daly (MCP) | last post by:
I've created a windows forms appliation that gets its data from a sql database. I want to create an app.config file for this application so that in the event that the server name changes, they...
6
by: Ruslan | last post by:
Hello, I have to project: one ASN.NET project and another - Web Service in the same solution. I want to use the same web.config and global.asax files. Does it possible?
1
by: Darrin J Olson | last post by:
I am having trouble with the page redirecting for handling errors. I have the following in my Web.config file: <customErrors mode="On" defaultRedirect="Errs/AppError.aspx"> <error statusCode="404"...
1
by: Gary | last post by:
I have the following in my web.config.... <customErrors mode="RemoteOnly" defaultRedirect="Applicationerror.aspx"/> but, my error page does not display. Instead a 'Runtime Error' page...
6
by: Gary | last post by:
I have the following in my web.config.... <customErrors mode="RemoteOnly" defaultRedirect="Applicationerror.aspx"/> but, my error page does not display. Instead a 'Runtime Error' page...
21
by: Gary | last post by:
When using an ASPX page for a DefaultRedirect it does not work if the ASPX page has any code in it. If I put ... If Not IsPostBack Then lblMessage.Text = Server.GetLastError.Message End If ...
0
by: Markus Rytterkull | last post by:
Hi I'm just testing some web stuff and created a errorpage to display nice messages to all users My page that raises the error uses Server.GetLatestError to get the error and store in a session...
2
by: ad | last post by:
I have a customErrors section in Web.config. All error except error 403 and 404, will be redirect to GenericErrorPage.aspx. How can I show the e.Message or some explicit statement according...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
I think I am missing something about how to redirect to a certain page when 404 errors occur. I want to redirect to a generic pagenotfound.aspx page. I have the following in web.config: ...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.