Microsoft TS: Microsoft .NET Framework 3.5 C Windows Communication Foundation - 70-503 Exam Practice Test
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code segment to implement an operation contract. (Line numbers are included for reference only.)

Only the contents of the File.xml file are sent to the client application.
You need to ensure that the SOAP envelope generation is always disabled for messages that are sent to the client application.
Which line of code should you insert at line 04?
You write the following code segment to implement an operation contract. (Line numbers are included for reference only.)

Only the contents of the File.xml file are sent to the client application.
You need to ensure that the SOAP envelope generation is always disabled for messages that are sent to the client application.
Which line of code should you insert at line 04?
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 create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The metadata for the service is available at http://localhost:8080/MyService/mex.
The svcutil.exe tool generates the following two files from the metadata:
You need to ensure that the configuration file is merged with an existing app.config file.
Which command should you use?
The svcutil.exe tool generates the following two files from the metadata:
You need to ensure that the configuration file is merged with an existing app.config file.
Which command should you use?
Correct Answer: D
Vote an answer
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You need to expose two different service endpoints that have the same address.
Which configuration setting should you use?

Framework 3.5.
You need to expose two different service endpoints that have the same address.
Which configuration setting should you use?

Correct Answer: A
Vote an answer
You want to trace the flow of events in process activites (active?) located on server. What code 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 a class named Customer for the WCF service. The Customer class has properties named Id, Name, and BalanceDue.
You plan to convert the Customer class into a data contract.
You need to ensure that only the Id property and the Name property are passed to the client applications.
Which code segment should you use?
You plan to convert the Customer class into a data contract.
You need to ensure that only the Id property and the Name property are passed to the client applications.
Which code segment should you use?
Correct Answer: B
Vote an answer
You are creating a Windows Communication Foundation (WCF) client application by using Microsoft .NET Framework 3.5.
The proxy generated for the WCF service results in the following code segment.

To implement a callback interface, you create the following class in the client application.
public class StoreCallback: IStoreCallback{ }
The client application receives notifications from the service through the callback interface.
You write the following code segment for the client application to use the generated proxy.
(Line numbers are included for reference only.)
02 client.CheckAvailableProducts();
You need to set up duplex communication between the client application and the WCF
service.
Which code segment should you insert at line 01?

The proxy generated for the WCF service results in the following code segment.

To implement a callback interface, you create the following class in the client application.
public class StoreCallback: IStoreCallback{ }
The client application receives notifications from the service through the callback interface.
You write the following code segment for the client application to use the generated proxy.
(Line numbers are included for reference only.)
02 client.CheckAvailableProducts();
You need to set up duplex communication between the client application and the WCF
service.
Which code segment should you insert at line 01?

Correct Answer: C
Vote an answer
You are creating a distributed application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation to create the application. You plan to perform the following tasks:
You write the following code segment.

You need to ensure that only those client applications that provide credentials belonging to the AdminGroup role can access the Remove method. What should you do?
You write the following code segment.

You need to ensure that only those client applications that provide credentials belonging to the AdminGroup role can access the Remove method. What should you do?
Correct Answer: D
Vote an answer