How should you define the service and endpoint tags?

Windows Communication Foundation (WCF) service is self-hosted in a console application.
The service implements the lTimeService service interface in the TimeService class.
You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?

Windows Communication Foundation (WCF) service is self-hosted in a console application.
The service implements the lTimeService service interface in the TimeService class.
You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?

A.
Define the service tag as follows:
<service name=”TimeService”>
Define the endpoint tag as follows:
<endpoint kind=”TimeService” address=”http://localhost:8080/TimeService”
binding=”wsHttpBinding” contract=”ITimeService”/>

B.
Define the service tag as follows:
<service name=”TimeService”>
Define the endpoint tag as follows:
<endpoint kind=”ITimeService” address=”http://localhost:8080/TimeService”
binding=”wsHttpBinding” contract=”ITimeService” />

C.
Define the service tag as follows:
<service name=”ITimeService”>
Define the endpoint tag as follows:
<endpoint name=”TimeService” address=”http://localhost:8080/TimeService”
binding=”wsHttpBinding” contract=”ITimeService”/>

D.
Define the service tag as follows:
<senvice name=”TimeService”>
Define the endpoint tag as follows:
<endpoint address=”http://localhost:8080/TimeService”
binding=”wsHttpBinding” contract=”ITimeService”/>

Explanation:
Specifying an Endpoint Address
(http://msdn.microsoft.com/en-us/library/ms733749.aspx)



Leave a Reply 1

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


Jason

Jason

There’s a typo in answer D. It should be “<service.." not "<senvice.."