473,800 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

customErrors doesn't work

I tried working with the customErrors tag so that when the user tries to
access a page that doesn't exist, it will redirect him to the page not found
page. I discovered that it works when my authentication mode is set to None
and <allow users="*" /> rather than deny user="?".

If I change it to form authentication and deny user = "?", it gives me a
server error ("An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed."). It tells me to create a
<customErrors > tag within the web.config file. But I've already created it.
And if I change the mode to RemoteOnly, there will be no error but I can't
see the page.

This is how my web.config looks like:

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>

<system.web>

<compilation defaultLanguage ="vb" debug="true" />

<customErrors defaultRedirect ="techerror.asp x" mode="On">
<error statusCode="404 " redirect="pagen otfound.aspx" />
</customErrors>

<authenticati on mode="Forms">
<forms name=".SMS" loginUrl="login .aspx" protection="All " timeout="30" />
</authentication>

<authorizatio n>
<deny users="?" />
</authorization>

<trace enabled="false" requestLimit="1 0" pageOutput="fal se"
traceMode="Sort ByTime" localOnly="true " />

<sessionState mode="InProc" stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20" />

<globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />

</system.web>

</configuration>

What should I do?
Nov 19 '05 #1
0 1306

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

Similar topics

6
6130
by: John Smith | last post by:
I am trying to implement custom error pages and I get this error message: **************************************************************************** ******** **************************************************************************** ******** Server Error in '/mfg' Application. ---------------------------------------------------------------------------- ----
1
1163
by: Frank | last post by:
I have an IIS 5.0 server that is running both .NET 1.0 and .NET 1.1 applications. I installed .NET 1.0 first. Recently I added .NET 1.1 just for specific new IIS virtual directories. A problem I've encountered is that for some reason my customErrors
2
1335
by: Patrick.O.Ige | last post by:
I have a Custom Error below..!! But when i try it it doesn't work. Am i suppose to make any changes in IIS for this to Work? And the Error pages for example "AccessDenied.aspx" where should they be PUT? <customErrors defaultRedirect="ErrorPage.aspx" mode="On"> <error statusCode="500" redirect="servererror.aspx" /> <error statusCode="404" redirect="filenotfound.aspx" /> <error statusCode="403" redirect="AccessDenied.aspx" />...
6
1484
by: SMG | last post by:
Hi , Sory for incomplete message in last post here is the actual problem.. I am using following code in web.confiig for trapping all the error through out my site.. <customErrors mode="On" defaultRedirect="WebForm1.aspx"> <error statusCode="404" redirect="ServerError.aspx"></error> <error statusCode="500" redirect="WebForm3.aspx"></error>
0
1126
by: Michel Lapointe | last post by:
Hello, I have a small problem enabling customererrors when combine with <location> tag A cut version of my web.config (which show the problem) is <!-- Web.Config Configuration File --> <configuration>
2
3504
by: Max Metral | last post by:
I'm trying to set the default behavior of customErrors in the machine.config. The documentation seems to suggest this should work, but it doesn't seem to work for me. On my development machine, I want customErrors off, and on my production machine I want them to go to a friendly error page (so on with a defaultRedirect). No matter what I do, I only get "customErrors off" with setting in machine.config and not web.config. Any thoughts?...
9
4275
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. Is it programatically possible in VB.NET to read the contents of web.config's <customErrorselement? I looked at using ConfigurationSettings.AppSettings, but that doesn't work. I need to read the value of redirect from the error statusCode 404. My web.config looks like this: <customErrors mode="RemoteOnly" defaultRedirect="Error.aspx"> <error statusCode="404" redirect="Error404.aspx" /> </customErrors>
2
1323
by: David Lozzi | last post by:
Howdy, I'm using the following code, asp.net 2.0 <customErrors mode="On" defaultRedirect="oops.aspx"> <error statusCode="403" redirect="notfound.aspx" /> <error statusCode="404" redirect="notfound.aspx" /> <error statusCode="500" redirect="oops.aspx"/> </customErrors>
3
1805
by: =?Utf-8?B?QXJuZSBHYXJ2YW5kZXI=?= | last post by:
I have <customErrors .. in my web.config but the redirect does not kick in. What am I doing wrong? <customErrors defaultRedirect="Error.aspx" mode="On"> <error statusCode="404" redirect="Filenotfound.aspx"/> </customErrors> -- Arne Garvander Certified Geek Professional Data Dude
0
9550
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10273
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10250
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7574
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.