Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > catch 401.2 error

Reply
Thread Tools

catch 401.2 error

 
 
Alexander Stojakovic
Guest
Posts: n/a
 
      10-10-2003
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



 
Reply With Quote
 
 
 
 
Alexander Stojakovic
Guest
Posts: n/a
 
      10-10-2003
Sorry for the double-post,

best regards

Sascha


 
Reply With Quote
 
 
 
 
Stefan
Guest
Posts: n/a
 
      10-10-2003
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
>
>
>



 
Reply With Quote
 
Alexander Stojakovic
Guest
Posts: n/a
 
      10-11-2003
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:...



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
catch doesn't catch a thrown exception Marteno Rodia Java 5 08-05-2009 03:30 AM
How to catch error 401 access denied and redirect to custom error page ? rote ASP .Net 4 08-04-2008 07:27 PM
catch(...) doesn't catch everything Adam C++ 9 02-02-2006 05:02 PM
why catch (...) can not catch such exception John Black C++ 8 08-20-2004 02:34 PM
Error by Catch =?Utf-8?B?UGFwcmkgQ2hha3Jhdm9ydHk=?= MCSD 1 05-20-2004 05:01 PM



Advertisments
 



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