public static Oid2 Register(
string value,
string friendlyName,
OidGroup group,
bool writeInDirectory,
CultureInfo localeId,
string cpsUrl = null
)
Public Shared Function Register (
value As String,
friendlyName As String,
group As OidGroup,
writeInDirectory As Boolean,
localeId As CultureInfo,
Optional cpsUrl As String = Nothing
) As Oid2
public:
static Oid2^ Register(
String^ value,
String^ friendlyName,
OidGroup group,
bool writeInDirectory,
CultureInfo^ localeId,
String^ cpsUrl = nullptr
)
static member Register :
value : string *
friendlyName : string *
group : OidGroup *
writeInDirectory : bool *
localeId : CultureInfo *
?cpsUrl : string
(* Defaults:
let _cpsUrl = defaultArg cpsUrl null
*)
-> Oid2
Permissions: for this method to succeed, the caller must be a member of the local administrators group (if writeInDirectory is set to False) or be a member of Enterprise Admins group or has delegated write permissions on the OID container in Active Directory. OID container location is CN=OID, CN=Public Key Services, CN=Services,CN=Configuration, {Configuration naming context}.
A newly registered OID is not resolvable by an application immediately. You may need to restart an application to allow new OID lookup.
When writeInDirectory is set to True, group parameter is limited only to one of the following value: ApplicationPolicy,IssuancePolicy and CertificateTemplate. Other OID groups are not allowed to be stored in Active Directory.
ArgumentNullException | value and/or friendlyName is null or empty. |
ArgumentException | Specified OID group is not supported. See Remarks section for more details. |
InvalidDataException | value parameter is not object idnetifier value. |
NotSupportedException | A caller chose OID registration in Active Directory, however, the current computer is not a member of any Active Directory domain. |
InvalidOperationException | An object identifier is already registered. |