PrepAway - Latest Free Exam Questions & Answers

Category: 70-320

Exam 70-320: Developing XML Web Services and Server Components with Microsoft Visual C# .NET and the Microsoft .NET Framework

What is the most likely result?

You create an XML Web service named AutoPartsService that processes automobile part orders. This service exposes a Web method named PlaceOrder, which is shown in the following code segment:

[WebMethod(TransactionOption.RequiresNew)]
public DataSet PlaceOrder(DataSet orderData) {
Server1.BrakesService brakes = new
Server1.BrakesService();
Server2.PartsService parts = new Server2.PartsService();
// Call OrderBrakes to order only brakes.
brakes.OrderBrakes(orderData.Tables[“Brakes”]);
// Call OrderParts to order all other auto parts.
parts.OrderParts(orderData.Tables[“Parts”]);
}

BrakesService and PartsService are XML Web services. The TransactionOption property of OrderBrakes and OrderParts is set to TransactionOption.Required.

You develop a Windows Forms application named MyPartOrderApp that consumes AutoPartsService. You run MyPartOrderApp and place an order for three sets of brakes and four wheels. While PlaceOrder is placing the order for the wheels, you close MyPartOrderApp.

What is the most likely result?

Which code segment should you use?

You are creating an XML Web service named ViewOrders that is available to customers over the Internet. ViewOrders exposes a Web method named ViewShippingDetail that requires additional security. You decide to use generic role-based security to secure ViewShippingDetail. You need to write code to ensure that once the caller is authenticated, a user identity named Generic is created. This user identity has membership in a group named Shipping to allow access to ViewShippingDetail.

Which code segment should you use?

You need to decide how your application will handle unmanaged memory

You are developing an application by using Visual C.NET and Visual Basic .NET. The application will use functions from a DLL written in unmanaged code.

One function requires the calling application to allocate unmanaged memory, fill it with data, and pass the address of the memory to the function. On returning from the function, the calling application must deallocate the unmanaged memory.

You need to decide how your application will handle unmanaged memory.

What should you do?

What should you do?

You create a serviced component named Tracker that uses attributes to dynamically register itself for COM+ services. Tracker is in an assembly file named Fabrikam.dll. Tracker uses transactions and role-based security. The roles and the application identity for Tracker are configured on the development computer.

You are preparing to hand off Tracker to an administrator for deployment to production computers. You want all the COM+ configuration information for Tracker to be installed on the production computers.

What should you do?

What should you do?

You create a .NET Remoting object named Time. The Time class is in the Utils namespace and is in an assembly file named Fabrikam.dll.

The Time class is hosted in an Internet Information Services (IIS) virtual directory named UtilsSvr. The Time class is configured to be a server-activated object and uses a URI named Time.rem.

You use a client application named Test.exe to test the Time object. Test.exe creates instances of the Time object by using the following method signature:

public Time CreateInstance() {
RemotingConfiguration.Configure(“Test.exe.config”);
return new Time();
}

You want Test.exe to create instances of the Time class on a computer named Hosting.

What should you do?

Which action or actions should you take? (Choose all that apply

You are developing a Windows-based application that requires the use of a calculation function named CalculateValue. This function includes the following signature:

int CalculateValue(int x);

CalculateValue is located in an unmanaged DLL named UsefulFunctions.dll, and is not part of a COM interface. You need to be able to use CalculateValue in your application.

Which action or actions should you take? (Choose all that apply.)

Which code segment should you use to call CreditService?

You develop an ASP.NET application that consumes a third-party XML Web service named CreditService. CreditService contains a Web method named ChargeCard. ChargeCard takes as input a credit card number, a billing address, and a monetary amount and returns a Boolean variable that indicates whether or not the card was charged.
Calls to ChargeCard take one minute to complete. You do not want users to have to wait while ChargeCard executes. You want users to be taken automatically to the next Web page of the application.

Which code segment should you use to call CreditService?

What should you do?

You create a class named User that provides user information from a variety of data sources. Different instances of User connect to different data sources to load the data. User is a read-only representation of user information and does not support writing changes back to a data source.

The User class includes the following code segment:

[Serializable]
public class User {
public User(string connectionString) {
this.connectionString = connectionString;
// Additional construction code goes here.
}
internal string ConnectionString {
get { return connectionString; }
}
private string connectionString;
// Other methods and properties go here.
}

Once a User object has been populated, it no longer needs the connectionString member variable.

You have a .NET Remoting object named Project that returns User objects. You want to prevent remote client applications from being able to view the contents of the connectionString member variable.

What should you do?


Page 2 of 912345...Last »