Skip to content

WindowsIdentity references .NET Framework code and has bad example code #10927

Open
@ppena-LiveData

Description

@ppena-LiveData

Type of issue

Code doesn't work

Description

The .NET CoreWindowsIdentity documentation has various places that link to the .NET Framework WindowsImpersonationContext class that does not exist in .NET Core, and the example code is copied verbatim from the .NET Framework version of WindowsIdentity's doc, which would not work or even compile, since it references an Impersonate() method, which as far as I can tell is only in the .NET Framework version of WindowsIdentity, not in the .NET Core version of it.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.security.principal.windowsidentity?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Security.Principal/WindowsIdentity.xml

Document Version Independent Id

b7498a9d-cecb-02e5-9865-e690bbaa9225

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.SecurityIssues related to security practices for .NET developers.untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions