Export (0) Print
Expand All

Security (How Do I in C#) 

This page links to help on widely used security and deployment tasks. To view other categories of popular tasks covered in Help, see How Do I in C#.

Security In Visual Studio

Provides an understanding of secure coding techniques.

Code Access Security Basics

Provides code access security concepts in order to write effective applications targeting the common language runtime.

Microsoft Security Developer Center

Provides up-to-date security issues that help you develop secure code..

New Technologies Help You Make Your Web Services More Secure

Explains the importance of good security and its effect on Web Services.

Determining When to Use Windows Installer Versus XCOPY

Examines and compares two approaches for deploying Microsoft .NET applications: the DOS XCOPY command, and the Microsoft Windows Installer technology.

Security Policy Best Practices

Explains basic administration concepts and describes some of the best practices to use when administering code access security policy.

How to: Use Data Protection

Provides procedures to encrypt or decrypt in-memory data or a file or stream using data protection.

How to: Add Custom Permissions to Security Policy

Provides a procedure to add a custom permission to security policy.

How to: Enable Internet Explorer Security Settings for Managed Execution

Provides a procedure to enable Internet Explorer security settings.

How to: Request Minimum Permissions by Using the RequestMinimum Flag

Provides an example that requests FileIOPermission using the RequestMinimum flag.

How to: Create GenericPrincipal and GenericIdentity Objects

Provides an example on how to use the GenericIdentity class in conjunction with the GenericPrincipal class to create an authorization scheme that exists independent of a Windows NT or Windows 2000 domain.

How to: Create a WindowsPrincipal Object

Provides two ways to create a WindowsPrincipal object, depending on whether code must repeatedly perform role-based validation or must perform it only once.

How to: Perform Imperative Security Checks

Provides an example that uses an imperative check to ensure that a GenericPrincipal matches the PrincipalPermission object.

How to: Refuse Permissions by Using the RequestRefuse Flag

Provides an example that uses RequestRefuse to refuse FileIOPermission from the common language runtime security system.

How to: Request Permission to Access Unmanaged Code

Provides an example that shows how to request permission to access unmanaged code.

How to: Request Permission for a Named Permission Set

Provides an example that shows the syntax to request permission for a named permission set.

How to: Request Optional Permissions by Using the RequestOptional Flag

Provides an example that requests FileIOPermission using the SecurityAction.RequestOptional flag, indirectly refusing all other permissions.

How to: Store Asymmetric Keys in a Key Container

Demonstrates how to create an asymmetric key, save it in a key container, retrieve the key at a later time, and delete the key from the container.

How to: Add Assemblies to Security Policy Using Caspol.exe

Explains how to add an assembly that implements a custom security object to the fully trusted assembly list.

How to: View Code Groups Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to view a simple list of code groups belonging to a policy level, or a list that includes the names and descriptions of the code groups.

How to: Modify Permissions in a Permission Set

Explains how to use the .NET Framework Configuration tool (Mscorcfg.msc) to modify a permission in a permission set.

How to: Add Permissions to a Permission Set

Explains how to use the.NET Framework Configuration tool (Mscorcfg.msc) to add a permission to a permission set.

How to: Suppress Policy Change Warnings Using Caspol.exe

Explains how to Suppress Policy Change Warnings Using Caspol.exe.

How to: Change Membership Conditions for a Code Group

Explains how to use Mscorcfg.msc to change membership conditions in relation to code groups.

How to: View Code Groups and Permission Sets Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to list all the code groups an assembly belongs to.

How to: Administer Security Policy for Nondefault Users Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to administer a user policy for a user other than the current user.

How to: Change Permission Sets Associated with an Existing Code Group

Explains how to use Mscorcfg.msc to change permission sets.

How to: Analyze Problems with Assembly Permissions Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to troubleshoot problems that might cause an assembly to not run or to access protected resources or run when it should not.

How to: View Permission Sets Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to list the permission sets belonging to all policy levels or to a single policy level.

How to: Undo Policy Changes Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to recover the last machine, user, or enterprise policy before the change was made.

How to: Import a Permission by Using an XML File

Provides an example that shows how the information for a permission might appear in the XML file.

How to: Return to the Default Security Policy Settings Using Caspol.exe

Explains how to return to the Default Security Policy Settings Using Caspol.exe.

How to: Add Code Groups Using Caspol.exe

Explains how to add code groups using Caspol.exe.

How to: Override the Caspol.exe Self-Protection Mechanism

Explains how to override the self-protection mechanism, if necessary.

How to: Create Code Groups

Explains how to create code groups using Mscorcfg.msc.

How to: Disable Concurrent Garbage Collection

Explains how to use the <gcConcurrent> element to specify how the runtime should run garbage collection.

How to: Import a Code Group by Using an XML File

Provides an example that shows how information for a code group and its associated membership condition and permission set might appear in an XML file.

How to: Create a Publisher Policy

Provides an example that shows a publisher policy file that redirects one version of myAssembly to another.

How to: Remove Code Groups Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to remove code groups from code group hierarchies.

How to: Create a Channel Template in a Configuration File

Provides an example that shows how to create a channel template in a configuration file.

How to: Change Permission Sets Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to replace the original permission set with the new set specified in the XML file.

How to: Remove Permission Sets

Explains how to use the .NET Framework Configuration tool (Mscorcfg.msc) to remove a permission set at a particular level.

How to: Create Permission Sets

Explains how to use the .NET Framework Configuration tool (Mscorcfg.msc) to create a permission set for a particular level and associate it with a new or existing code group.

How to: Make Code Groups Exclusive or Level Final

Explains how to use Mscorcfg.msc to make the new code group exclusive or level final.

How to: Add an Assembly to the Policy Assemblies List

Explains how to use the .NET Framework Configuration tool (Mscorcfg.msc) to add the assembly to the fully trusted assembly list.

How to: Import a Permission Set by Using an XML File

Provides an example that shows a permission set and a permission inside an XML file.

How to: Locate Assemblies by Using DEVPATH

Provides an example that shows how to cause the runtime to search for assemblies in directories specified by the DEVPATH environment variable.

How to: Register a Server-Activated Object and a Client-Activated Object for a Host Application Domain

Provides an example that shows how to register a server-activated object and a client-activated object for a host application domain.

How to: View Security Policy Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to view the security policy code group hierarchy, and a list of known permission sets for all policy levels or for a single policy level.

How to: Add Permission Sets Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to add permission sets to a code group.

How to: Change Code Groups Using Caspol.exe

Explains how to use the –chggroup option of the Code Access Security Policy tool (Caspol.exe) to change the name, membership condition, permission set, flags, or description of a code group.

How to: Configure Channels

Provides an example that shows how to build an HttpChannel with a name that is different from "http" and use it for a server application.

How to: Turn Security On and Off Using Caspol.exe

Explains how to use the Code Access Security Policy tool (Caspol.exe) to turn security on and off.

How to: Remove Permissions from a Permission Set

Explains how to use the .NET Framework Configuration tool (Mscorcfg.msc) to remove a permission from a permission set.

How to: Perform Common Security Policy Tasks Using the .NET Framework Configuration Tool (Mscorcfg.msc)

Explains how to use the .NET Framework Configuration tool (Mscorcfg.msc) to configure security policy to suit your needs.

Microsoft Security Developer Center

Contains many articles and resources on developing secure applications.

Visual Studio 2005 Developer Center

Contains many articles and resources on developing applications using Visual Studio 2005. This site is updated regularly with new content.

Visual C# Developer Center

Contains many articles and resources on developing C# applications. This site is updated regularly with new content.

Microsoft .NET Framework Developer Center

Contains many articles and resources on developing and debugging .NET Framework applications. This site is updated regularly with new content.

Community Additions

ADD
Show:
© 2015 Microsoft