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

  1. #1

    Default catch 401.2 error

    Dear collegues!

    I am trying to create a single Login Application, that can either
    authenticate against a database or against ADSI. Intenal users
    can have both an NT Account and anotherone (AppAccount)
    in the database (as clients would normaly have) and should be
    able to decide which one to use. However (you know how
    clients are) should an automatic authentication against ADSI
    be tried at first.

    So I created 2 web forms Login.aspx (Anonymous Access)
    and LoginNtlm.aspx (Integrated Security)

    First the user hits Login.aspx, where I check his IP address to
    see if the request comes from within my network (in this case
    I can be sure, that the user is not a client and therefore has
    an ADSI account) or from outside (user can be an employee
    or client).

    If the user comes from outside Login.aspx is displayed and the
    user can authenticate against the database or click on a link to
    LoginNtlm.aspx to authenticate against ADSI.

    If the request is internal the user is automaticaly redirected to
    LoginNtlm.aspx. If the user has configured his browser as we
    expect it he will be prompted to enter his NT credentials. If the
    user decides not to use his NT account, but instead wants to
    enter with his AppAccount (for special purposes or test purposes)
    he should be able to click Cancel and then be redirected to the
    Login.aspx.

    My problem now is, that I didn't find a way to catch the 401.2 error
    on LoginNtlm.apsx to be able to redirect the usere as required,

    best regards

    Sascha



    Alexander Stojakovic Guest

  2. Similar Questions and Discussions

    1. global catch error?
      Hi, is it possible to catch ALL uncatched errors of my application? I want to have the possibility to show my own error dialog for all errors...
    2. #39157 [NEW]: can't catch simplexml error
      From: xing at mac dot com Operating system: linux PHP version: 5.1.6 PHP Bug Type: SimpleXML related Bug description: can't...
    3. catch loadMovie error?
      Howdy, it's a "newbie to Flash" question.. sorry! I am using the loadMovie() action but need to be able to catch errors e.g. If the jpg/swf I...
    4. catch an 401.2 error
      Dear collegues! I am trying to create a single Login Application, that can either authenticate against a database or against ADSI. Intenal users...
    5. Error.pm -- trying to catch multiple exceptions
      In article <g261ivc6640q7u116t0cg7fts0mfkv8fmk@4ax.com>, ed <coo_t2-NO-LIKE-SPAM@yahoo.com> writes: That's the way it's supposed to work. An...
  3. #2

    Default Re: catch 401.2 error

    Sorry for the double-post,

    best regards

    Sascha


    Alexander Stojakovic Guest

  4. #3

    Default Re: catch 401.2 error

    Hi Alexander
    Did you try to configure the catch in the IIS?
    try to put your custom page in the IIS on the error 401.2
    "Alexander Stojakovic" <stojakovic@hotmail.com> wrote in message
    news:eaVTy1yjDHA.1004@tk2msftngp13.phx.gbl...
    > Dear collegues!
    >
    > I am trying to create a single Login Application, that can either
    > authenticate against a database or against ADSI. Intenal users
    > can have both an NT Account and anotherone (AppAccount)
    > in the database (as clients would normaly have) and should be
    > able to decide which one to use. However (you know how
    > clients are) should an automatic authentication against ADSI
    > be tried at first.
    >
    > So I created 2 web forms Login.aspx (Anonymous Access)
    > and LoginNtlm.aspx (Integrated Security)
    >
    > First the user hits Login.aspx, where I check his IP address to
    > see if the request comes from within my network (in this case
    > I can be sure, that the user is not a client and therefore has
    > an ADSI account) or from outside (user can be an employee
    > or client).
    >
    > If the user comes from outside Login.aspx is displayed and the
    > user can authenticate against the database or click on a link to
    > LoginNtlm.aspx to authenticate against ADSI.
    >
    > If the request is internal the user is automaticaly redirected to
    > LoginNtlm.aspx. If the user has configured his browser as we
    > expect it he will be prompted to enter his NT credentials. If the
    > user decides not to use his NT account, but instead wants to
    > enter with his AppAccount (for special purposes or test purposes)
    > he should be able to click Cancel and then be redirected to the
    > Login.aspx.
    >
    > My problem now is, that I didn't find a way to catch the 401.2 error
    > on LoginNtlm.apsx to be able to redirect the usere as required,
    >
    > best regards
    >
    > Sascha
    >
    >
    >

    Stefan Guest

  5. #4

    Default Re: catch 401.2 error

    Stefan,

    thanks for your reply!

    Yes, I tried that. I set the URL for the 401.2 error to '/Login.aspx'
    in the Custom Errors-Tab of my Login.aspx. All I receive is an
    empty web page saying 'Error: Access is Denied.' but not my
    Login.aspx. Either I did something wrong or that's not the way to
    do it,

    best regards

    Sascha


    "Stefan" <shogun@steffsworld.ch> wrote in message
    news:OfiUpQzjDHA.360@TK2MSFTNGP10.phx.gbl...
    > Hi Alexander
    > Did you try to configure the catch in the IIS?
    > try to put your custom page in the IIS on the error 401.2
    > "Alexander Stojakovic" <stojakovic@hotmail.com> wrote in message
    > news:eaVTy1yjDHA.1004@tk2msftngp13.phx.gbl...

    Alexander Stojakovic 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