Identity
Identity copied to clipboard
SecurityException: Unable to retrieve security descriptor for this frame.
Getting this below error in my ASP.Net Core 1.1 app/IIS 8.
Tried to impersonate @ middleware level but ran into various issues, so trying to impersonate as a actual windows user instead of IIS app pool user @ the controller level.
Have this below code in my controller
public class SearchController : Controller
{
.......
var winIdent = HttpContext.User.Identity as WindowsIdentity;
if (winIdent != null)
{
WindowsIdentity.RunImpersonated(winIdent.AccessToken, () =>
{
numMatches = shim.GetNumMatches(scm);
});
}
.................
}
Error: SecurityException: Unable to retrieve security descriptor for this frame.
Any help will be appreciated.;
This issue was moved to dotnet/cli#7502