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?