This is because the Custom Error you configure in IIS is not applied
nor accepted by all applications running on IIS. This hybrid approach
gives a great deal of power/control to the applications, but it can
also frustrate system administrators who want to have consistent
Custom Errors returned by all the applications running on the web
server.
This represents a constant struggle between the System Administrator
and the Application Developer with IIS stuck in the middle, and IIS
makes various tradeoffs favoring one side or the other. What is clear
is that you often cannot make both parties happy at the same time with
any configuration.
When you don't provide the correct username/password to even login,
IIS Custom Errors take effect, partly because the Application isn't
even invoked yet (IIS has to first authenticate correctly, THEN
execute Application using that logon identity). System Administrators
get their day at the expense of Application control. Now, some
Application Developers want to control those error cases as well and
handle it programmatically, and it possible to configure IIS to do so.
Thus, Application Developers can also get their way at the expense of
System Administrator. The battle continues... and who gets the last
technical word? System Administrators, who may not allow such
configuration by the Developer.
When you provide a correct username/password to login, the Application
and its configuration takes over, so when the user fails to
subsequently access resources as the application, you get the
application-defined Custom Errors -- IIS knows nothing about access
issues at this point since it has transferred control to the
application. Thus, Application Developers get full control, and there
is no way for System Administrator to insert their desired Custom
Errors. Now, it is also possible for System Administrators to force
Application Developers to use a standardized Custom Error output
module, which the System Administrator can control with Custom Error
configuration, but there is no assurances that the developer follows
such rules unless there is friendship or external political pressure.
As you can see, this is really a cat-and-mouse game between the System
Administrator and Application Developer, and there is no definitive
"winner" by default.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
> Thanks Bernard,
>
[quoted text clipped - 99 lines]
>
> - Show quoted text -
Chris - 30 Jul 2008 10:17 GMT
Great response David.
The odd thing is, though, we get the correct application / developed error
page if a random username is tried. But if we use a username that's on the
server (yet doesnt have access to the site, yet we try to login anyway) we
get the IIS custom error. So, does work, but if a system username is used it
doesn't. Does that make sense?
Thanks
Chris
> This is because the Custom Error you configure in IIS is not applied
> nor accepted by all applications running on IIS. This hybrid approach
[quoted text clipped - 146 lines]
> >
> > - Show quoted text -
David Wang - 30 Jul 2008 12:37 GMT
There is nothing odd with the behavior. Only not-yet-understood
behavior and not-yet-understood server configuration.
Now, your claim of oddity is exactly OPPOSITE of what you originally
claimed. Which claim is true?
In either case, it's all explainable.
Suppose the opposite of your original claim is true --
If you use a random username and get an application error page, then
either a non-IIS authentication method is happening, or the browser is
auto-logging-in with another identity. The only other explanation is
if IIS ignores the random username/password and executed the
application code anyways, and that would be a major security flaw in
IIS of the magnitude that no one else in the world has reported...
If you use a system username and get an IIS error page, then IIS
successfully authenticated using that user, and the handler may be
integrated to read and show IIS custom errors (the integration is
possible with the HSE_REQ_SEND_CUSTOM_ERRORS ISAPI
ServerSupportFunction)
In short, the behavior that you really want is not possible.
Applications will never be able to control and customize all possible
HTTP Errors returned from IIS -- there is a well-known list of non-
customizable HTTP.SYS and IIS custom HTTP error codes. And if the
error happens in request execution prior to Application execution, the
error response is also non-customizable.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
> Great response David.
>
[quoted text clipped - 160 lines]
>
> - Show quoted text -
Chris - 30 Jul 2008 14:03 GMT
David,
You're right...my original query was correct. It was about a month ago when
we tried playing with the errors. Thanks for your help. Great info!!
Chris
> There is nothing odd with the behavior. Only not-yet-understood
> behavior and not-yet-understood server configuration.
[quoted text clipped - 195 lines]
> >
> > - Show quoted text -