A message queue named SecureQueue requires incoming messages to be authenticated.
When an application attempts to send a message to SecureQueue, the following exception is thrown.
User’s internal Message Queuing certificate does not exist.The following code is used to send the message.
(Line numbers are included for reference only.)
01 MessageQueue mq = new MessageQueue(“.\\SecureQueue”);
02 Message m = new Message(“Test Message”);
03 m.UseAuthentication = true;
04 mq.Send(m);
You need to ensure that a message can be sent to SecureQueue without the exception being thrown.
What should you do?
A.
Insert the following line of code between lines 03 and 04.
m.AuthenticationProviderType = CryptographicProviderType.RsqSig;
B.
Insert the following line of code between lines 03 and 04.
m.AuthenticationProviderName = “RsqSig”;
C.
Replace line 03 with the following line of code.
m.AttachSenderId = true;
D.
Replace line 03 with the following line of code.
m.EncryptionAlgorithm = EncryptionAlgorithm.Rc4;