Detecting authentication mode

  • Thread starter Thread starter Strange Cat
  • Start date Start date
S

Strange Cat

Hi everyone

I have a small app that can run with both forms and windows authentication
(depending on what is set in web.config).

I'd like to know from code which of the authentication modes was set in
web.config, is this possible?

I tried using WindowsPrincipal.AuthenticationMode, but it always gives
"NTLM" regardless of what is set in web.config (that's because IIS detects
and authenticates the windows user, if it can do it, i bet).

Thanx in advance

ASC
 
Try using Context.User.Identity.AuthenticationType instead.
[CUT]

Thanx Michael, works ok!

Bye

ASC
 
Back
Top