473,654 Members | 3,089 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom Errors in IIS / .NET web.config file settings

C
Hi,

I have an ASP.Net app.

I use <authenticati on mode="Windows" /> to detect if a
user has the rights to access certain pages.

If they do not have access they get an error stating
Access Denied 401.2 and I have a Custom Error Page for
this.

If the user does not have access a Windows Logon box is
displayed. If they enter their details 3 times they get
redirected to my Custom Error Page stating Access is
denied.

If they click on Cancel first the same error number is
diaplayed 401.2 Yet they do not get my custom error page.
They get the standard IIS Error Page.

If I try to log in 3 times I get Access Denied. If
subsequently click on Cancel during the same Session I get
my Custom Error Page.

However, if I click on Cancel first I do not get my custom
error page. Instead I get the IIS error page.

Any ideas ?

Here is the settings from my web.config

<authenticati on mode="Windows" />
<location path="secure/images">

<system.web>

<authorizatio n>

<allow users="*" />

</authorization>

</system.web>

</location>

<location path="secure/include_files">

<system.web>

<authorizatio n>

<allow users="*" />

</authorization>

</system.web>

</location>

<location path="secure/Defeasance.css" >

<system.web>

<authorizatio n>

<allow users="*" />

</authorization>

</system.web>

</location>

<location path="secure">

<system.web>

<authorizatio n>

<allow users="mydomain \mylogin" />

<deny users="*" />

</authorization>

</system.web>

</location>

Thanks,
C.
Jul 21 '05 #1
0 2642

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

Similar topics

7
4742
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 and is defined in an assembly common to the client and server components. The custom class merely defines three (3) constructors -- the null constructor; one with a string parameter; and one with a string and innner exception parameter -- that...
3
4900
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application. -------------------------------------------------------------------------------- Runtime Error Description: An application error occurred on the server. The current
2
1518
by: Jarod_24 | last post by:
I Created a .config file for my Web application and named it "Settings.config" The file contains some settings for the application, including a connection string to a database. But i don't see how a System.Configuration. class finds the file. I expected to be doing something like this:
0
1656
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 is configured to utilise a custom errors page, in that unhandled exceptions get passed through and the page redirects correctly as per the settings in the web.config file and Global.asax. This works in 95% or so of cases, however... On...
4
13603
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 instead i keep getting a RUN TIME error below: Any ideas.. Runtime Error
5
2534
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called "Enlighten.LinkMad.Businesslogic". In one of my frontend websites I use this type to authenticate a user who is trying to login. The following excerpt is from the web.config of the particular site showing the reference to the custom provider, allowing .Net to do...
8
3627
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 site I FTP'd to has .Net Framework 2.0 installed. I got this error when I tried to open the site: Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details...
0
1575
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 access to a single Windows User Group like this (in web.config): <authorization> <allow roles="Domain\UserGroup" />
3
1586
by: Laser Lu | last post by:
Hello, everybody, In order to avoid making web.config lengthy, I just moved some custom configuration settings out from web.config, and centralized them into an xml file, which names data.config. It works fine except for one thing that the custom configuration file has a poor change awareness. Custom configuration settings can not be refreshed after the data.config file was modified. I wish the custom data.config file can works like the...
1
2055
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 raising (passwordchange), and can see it beign raised successfully...just it seems to go nowhere. I have run aspnet_regsql to setup the database to handle event recording. I am fairly sure I am missing something in my web.config file. (I would...
0
8294
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
8816
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
8709
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
8494
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
8596
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
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
6162
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
5627
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
4297
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.