Quantcast
Viewing all articles
Browse latest Browse all 1612

Claims did not set after changing wcf from http to https

Recently, we changed wcf service from http to https. After this, we are unable to set claims. It is set in that method, once we come out of the method, we lose it.

Below is the code to set claims. It works fine with http but fails with https.

var claimsIdentity = new List<ClaimsIdentity>{    new ClaimsIdentity(        new List<Claim>        {            new Claim(Name, securityToken.LoginName),            new Claim(TenantId, securityToken.TenantID)        })};//set context and thread principalSystem.Threading.Thread.CurrentPrincipal = new ClaimsPrincipal(claimsIdentity);

If I add < serviceAuthorization principalPermissionMode="None" /> in serviceBehavior in wcf configuration file, it again works. Is there any security concern with this?


Viewing all articles
Browse latest Browse all 1612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>