nerdexam
Microsoft

70-513 · Question #176

You are creating a Windows Communication Foundation (WCF) service that accepts messages from clients when they are started. The message is defined as follows. <MessageContract()> Public Class Agent…

The correct answer is B. Add a DataProtectionPermission attribute to the each property and set the ProtectData. See the full explanation below for the reasoning.

Question

You are creating a Windows Communication Foundation (WCF) service that accepts messages from clients when they are started. The message is defined as follows. <MessageContract()> Public Class Agent Public Property CodeName As String Public Property SecretHandshake As String End Class You have the following requirements:

  • The CodeName property must be sent in clear text.
  • The service must be able to verify that the property value was not

changed after being sent by the client.

  • The SecretHandshake property must not be sent in clear text and must

be readable by the service. What should you do?

Options

  • AAdd a MessageBodyMember attribute to the CodeName property and set the
  • BAdd a DataProtectionPermission attribute to the each property and set the ProtectData
  • CAdd an XmlText attribute to the CodeName property and set the DataType property to
  • DAdd an ImmutableObject attribute to the CodeName property and set its value property to

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    82% (28)
  • C
    9% (3)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice