What should you do?
You create .NET Framework remoting components that must be deployed on an unattended application server.
IIS is not installed on the application server.
Company policy requires that no changes be made to the application server except the deployment of approved custom code that is written by your development team.
You need to ensure that the components can run on the unattended application server.
What should you do?
What should you do?
A Windows-based application receives messages from a message queue named PriorityQueue.
The client application sets the Priority property on the message before sending it.
However, received Message objects do not have the Priority property assigned.
The following code is used to receive the messages.
(Line numbers are included for reference only.)
01 MessageQueue queue = new MessageQueue(“.\\PriorityQueue”);
02 Message m = queue.Receive();
03 Console.WriteLine(m.Priority);
You need to ensure that the Windows-based application that receives the messages can access the Priority property.
What should you do?
What should you do?
You are writing an application that will run on a portable computer.
The application uses a private queue named MyAppQueue to store messages.
You need to ensure that the message is retained when the portable computer is restarted.
What should you do?
What should you do?
You are writing an installation application for a Windows Forms application.
The Windows Forms application requires a private message queue named MyQueue.
You need to ensure that the message queue exists after installation.
What should you do?
What should you do?
You are writing an application that reads messages from a message queue.
The name of the message queue is stored in a member variable named queueName.
When a message is read, the application processes the message.
The code for the application is as follows:
class MyApp
{
MessageQueue queue;
public MyApp()
{
queue = new MessageQueue(queueName, QueueAccessMode.Receive);
queue.ReceiveCompleted += new ReceiveCompletedEventHandler(this.ReceivedMessage);
queue.BeginReceive();
}
bool KeepListening() { }
void ProcessMessage(Message m) { }
}
You need to ensure that the application continues to read messages when the KeepListening method returns True, and stops when the KeepListening method returns False.
What should you do?
What should you do?
You create a serviced component.
You install the component into the COM+ catalog.
COM+ runs on the server.
A Windows-based application that is installed on multiple desktop computers must use the component.
The component must run on the server, but the Windows-based application must send component method calls over the network to the component.
The communications protocol used is DCOM.
You need to ensure that the Windows-based application can connect to the component.
What should you do?
Which code segment should you use?
You are creating a Web service to expose the public methods on a class.
Two overloaded methods are defined in the class as follows:
public Customer GetCustomer(string custId)
public Customer GetCustomer(string name, string postalCode)
You need to expose both methods on the Web service.
Which code segment should you use?
Which code should you use?
You are creating a Web service.
You need to add an operation that can be called without returning a message to the caller.
Which code should you use?
Which code segment should you use?
A SOAP message has the following body.
<soap:Body>
<tns:Greeting>
<Person href=”#id1″ />
</tns:Greeting>
<tns:User id=”id1″ xsi:type=”tns:User”>
<GivenName xsi:type=”xsd:string”>givenname</GivenName>
<SurName xsi:type=”xsd:string”>surname</SurName>
</tns:User>
</soap:Body>
You need to configure the Greeting method to accept the SOAP message.
Which code segment should you use?
What should you do?
A Web service returns a Node object X that references Node object Y.
Node object Y also references Node object X.
When the Web service method is called in a way that returns Node object X, the following exception is thrown.
System.InvalidOperationException: A circular reference was detected while serializing an object of type Node.
You need to ensure that the Web service method runs without generating the exception.
Your code must preserve the circular reference between the Node objects.
What should you do?