Security Sample
Visual Studio .NET 2003
This sample shows how to modify security permissions through permission classes and permission attributes.
This sample contains the source code for the Security Tutorial.
Building and Running the Sample Within Visual Studio
To build and run the Security samples
- Open the solution (Security.sln).
- In Solution Explorer, right-click the Security1 project and click Set as StartUp Project.
- From the Debug menu, click Start Without Debugging.
- Repeat the preceding steps for Security2 and Security3.
Building and Running the Sample from the Command Line
To build and run the Security samples
- Use the Change Directory command to change to the Security1 directory.
- Type the following:
csc ImperativeSecurity.cs ImperativeSecurity
- Use the Change Directory command to change to the Security2 directory.
- Type the following:
csc DeclarativeSecurity.cs DeclarativeSecurity
- Use the Change Directory command to change to the Security3 directory.
- Type the following:
csc SuppressSecurity.cs SuppressSecurity