This documentation is archived and is not being maintained.
UserActivationMode Enumeration
Visual Studio 2008
Specifies the type of user Rights Account Certificate to request for rights management activation.
Assembly: WindowsBase (in WindowsBase.dll)
Used as a parameter to the Create method of a SecureEnvironment, UserActivationMode specifies to request either a Temporary or Permanent Rights Account Certificate.
The following example shows how to use this enumeration to create a SecureEnvironment.
string applicationManifest = "<manifest></manifest>"; if (File.Exists("rpc.xml")) { StreamReader manifestReader = File.OpenText("rpc.xml"); applicationManifest = manifestReader.ReadToEnd(); } if (_secureEnv == null) { if (SecureEnvironment.IsUserActivated(new ContentUser( _currentUserId, AuthenticationType.Windows))) { _secureEnv = SecureEnvironment.Create( applicationManifest, new ContentUser( _currentUserId, AuthenticationType.Windows)); } else { _secureEnv = SecureEnvironment.Create( applicationManifest, AuthenticationType.Windows, UserActivationMode.Permanent); } }
For the complete example, see the Rights Managed Package Publish Sample.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: