Accessing Identity.AuthenticationType

Posted by Tewr on Stack Overflow See other posts from Stack Overflow or by Tewr
Published on 2010-05-10T15:50:52Z Indexed on 2010/05/10 15:54 UTC
Read the original article Hit count: 225

Filed under:
|
|
|

While implementing a custom authentication type in a wcf service, I'm trying to read the property IIdentity.AuthenticationType using the call Thread.CurrentPrincipal.Identity.AuthenticationType.

Unless the account running the service is local administrator, UnauthorizedAccessException is thrown when accessing this property, much like described in this support thread. I can however reset the Thread.CurrentPrincipalobject without hassle, thus altering the Authentication Type - But read it, I cannot.

Is running as an administrator the only way here or is there some trick to let the user running the service "just" access this property?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about authentication