PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You create a Windows Forms application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application contains the following code segment.
public DataSet GetProductByID(string ProductID)
{
DataSet ds = new DataSet(“ProductList”);
string SqlSelectCommand = “Select * FROM PRODUCTS WHERE PRODUCTID=” + ProductID;
try
{
SqlDataAdapter da = new SqlDataAdapter();
SqlConnection cn = new SqlConnection(GetConnectionString());
SqlCommand cmd = new SqlCommand(SqlSelectCommand);
cmd.CommandType = CommandType.Text;
cn.Open();
da.Fill(ds);
cn.Close();
}
catch (Exception ex)
{
string msg = ex.Message.ToString();
//Perform Exception Handling Here
}
return ds;
}
You need to ensure that the code segment is as secure as possible.
What should you do?

What should you do?

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. The development and deployment of Extensible Markup Language (XML) Web Services forms part of your responsibilities at Domain.com.
The following exhibit illustrates a class definition:

public class MarketService
{
internal string ObtainMarket(string mobilePhoneNumber)
{
return String.Empty;
}
}

You received instruction to modify this class so that it becomes a Web service, a Web service that will allow internal applications to invoke ObtainMarket as a Web method. You need to ensure that the Web method does not make use of session state and that it must make use of the default namespace.

What should you do?

What should you do?

You are creating a Windows application by using the .NET Framework 3.5.
The application is used to manage employee information.
The application meets the following specifications:
A main form named EmployeeList contains a list control that displays a list of all employees.
The menu items help simultaneously display various detail forms for each employee selected from the list
control.
Each detail form for a selected employee contains a different set of information about the employee.
You need to ensure that when a user switches from one employee to another, the open detail forms are
updated to the corresponding employee information.
What should you do?

What should you do?

You create applications by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
You deploy a new Windows Forms application in a test environment. During the test process, an error message that includes an incomplete stack trace is reported.
You review the following code segment that has caused the error.

public int AddNewMission(DateTime date, string mission, string missionLink)
{
try
{
DALCode pgr = new DALCode(“cnWeb”);
int retcode = pgr.AddNewMission(date, mission, missionLink);
return retcode;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
finally
{
pgr.Dispose();
}
}
You need to modify the code segment to display the entire stack trace.
What should you do?

What conclusion can you draw?

You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the support and deployment of applications. You are currently developing an enterprise solution that consists of a Microsoft ASP.NET Web application and a Microsoft .NET Remoting component. The Web application connects to the .NET Remoting component via inter-process communication (IPC) channel. A Web server named Certkiller -WS01 will be used for the deployment of the enterprise solution. The following exhibit illustrates the production Web.config file configuration:

<configuration>
<system.web>
<customErrors mode=”RemoteOnly”/>
</system.web>
</configuration>
One requirement that should be kept in mind is that one should not be able to view specific error messages when accessing the Web application from the network or the Internet. Following is a list of the aspects included in the deployment design:
1. Deploy Microsoft Internet Security and Administration (ISA) Server to Certkiller -WS01.
2. Deploy the Web application to Certkiller -WS01.
3. Configure ISA server with a Web publishing rule to redirect requests to staging.fi-print.com to 127.0.0.1.

You now need to make a decision as to whether the design meets the requirements.

What conclusion can you draw?

What should you do?

You maintain a Windows Forms application and an ASP.NET application.
The Windows Forms application has the following features:
The application impersonates the logged-on user.
The data is stored in a Microsoft SQL Server 2008 database.
The application grants user access to data by calling the IPrincipal.IsInRole method on the basis of user
roles.
The ASP.NET application uses forms-based authentication to authenticate users.
You need to share the login and user role information between the Windows Forms application and the
ASP.NET application.
What should you do?

Which technology should you use?

You create an application by using Microsoft Visual Studio 2008 and the .NET Framework 3.5.
You plan to design the business layer of the application. The business layer must meet the following requirements:
– It must expose the business operations as Web services.
– It must provide built-in long-running transaction capabilities.
You need to identify an appropriate technology to implement the business layer.
Which technology should you use?

What conclusion can you draw?

You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the testing and stabilization of applications. You and the development team is currently busy developing an enterprise resource planning solution for Domain.com. The logical design for this application consists of a Microsoft ASP.NET Web application, a Microsoft .NET Remoting component, and a Microsoft Windows service. The Microsoft Windows service hosts the .NET Remoting component which is a marshal-by-reference component. The purpose of this component is to read and update the performance counters. The Web application is designed to access the component via Transmission Control Protocol (TCP) channel. The Web application is hosted on a Web server and the .NET Remoting component is hosted on an application server. A Developer named Mia Hamm has been instructed to perform the integration testing of the component. Following is the step-by step procedure that Mia Hamm followed during the integration testing:
1. Mia Hamm adds the component to an ASP.NET Web application project.
2. Mia Hamm does not configure Remoting in the Web application.
3. Mia Hamm accesses the Web application and invokes methods on the component.
4. The method calls fail.
You need to make a decision as to whether the test results can be considered valid.

What conclusion can you draw?

What should you do?

You are creating a Windows application by using the .NET Framework 3.5.
The application performs multiple read/write operations to the file system by using asynchronous delegate
invocation.
You discover that the read/write operations are abruptly terminated when the application exits. The files
either remain open or are corrupted.
You need to ensure the application completes all read/write operations successfully before it exits.
What should you do?

What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application will be used on personal computers and mobile-based devices. The current application design is composed of the following three layers:
– User interface layer
– Business layer
– Data access layer
You need to ensure that the application offers a custom experience to the end user based on the type of device used.
You also need to ensure that code duplication is avoided.
What should you do?