ConfigMgrRegistrationRequest Class
Registers a client with the site.
Namespace: Microsoft.ConfigurationManagement.Messaging.Messages
Assembly: Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)
Inheritance Hierarchy
System.Object
Microsoft.ConfigurationManagement.Messaging.Framework.Message
Microsoft.ConfigurationManagement.Messaging.Framework.SynchronousMessageRequest
Microsoft.ConfigurationManagement.Messaging.Framework.SynchronousMessageRequest<TSynchronousReply>
Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequestBase
Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest
Syntax
[SerializableAttribute]
[MessageClassAttribute(MessageClassAttributeSetting.NotSigned)]
[MessageSupportAttribute(MessageSupportStatus.Supported)]
public sealed class ConfigMgrRegistrationRequest : ConfigMgrRegistrationRequestBase
[SerializableAttribute]
[MessageClassAttribute(MessageClassAttributeSetting::NotSigned)]
[MessageSupportAttribute(MessageSupportStatus::Supported)]
public ref class ConfigMgrRegistrationRequest sealed : ConfigMgrRegistrationRequestBase
<SerializableAttribute>
<MessageClassAttribute(MessageClassAttributeSetting.NotSigned)>
<MessageSupportAttribute(MessageSupportStatus.Supported)>
Public NotInheritable Class ConfigMgrRegistrationRequest
Inherits ConfigMgrRegistrationRequestBase
Constructors
Name | Description | |
---|---|---|
ConfigMgrRegistrationRequest() | Initializes a new instance of the ConfigMgrRegistrationRequest class. |
Properties
Name | Description | |
---|---|---|
AddRegistrationHint | If true, a registration hint will be added to the message before it is sent. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
AgentIdentity | Gets or sets the agent identity. An example of agent identity is "MyClient.exe". (Inherited from ConfigMgrRegistrationRequestBase.) |
|
AgentType | Getor sets the agent type. Valid agent types are 0=AdvancedClient, 1=OsdCD, 2=Device, 4=IsvProxy, 8=IsvProxyClient. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
AgentVersion | Get or sets the agent version. The default value is null. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
Attachments | Gets message attachments. (Inherited from Message.) |
|
Body | Gets the message body. This property should not be empty, with limited exceptions.(Inherited from Message.) |
|
ClientFqdn | Gets or sets the client FQDN of the registering machine. If you don't set this property, the NetBiosName value is used. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
DiscoveryProperties | Gets or sets the discovery properties. This property is not used in confirmation requests. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
Edition | Gets or sets the client edition. |
|
EncryptionCertificate | Gets the encryption certificate to include in the registration request. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
ExchangeDeviceId | Gets or sets the Exchange device ID. |
|
HardwareId | Gets or sets the hardware ID of the registering machine. Hardware IDs are used to identify the machine hardware. Any string provided will suffice as a hardware ID, as long as it's unique to the machine. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
InternetStatus | Gets or sets the Internet status of the client. The default value is None (0). (Inherited from ConfigMgrRegistrationRequestBase.) |
|
LocaleId | Gets or sets the locale ID of the registering machine. The default value is the locale ID of the calling machine. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
MessageId | Gets the internal ID of a message. (Inherited from Message.) |
|
NetBiosName | Gets or sets the NetBIOS name of the registering machine. This property is required. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
Priority | Gets the priority for a message. This property is only used for reference by senders and has no effect on the message. (Inherited from Message.) |
|
PublisherDeviceId | Gets or sets the publisher device ID. |
|
RegistrationHint | Gets or sets the registration hint to use when registering with the site server. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
RegistrationType | Gets or sets the type of registration message to send, such as registration or confirmation. This property affects the message returned from the management point. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
ReplyType | Gets the reply type encapsulated by the message. (Inherited from SynchronousMessageRequest.) |
|
RequestedSmsId | Gets or sets the SMSID. If you are using this property to register, set the value to null or an empty string to allow the management point to generate an SMSID for you. If you are using this property for a confirmation request, you must set a value. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
SenderCallback | Gets a sender callback for a message. This property is null unless a message is in the process of being sent. (Inherited from Message.) |
|
SenderType | Gets the sender type for a message. This property is only used for reference by senders and has no effect on the message. (Inherited from Message.) |
|
Settings | Gets message settings. (Inherited from Message.) |
|
SigningCertificate | Gets or sets the certificate used to sign the message and serve as the message's identity. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
SigningSmsId | Gets or sets the SMSID for the client on behalf of which the signing request was made. Use this property only if you are registering AgentType 4 or AgentType 8. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
SiteCode | Gets or sets the site code to use for sending a message. Some messages require this property. (Inherited from Message.) |
|
SmsId | Gets or sets the SMSID to use for signing and sending a message. (Inherited from Message.) |
|
SupportsInlineSerializers | Gets a value that indicates whether Serialize() is called on send and DeserializeMessageBody is called on receive. The default setting for this property is true. Override to false with caution. (Inherited from Message.) |
|
Timestamp | Gets or sets the timestamp for the registration message. (Inherited from ConfigMgrRegistrationRequestBase.) |
Methods
Name | Description | |
---|---|---|
AddCertificateToMessage(MessageCertificateX509, CertificatePurposes) | Adds a certificate to the message. (Inherited from Message.) |
|
AddCertificateToMessage(MessageCertificateX509, CertificatePurposes, Boolean) | Adds a certificate to a message with the option to disable any intelligence. (Inherited from Message.) |
|
CloneBase() | Creates a clone of a message. Important: This method is not the same as nor does it behave the same as Clone. That is why this message type does not implement ICloneable. It is not recommended that any code outside of Messaging core code use this function without understanding how it works, what its limitations are, and why it's being used. Note: If you're considering this method, ensure that you have evaluated CloneByRef which you might want to use instead. (Inherited from Message.) |
|
CloneByRef(IMessage) | Clones a reference of a message. Use this method to create a copy of an existing message, especially one of a different type, into this message. Important: This method is not the same as nor does it behave the same as Clone. That is why this message type does not implement ICloneable. It is not recommended that any code outside of Messaging core code use this function without understanding how it works, what its limitations are, and why it's being used. (Inherited from Message.) |
|
CloneByRef(IMessage, MessageCloneOptions) | Clones a reference of a message. Use this method to create a copy of an existing message, especially one of a different type, into this message. Important: This method is not the same as nor does it behave the same as Clone. That is why this message type does not implement ICloneable. It is not recommended that any code outside of Messaging core code use this function without understanding how it works, what its limitations are, and why it's being used. (Inherited from Message.) |
|
DeserializeMessageBody() | Internal handler for deserializing a payload into its object format. This method should only be called by external code under exceptional circumstances. (Inherited from Message.) |
|
Discover() | Performs discovery. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
Equals(Object) | (Inherited from Object.) |
|
GetCertificateFromMessage(CertificatePurposes) | Retrieves the X509-based certificate from a message. (Inherited from Message.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
OnDeserialization(Object) | Ensures validity checks are never performed on deserialization. (Inherited from Message.) |
|
PostSendActions(IMessageSender, Boolean) | Actions that run after a message is sent. This is an asynchronous action; use with caution. (Inherited from Message.) |
|
PreSendActions() | Actions that run before the message is sent. This operation is synchronous and blocking. (Inherited from Message.) |
|
RegisterClient(IMessageSender, TimeSpan) | Helper method that performs a registration loop for a new client. (Inherited from ConfigMgrRegistrationRequestBase.) |
|
SendMessage(IMessageSender) | Sends the message using the specified sender. (Inherited from SynchronousMessageRequest<TSynchronousReply>.) |
|
SerializeMessageBody() | Serializes the payload. (Overrides ConfigMgrRegistrationRequestBase.SerializeMessageBody().) |
|
SimpleBodyDeserialization<T>() | Helper function that deserializes an object from the existing payload. (Inherited from Message.) |
|
SimpleBodyDeserialization<T>(DeserializationArguments) | Helper function that deserializes an object from the existing payload. (Inherited from Message.) |
|
SimpleObjectSerialization(Object) | Helper function that serializes an object to a payload. (Inherited from Message.) |
|
ToString() | (Inherited from Object.) |
|
Validate() | Obsolete. Validates that all required message settings are present and meet the requirements. If this method fails, the message will likely fail in being sent or processed by the site or management point. (Inherited from Message.) |
|
Validate(IMessageSender) | Validates that all required message settings are present and meet the requirements. If this validation fails, the message is almost certain to fail in being sent or processed by the site or management point. (Inherited from ConfigMgrRegistrationRequestBase.) |
Explicit Interface Implementations
Name | Description | |
---|---|---|
IMessage.SendMessage(IMessageSender) | Sends a message by using the specified sender. (Inherited from Message.) |
|
IMessageBase.Settings | Gets message properties and settings. (Inherited from Message.) |
Examples
// HTTP sender is used for sending messages to the MP
HttpSender sender = new HttpSender();
// Load the certificate for client authentication
using (MessageCertificateX509Volatile certificate = new MessageCertificateX509Volatile(File.ReadAllBytes("MixedModeTestCert.pfx"), "sccm" /* sample cert password */))
{
// Create a registration request
ConfigMgrRegistrationRequest registrationRequest = new ConfigMgrRegistrationRequest();
// Add our certificate for message signing
registrationRequest.AddCertificateToMessage(certificate, CertificatePurposes.Signing);
// Set the destination hostname
registrationRequest.Settings.HostName = MPHostname;
// Discover local properties for registration metadata
registrationRequest.Discover();
// Register client and wait for a confirmation with the SMSID
SmsClientId clientId = registrationRequest.RegisterClient(sender, TimeSpan.FromMinutes(5));
// Send data to the site
SendSiteData(certificate, clientId, sender);
}
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.ConfigurationManagement.Messaging.Messages Namespace
Return to top