iis - Unable to get authenticationType in ASP.NET Core Web API -
i'm writing simple asp.net core web api needs return "true" if authentication type of logged in user "kerberos", , "false" otherwise. code works is:
public ienumerable<string> get() { if(user?.identity?.isauthenticated == true) { return new string[] { "true" }; } return new string[] { "false" }; }
however, if change "isauthenticated" "authenticationtype" , check string value "kerberos" follows:
public ienumerable<string> get() { if(user?.identity?.authenticationtype == "kerberos") { return new string[] { "true" }; } return new string[] { "false" }; }
then starts throwing error 500 if run on windows server 2012 r2 based iis server. if run within visual studio (on localhost - domain-joined windows 10 machine), produces right result.
what doing wrong?
Comments
Post a Comment