I created a new ASP.NET MVC application with .NET 4.5. I have successfully installed authentication using STS. The authentication flow is working fine, and I can get the ClaimsIdentity containing the required statements in Thread.CurrentPrincipal.
Now I need a bootstrap token to protect calls at my service level. I set saveBootstrapContext to true in the identityConfiguration element.
<system.identityModel> <identityConfiguration saveBootstrapContext="true">
However, the BootstrapContext property on ClaimsIdentity is always null.
var identity = Thread.CurrentPrincipal.Identity as ClaimsIdentity; var context = identity.BootstrapContext;
Am I missing something? It should have been simple :(
----------- Allowed ------------
This problem is resolved after rebooting my system. Please note that after iisreset it was not allowed. Later I changed the configuration to use Microsoft.IdentityModel instead of System.IdentityModel. I was able to reproduce this behavior. After the next reboot, I was able to get the bootstrap token again. Does anyone else experience the same behavior?
source share