catch 401.2 error

Discussion in 'ASP .Net Security' started by Alexander Stojakovic, Oct 10, 2003.

  1. 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, Oct 10, 2003
    #1
    1. Advertising

  2. Sorry for the double-post,

    best regards

    Sascha
     
    Alexander Stojakovic, Oct 10, 2003
    #2
    1. Advertising

  3. Alexander Stojakovic

    Stefan Guest

    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" <> wrote in message
    news:...
    > 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, Oct 10, 2003
    #3
  4. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
     
    Alexander Stojakovic, Oct 11, 2003
    #4
    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. sck10

    Can't catch the error: HTTP 401.2

    sck10, Apr 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,903
    Steven Cheng[MSFT]
    Apr 30, 2005
  2. John Black
    Replies:
    8
    Views:
    4,212
    Xenos
    Aug 20, 2004
  3. Adam
    Replies:
    9
    Views:
    609
    red floyd
    Feb 2, 2006
  4. rote
    Replies:
    4
    Views:
    1,782
    Alexey Smirnov
    Aug 4, 2008
  5. Alexander Stojakovic

    catch an 401.2 error

    Alexander Stojakovic, Oct 10, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    123
    Alexander Stojakovic
    Oct 10, 2003
Loading...

Share This Page