Windows authentication Redirect /CustomErrors Issue

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Windows authentication Redirect /CustomErrors Issue

    I am using asp.net (1.1) and am setting application security in web.config using:
    <customErrors mode="On" defaultRedirect="Denied.htm"><error statusCode="401" redirect="Denied.htm" /><error statusCode="403" redirect="Denied.htm" /></customErrors

    If I try to authenticate with invalid credentials more than 4 times, the page redirects to Denied.htm as it should, but if I click on "Cancel" instead of "Ok" on the login prompt box, I get redirected to an ASP.Net page that looks like this
    > Server Error in '/munkeys/WindowsAuth' Application
    >-------------------------------------------------------------------------------->>>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
    I have tried to set the Custom Error pages for all 401 errors in IIS and the page still will not redirect to my custom error page as specified in both IIS and Web.config. Please Help



    Ivan Smith Guest

  2. Similar Questions and Discussions

    1. CF - windows authentication issue
      In the process of upgrading company intranet from Windows 2000 server w/ Coldfusion 4.0 (GASP!) to Windows 2003 server w/ Coldfusion MX 6.1... ...
    2. Redirect fails with Forms Authentication
      Geezuz, I feel like a fool but I can't get this SIMPLE redirect out of IIS to hit my login page. Here's the Web.Config code: <authentication...
    3. Redirect to default page using Windows Authentication
      Hi, Is there a way to redirect the user to a default, anonymous, welcome or "splash" page for our application when using Windows authentication...
    4. User Session issue with ASP.NET Forms authentication & Windows 2003
      Hi, I first posted this query in just the aspnet ng but didn't get a reply so I'm posting here (probably more appropriate) Hope one of you guys...
    5. Forms Authentication - Does Not Redirect
      Elmo, Perhaps you are missing the "allow" child node in your web.config file? <authorization> <deny users="?" /> <!-- denies anonymous access...
  3. #2

    Default Re: Windows authentication Redirect /CustomErrors Issue

    Have you tried adding '<error statusCode="401.2" redirect="Denied.htm" />'?

    --
    Eric Marvets
    Principal Consultant

    the bang project

    <shameless self promotion>

    Email [email]sales@bangproject.com[/email] for Information on Our Architecture and
    Mentoring Services

    </shameless self promotion>

    "Ivan Smith" <anonymous@discussions.microsoft.com> wrote in message
    news:59DD27BC-61A9-463D-9809-374D02894EEB@microsoft.com...
    > I am using asp.net (1.1) and am setting application security in web.config
    using:
    > <customErrors mode="On" defaultRedirect="Denied.htm"><error
    statusCode="401" redirect="Denied.htm" /><error statusCode="403"
    redirect="Denied.htm" /></customErrors>
    >
    > If I try to authenticate with invalid credentials more than 4 times, the
    page redirects to Denied.htm as it should, but if I click on "Cancel"
    instead of "Ok" on the login prompt box, I get redirected to an ASP.Net page
    that looks like this:
    >
    > > Server Error in '/munkeys/WindowsAuth' Application.
    >
    >---------------------------------------------------------------------------
    ----->>>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.
    >
    > I have tried to set the Custom Error pages for all 401 errors in IIS and
    the page still will not redirect to my custom error page as specified in
    both IIS and Web.config. Please Help!
    >
    >
    >
    >

    Eric Marvets Guest

  4. #3

    Default Re: Windows authentication Redirect /CustomErrors Issue

    tried <error statusCode="401.2" redirect="Denied.htm" />, but that didn't work either. Thanks for your suggestion though.
    Ivan Smith Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139