Which code segment should you use?
You are creating a Windows Forms application for inventory management by using the
.NET Framework 3.5.The application provides a form that allows users to maintain stock
balances. The form has the following features:
A dataset named dsStockBalance to store the stock information
A business component named scInventory
The scInventory component provides a method named Save.You need to ensure that only
the modified stock balances of dsStockBalance are passed to the scInventory.Save
method.Which code segment should you use?
Which code segment should you use?
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service will be hosted on a Web server. You add the following code fragment to the .svc file.
<% @ServiceHost Factory=”ExamServiceFactory” Service=”ExamService” %>
You need to create the instances of the services by using the custom ExamServiceFactory class.
Which code segment should you use?
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 creation, configuration and deployment of Remoting applications form part of your responsibilities at Domain.com.
A class named ObjectManager is defined in the ManagementServer namespace in an executable named ManagementServer.exe. The ObjectManager class is derived from MarshalByRefObject. You then create a client application named Client.exe. Client.exe does not have a reference to ManagerServer.exe. You need to keep in mind that there are a few technical requirements. These are:
1. The client application must execute with restricted permissions.
2. The ObjectManager must execute with unrestricted permissions. You now need to create an instance of ObjectManager in the client application.
What should you do? (Choose the correct code segment.)
What should you do?
You develop an application named App1 as a subproject of an OS design. You need to ensure that App1 always starts at boot time. What should you do?
should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application uses ASP.NET AJAX, and you plan to deploy it in a Web farm
environment.
You need to configure SessionState for the application. Which code fragment
should you use?
should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You create a composite custom control named MyControl.You need to add an
instance of the OrderFormData control to the MyControl control. Which code segment
should you use?
Which operation contract should you use?
You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You create the following service contract.
[ServiceContract]
public interface IMath
{
[OperationContract]
int Add(int num1, int num2);
}
You need to add an operation contract to perform the Add operation asynchronously. Which operation contract should you use?
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. Domain.com operates as a financial information services provider to a number of financial institutions, i.e.
banks.
You are currently developing an application that will allow interaction with the financial institutions. All these banks expose a Web service that conforms to a standard Web Services Description Language (WSDL) document. However there are some of these banks that do not support a SOAP head that will allow Domain.com to pass transaction information to the Web services. To this end you make use of Microsoft Visual Studio 2005 to generate a Web proxy service named FinancialService. The exhibit below illustrates the clss that also gets generated.
public class Transaction : SoapHeader
{
public int TransactionID;
public string TransactionState;
}
You then proceed to write the following code so as to initiate the proxy class:
01 FinancialService financialServiceProxy = new FinancialService() ;
02 financialServiceProxy.TransactionValue = New Transaction () ;
03 financialService Proxy.TransactionValue.TransactionID = 1000 ;
04 financialService Proxy.TransactionValue.MustUnderstand = true;
However, after you have written this code you discover that the financial institutions that do support SOAP heads; throw exceptions of type SoapHeaderException when the Web methods are invoked. You thus need to modify the code to prevent these exceptions from being thrown. What should you do? (Choose the line number that represents the code statement that should be modified.)
What should you add to the application?
You develop a data collection application that has two threads. One thread collects data and stores it in a buffer. A second thread processes the data from the buffer. You need to ensure that only one thread can modify the buffer at a time. What should you add to the application?
Which code segment should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment.
<asp:DropDownList AutoPostBack=”true”
ID=”DropDownList1″ runat=”server”
onselectedindexchanged=
“DropDownList1_SelectedIndexChanged”>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
</asp:DropDownList>
You also add a MultiView control named MultiView1 to the Web page. MultiView1 has three child View controls.
You need to ensure that you can select the View controls by using the DropDownList1 DropDownList control.
Which code segment should you use?