What should you do when adding the service reference?

You are creating an application using Visual Studio 2010. The application consumes a Windows Communication Foundation (WCF) service.
You are adding a service reference to the WCF service. You need to ensure that the generated proxy does not block
the calling thread when executing a service method. What should you do when adding the service reference?

You are creating an application using Visual Studio 2010. The application consumes a Windows Communication Foundation (WCF) service.
You are adding a service reference to the WCF service. You need to ensure that the generated proxy does not block
the calling thread when executing a service method. What should you do when adding the service reference?

A.
Set the Collection type to ObservableCollection.

B.
Select the Reuse types in all referenced assemblies option.

C.
Select the Generate asynchronous operations option.

D.
Select the Always generate message contracts option.

Explanation:
The Configure Service Reference dialog box enables you to configure the behavior of Windows Communication Foundation (WCF) services.

To access the Configure Service Reference dialog box, right-click a service reference in Solution Explorer and choose Configure Service Reference.
You can also access the dialog box by clicking the Advanced button in the Add Service Reference Dialog Box.

To change the address where a WCF service is hosted, enter the new address in the Address field.
To change the access level for classes in a WCF client, select an access-level keyword in the Access level for generated classes list.
To call the methods of a WCF service asynchronously, select the Generate asynchronous operations check box.
To generate message contract types in a WCF client, select the Always generate message contracts check box.
To specify list or dictionary collection types for a WCF client, select the types from the Collection type and Dictionary collection type lists.

To disable type sharing, clear the Reuse types in referenced assemblies check box. To enable type sharing for a subset of referenced assemblies,
select the Reuse types in referenced assemblies check box, select Reuse types in specified referenced assemblies, and select the desired references in the Referenced assemblies list.



Leave a Reply 1

Your email address will not be published. Required fields are marked *