Share via


SecureString Application Sample

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

This sample demonstrates uses of the SecureString class.

For information about using the samples, see the following topics:

To build the sample using the command prompt

  1. Open the Command Prompt window and navigate to one of the language-specific subdirectories under the SecureStringConsoleDemo directory. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.

  2. Type msbuild SecureStringConsoleDemoCS.sln or msbuild SecureStringConsoleDemoVB.sln, depending on your choice of programming language, from one of the language-specific subdirectories.

To build the sample using Visual Studio

  1. Open Windows Explorer and navigate to one of the language-specific subdirectories under the SecureStringConsoleDemo directory.

  2. Double-click the SecureStringConsoleDemoCS.sln file or SecureStringConsoleDemoVB.sln file, depending on your choice of programming language, to open the file in Visual Studio.

  3. On the Build menu, click Build Solution.

To run the sample

  1. Navigate to the directory that contains the new executable in Windows Explorer.

  2. Double-click the SecureStringConsoleDemo.exe file to open it from Windows Explorer.

Remarks

The sample includes two files, doctorFile.txt and nurseFile.txt, that allow you to test the capabilities of type SecureString. Both files contain instructions for creating a user account, NurseA, on your computer, and for permitting or denying access to doctorFile.txt and nurseFile.txt. Follow these instructions, then log onto your computer under the new user account. NurseA should be permitted access to nurseFile.txt, but denied access to doctorFile.txt.

See Also

Reference

SecureString