customError - 401.2 Access Denied

Discussion in 'ASP .Net Security' started by Mark, May 25, 2004.

  1. Mark

    Mark Guest

    I'd like to avoid displaying the nasty built-in ASP.NET error for a 401.2,
    access denied. We're using windows authentication. The error message that
    is displayed by default is printed below. I'd love for it to redirect to
    the 401-2_access_denied.htm file I've created in the root of my web site.
    The text below is from my web.config file.

    <customErrors defaultRedirect="error.htm" mode="On">
    <error statusCode="401.2" redirect="401-2_myfile.htm"/>
    </customErrors>

    1. I've tried a statusCode of 401, 401-2, and 401.2.
    2. I've tried absolute and relative paths to the .htm file. Relative should
    work just fine as the web.config and .htm file are both in the root of the
    site.
    3. IIS custom errors do not appear to be leveraged whatsoever in this
    situation when modified. This is further demonstrated by the fact that the
    error message below doesn't jive with the default value for 401.2 in IIS
    Custom Errors.

    Suggestions?

    Thanks in advance.
    Mark

    *** ASP.NET ERROR ***

    Access is denied.
    Description: An error occurred while accessing the resources required to
    serve this request. The server may not be configured for access to the
    requested URL.

    Error message 401.2.: You do not have permission to view this directory or
    page using the credentials you supplied. Contact the Web server's
    administrator for help.
     
    Mark, May 25, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    693
    Jan Tielens
    Jan 3, 2004
  2. Daniel Bass
    Replies:
    5
    Views:
    5,499
    shijobaby
    Feb 6, 2010
  3. Mark
    Replies:
    3
    Views:
    7,430
    Natty Gur
    May 26, 2004
  4. Rich
    Replies:
    1
    Views:
    724
    =?Utf-8?B?RXNraW1v?=
    May 26, 2005
  5. Alex Washtell via .NET 247

    Web Service + Anon Access, but getting 401 Access Denied Error

    Alex Washtell via .NET 247, Apr 5, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    198
    Mauro Ottaviani [MSFT]
    Apr 5, 2005
Loading...

Share This Page