Which code segment should you use?
You need to write a code segment that will add a string named strConn to the connection string section of the application configuration file. Which code segment should you use?
Which code segment should you use?
You are developing a method to hash data for later verification by using the MD5 algorithm. The data is passed to your method as a byte array named message. You need to compute the hash of the incoming parameter by using MD5. You also need to place the result into a byte array.
Which code segment should you use?
Which method should you use on the DirectorySecurity object?
You create a DirectorySecurity object for the working directory. You need to identify the user accounts and groups that have read and write permissions. Which method should you use on the DirectorySecurity object?
Which code segment should you use?
You create an application to send a message by e-mail. An SMTP server is available on the local subnet. The SMTP server is named smtp.contoso.com. To test the application, you use a source address, me@contoso.com, and a target address, you@contoso.com. You need to transmit the e-mail message. Which code segment should you use?
Which code segment should you use?
You are developing a server application that will transmit sensitive information on a network. You create an X509Certificate object named certificate and a TcpClient object named client. You need to create an SslStream to communicate by using the Transport Layer Security 1.0 protocol. Which code segment should you use?
Which code segment should you use?
You are developing a method to hash data for later verification by using the MD5 algorithm. The data is passed to your method as a byte array named message. You need to compute the hash of the incoming parameter by using MD5. You also need to place the result into a byte array.
Which code segment should you use?
Which code segment should you use?
You are changing the security settings of a file named MyData.xml. You need to preserve the existing inherited access rules. You also need to prevent the access rules from inheriting changes in the future. Which code segment should you use?
Which code segment should you use?
You are developing an application that will use custom authentication and role-based security. You need to write a code segment to make the runtime assign an unauthenticated principal object to each running thread. Which code segment should you use?
Which attribute should you place on the method?
You are developing a method to call a COM component. You need to use declarative security to explicitly request the runtime to perform a full stack walk. You must ensure that all callers have the required level of trust for COM interop before the callers execute your method.
Which attribute should you place on the method?
Which code segment should you use?
You are creating an undo buffer that stores data modifications. You need to ensure that the undo functionality undoes the most recent data modifications first. You also need to ensure that the undo buffer permits the storage of strings only. Which code segment should you use?