You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You have created a class named Customer to be used in a billing application. The Customer class is shown below.
class Customer
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
Each instance of the Customer class contains information about a customer of your company. You have written a segment of code that populates an ArrayList with a collection of Customer objects as shown below.
ArrayList customers = new ArrayList();
Customer myCustomer = new Customer();
myCustomer.FirstName = "Helen";
myCustomer.LastName = "of Troy";
customers.Add(myCustomer);
myCustomer = new Customer();
myCustomer.FirstName = "Elvis";
myCustomer.LastName = "Presley";
customers.Add(myCustomer);
You need to write code that iterates through the customers ArrayList and displays the name of each customer at the command prompt.
Which code segment should you choose?
You work as a Software Developer for ABC Inc. You create a Web page named MyWebPage that displays detailed information of a registered user. The page contains a TextBox Web server control that requires the RangeValidator validation control to validate whether the user has entered the correct date of birth. A validation error message is displayed if the user has entered the value, which is greater than the date of registration. However, you want to ensure that the validation control on the Web page does not occupy any space, but share the same location for the display of error messages on the Web page. You also want to ensure that the layout of the Web page is changed when the error message is displayed. Which of the following actions will you take to accomplish the task?
You work as a Software Developer for InfoTech Inc. You develop a Windows application named MyWinApp that displays a registration form for users. You want to ensure that whenever a user enters a wrong data in the required TextBox controls, the data will not be accepted by the application. Which of the following actions will you take so that users should enter only valid data?
You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating a Web application using .NET Framework 2.0. The application will be used in Local Area Network (LAN). The Web application reads comma enclosed text files. The text files exist in a subdirectory under the Web application's root directory. You must ensure that users never directly navigate to these files in a Web browser if they are not members of the Accounting role. You are required to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class. Which of the following forms of authentications will you use?
Ross works as a Software Developer for GenTech Inc. He develops a Windows-based application using Visual Studio .NET. He uses the Write method of the Debug and Trace classes to record information about the execution of the application in Windows 2000 event log. Ross performs integration testing on the application. He wants to ensure that only one entry is made to the event log, each time a call is made to the Write method of either class. Which of the following code will he use to accomplish this?
Each correct answer represents a complete solution. Choose two.
You work as a Windows Application Developer for ABC Inc. The company uses Visual
Studio .NET 2008 as its application development platform. You create a Windows Forms
application using .NET Framework 3.5. You create multiple threads in the application and the
threads will execute the same method. You want to synchronize access to a block of code within the method; thus, no two threads execute the block at the same time. What will you do to accomplish this?
Each correct answer represents a part of the solution. Choose two.
Allen works as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. He creates an application using .NET Framework. He wants to encrypt all his e-mails that he sends to anyone. Which of the following will he use to accomplish the task?
You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a class library using the .NET Framework. The library will be used to open the NSCs of computers. Later, you will set up the class library to the GAC and provide it Full Trust permission. You write down the following code segments for the socket connections:
SocketPermission permission = new SocketPermission(PermissionState.Unrestricted);
permission.Assert();
A number of the applications that use the class library may not have the necessary permissions to open the network socket connections. Therefore, you are required to withdraw the assertion. Which of the following code segments will you use to accomplish the task?
John works as a Web Developer for ABC Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. The application will be used in the Sales department to generate monthly reports. John wants to deploy the application on the company's intranet. The company uses Microsoft Windows authentication. John wants to deny access to all the members of the Guest1 role. Which of the following attributes will he use in the <authorization> element of the application's Web.config file to accomplish the task?
Which of the following security methods is used when the code requires a specific set of permissions, which are not known until runtime?