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 storage mechanism should you use?
You are an enterprise application developer. You are designing an event logging mechanism for a Web service. The Web service will be hosted on a Web farm. Your company policy specifies that all events for a component must be stored in a secure location. You need to design the event logging storage strategy to comply with the company policy. Which storage mechanism 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 performance counter should you monitor?
You are an enterprise application developer. An ASP.NET application accesses a Microsoft SQL Server database. You discover that the application intermittently logs the following exception:
“System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.” You need to identify an appropriate performance counter to ascertain that the exception is caused by the leaking connections. Which performance counter should you monitor?
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?
What should you do?
You are an enterprise application developer. You are modifying an existing component that communicates with a single vendor. You need to ensure that the design meets the following requirements: Supports multiple vendors.Supports common business rules that are applicable to all vendors.Supports rules that are specific to each vendor.Supports addition of new vendors easily. What should you do?
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?
What should you do?
You are an enterprise application developer. You are developing a Web service. The service will be consumed by client applications that are built on the .NET and other platforms. The Web service will return a collection to the client applications. You need to ensure that the client applications can consume the collection. You want to achieve this goal by using the minimum amount of development effort. What should you do?
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?
What should you do?
You are an enterprise application developer. You have created an ASP.NET application. You need to create a unit test to test the Button1_Click event handler of an aspx page by using the minimum amount of code. What should you do?