.NET Samples - How To: Security
This section includes the following samples:
CodeIdentityDemand Sample
RequestPermission Sample
WindowsIdentityCheck Sample
CodeIdentityDemand Sample
This sample describes how to control access to an assembly (or individual method within an assembly) using code access security.
Link to the online sample documentation
Link to the online sample source code
Namespaces used in this sample:
(none)
Classes used in this sample:
(none)
RequestPermission Sample
This sample illustrates using permissions and policy to read Windows environment variables.
Link to the online sample documentation
Link to the online sample source code
Namespaces used in this sample:
(none)
Classes used in this sample:
(none)
WindowsIdentityCheck Sample
This sample uses both WindowsPrincipal and PrincipalPermission to verify that a user is in a given Windows NT group.
Link to the online sample documentation
Link to the online sample source code
Namespaces used in this sample:
(none)
Classes used in this sample:
(none)