Microsoft TS: Microsoft .NET Framework 3.5 C Windows Communication Foundation - 070-503 FREE EXAM DUMPS QUESTIONS & ANSWERS
You create a client application by using Microsoft .NET Framework 3.5. The client application uses a Windows Communication Foundation (WCF) service.
The WCF service reads the value of the incoming message headers by using the following code segment.

The following code fragment is a part of the application configuration file. (Line numbers are included for reference only.)

The client application adds a message header each time it calls the WCF service.
You need to ensure that the message header provides the following values to its parameters.

Which code fragment should you insert at line 04?

The WCF service reads the value of the incoming message headers by using the following code segment.

The following code fragment is a part of the application configuration file. (Line numbers are included for reference only.)

The client application adds a message header each time it calls the WCF service.
You need to ensure that the message header provides the following values to its parameters.

Which code fragment should you insert at line 04?

Correct Answer: C
Vote an answer
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully defined a service contract named IManageOrders. You write the following code segment.

You need to create a fault contract for the MarkOrderClosed method on the IManageOrders service contract. Which code segment should you add?

You need to create a fault contract for the MarkOrderClosed method on the IManageOrders service contract. Which code segment should you add?
Correct Answer: D
Vote an answer
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service is hosted in a managed application.
You need to perform the following tasks:
Publish the service on the following address: net.tcp://localhost:8080/ExamService
Publish the metadata on the following address:
http://localhost:8081/ExamService/metadata?wsdl
Which code fragment should you use?

You need to perform the following tasks:
Publish the service on the following address: net.tcp://localhost:8080/ExamService
Publish the metadata on the following address:
http://localhost:8081/ExamService/metadata?wsdl
Which code fragment should you use?

Correct Answer: B
Vote an answer
You are creating a Windows Communication Foundation distributed application by using Microsoft .NET Framework 3.5. You write the following code segment to implement the service contract. (Line numbers are included for reference only.)

You need to ensure that the client applications of only those users who belong to the Administrators group can access the RemoveOrder method.
Which code segment should you insert at line 05?


You need to ensure that the client applications of only those users who belong to the Administrators group can access the RemoveOrder method.
Which code segment should you insert at line 05?

Correct Answer: D
Vote an answer
You are creating a client application by using Microsoft .NET Framework 3.5. The client application uses a Windows Communication Foundation service. To log the called service proxy methods and their parameters, you implement custom endpoint behavior in the following class.
class ParametersLoggerBehavior: lEndpointBehavior
{}
You also create the following class for the custom behavior.
class LoggerElement
: BehaviorExtensionElement {}
You add the following configuration code fragment to the application configuration file.
(Line numbers are included for reference only.)

You need to ensure that the endpoint uses the custom behavior. Which configuration settings should you insert at line 03?
class ParametersLoggerBehavior: lEndpointBehavior
{}
You also create the following class for the custom behavior.
class LoggerElement
: BehaviorExtensionElement {}
You add the following configuration code fragment to the application configuration file.
(Line numbers are included for reference only.)

You need to ensure that the endpoint uses the custom behavior. Which configuration settings should you insert at line 03?
Correct Answer: C
Vote an answer
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service will be hosted in a Console application.
You need to configure the service by using a configuration file other than the default app.config file. Which code segment should you use?

You need to configure the service by using a configuration file other than the default app.config file. Which code segment should you use?

Correct Answer: D
Vote an answer
You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment.

You have not deployed the IMathService service.
You need to expose the AddNumbers (double a, double b) operation to the IMathService
service contract.
Which code segment should you use?


You have not deployed the IMathService service.
You need to expose the AddNumbers (double a, double b) operation to the IMathService
service contract.
Which code segment should you use?

Correct Answer: C
Vote an answer
You are creating a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5.
You create an instance of the ServerHost class. You plan to host the WCF service in a Windows service.
You need to link the lifetime of the WCF service to the lifetime of the Windows service.
Which three actions should you perform on the instance of the ServerHost class? (Each correct answer presents part of the solution. Choose three.)
You create an instance of the ServerHost class. You plan to host the WCF service in a Windows service.
You need to link the lifetime of the WCF service to the lifetime of the Windows service.
Which three actions should you perform on the instance of the ServerHost class? (Each correct answer presents part of the solution. Choose three.)
Correct Answer: B,C,F
Vote an answer
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service uses the net.tcp transport. You need to ensure that when the server starts, the service starts and continues to run. What should you do?
Correct Answer: B
Vote an answer
You are creating a Windows Communication Foundation client application by using Microsoft .NET Framework 3.5.
You need to inspect the parameters on the client application.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
You need to inspect the parameters on the client application.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
Correct Answer: B,D,F
Vote an answer
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5. The service will be hosted in a managed Console application.
You want to add endpoints to the service.
You need to ensure that all endpoints use the same base address.
Which code fragment should you use?

Framework 3.5. The service will be hosted in a managed Console application.
You want to add endpoints to the service.
You need to ensure that all endpoints use the same base address.
Which code fragment should you use?

Correct Answer: C
Vote an answer
You are creating a client application that will call a Windows Communication Foundation service. The service was created by using Microsoft .NET Framework 3.5.
You write the following code segment.
[DataContract]
public class CreditCard {
private string cardNumber = 0; [DataMember] public string Name { get; set; } [DataMember] public string CardNumber { get { return cardNumber; } set { if (!IsValidCreditCardNumber(value)) { throw new ArgumentException("Invalid credit card number"); } cardNumber = value; } }
} You plan to share the validation logic between the client application and the WCF service.
You need to generate a client-side service proxy that includes the validation logic.
Which four tasks should you perform? (Each correct answer presents part of the solution. Choose four.)
You write the following code segment.
[DataContract]
public class CreditCard {
private string cardNumber = 0; [DataMember] public string Name { get; set; } [DataMember] public string CardNumber { get { return cardNumber; } set { if (!IsValidCreditCardNumber(value)) { throw new ArgumentException("Invalid credit card number"); } cardNumber = value; } }
} You plan to share the validation logic between the client application and the WCF service.
You need to generate a client-side service proxy that includes the validation logic.
Which four tasks should you perform? (Each correct answer presents part of the solution. Choose four.)
Correct Answer: B,C,E,F
Vote an answer
You are creating a distributed application by using Microsoft .NET Framework 3.5.
The application uses the Windows Communication Foundation model.
You need to ensure that the following requirements are met:
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
The application uses the Windows Communication Foundation model.
You need to ensure that the following requirements are met:
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
Correct Answer: B,C
Vote an answer