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?
What should you do next?
You have a .NET Remoting object named Scheduler. The Scheduler class is in an assembly file named TaskScheduler.dll.
The Scheduler class is hosted by an application named SchedulerServer.exe. This application is configured by using a file named SchedulerServer.exe.config. This file configures the Scheduler class to be a client-activated object by using a TcpChannel and a BinaryFormatter.
You want to deploy the Scheduler object to a computer named Computer1 so that client applications can begin to use it.
You copy TaskScheduler.dll, SchedulerServer.exe, and SchedulerServer.exe.config to a directory on Computer1.
What should you do next?
What should you do?
You create a serviced component named Scheduler. Scheduler is registered in a library application. The Scheduler methods parse String objects into DateTime objects. You write a console application named Coverage.exe to test each method in Scheduler. You want Coverage.exe to test Scheduler for multiple cultures to verify its globalization support. What should you do?
You need to resolve this problem
You create a serviced component named OrderProcessor. OrderProcessor implements the IOrderInit interface. The component and the interface contain the following code segments:
[Guid(“0B6ABB29-43D6-40a6-B5F2-83A457D062AC”)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IOrderInit {
// IOrderInit methods go here.
}
public class OrderProcessor: ServicedComponent, IOrderInit { // OrderProcessor methods go here.
}
You discover that every time you rebuild OrderProcessor, existing unmanaged client code fails. The HRESULT for the exception is 0x80040154. The exception includes the following message: “Class not registered.” You need to resolve this problem.
What should you do?
Which two code segments should you use? (Each correct answer presents part of the solution
You are creating an XML Web service named BankCustomer that provides bank customer information. You write code to keep track of error messages, warning messages, and informational messages while the service is running. You use the Trace class to write the messages to a log file.
On test computers, you want to see error messages and warning messages. On deployment computers, you want to see error messages, but not warning messages.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
What should you do?
You create a serviced component named SessionDispenser. This component is in the Fabrikam.Utilities assembly and is registered in a COM+ server application. SessionDispenser has multiple callers. You discover that there are logic problems in the CreateNewSession method. You want
to debug any calls to this method. What should you do?
Which code segment should you use?
You are creating a .NET Remoting object. You want to add code to the object to log error messages and warning messages. You want the log messages written to both a log file and to the Windows application log. Which code segment should you use?
Which code segment should you use?
You are creating a Windows-based application named MyWinApp. To the application, you add a Windows Form named MyForm and a reference to a SingleCall .NET Remoting object named TheirObject.
You need to ensure that MyForm creates an instance of TheirObject to make the necessary remote object calls.
Which code segment should you use?
Which discovery document should you create?
You create an XML Web service project that consists of three services named BronzeService, SilverService, and GoldService. All three services are located in the same virtual directory on a production computer. When customers subscribe to your service, they select only one of the three available services.
A new customer subscribes to SilverService. You need to create a discovery document that enables this customer to use only SilverService.
Which discovery document should you create?