Identity icon indicating copy to clipboard operation
Identity copied to clipboard

SecurityException: Unable to retrieve security descriptor for this frame.

Open valcs007 opened this issue 9 years ago • 1 comments

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.;

valcs007 avatar Aug 07 '17 23:08 valcs007

This issue was moved to dotnet/cli#7502

blowdart avatar Aug 23 '17 19:08 blowdart