UserActivationMode Enumeration
.NET Framework 3.0
Specifies the type of user Rights Account Certificate to request for rights management activation.
Namespace: System.Security.RightsManagement
Assembly: WindowsBase (in windowsbase.dll)
Assembly: WindowsBase (in windowsbase.dll)
Used as a parameter to the Create method of a SecureEnvironment, UserActivationMode specifies to request either a Temporary or PermanentRights 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: