Microsoft Exam Questions

You need to ensure that the service publishes the WSDL description at http://services.contoso.com/Or

Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.
The <system.serviceModel> section of the configuration file is as follows. (Line numbers are included for reference only.)

01 <system.serviceModel>
02 <behaviors>
03 <serviceBehaviors>
04 <behavior>
05 <serviceDebug includeExceptionDetailInFaults=”false” />
06 …
07 </behavior>
08 </serviceBehaviors>
09 </behaviors>
10 <serviceHostingEnvironment multipleSiteBindingsEnabled=”true” />
11 </system.serviceModel>

You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupService.svc?wsdl.
What should you do?

A.
Change the serviceDebug element at line 05 as follows.
<serviceDebug includeExceptionDetailInFaults=”true” />

B.
Insert the following element at line 06.
<serviceDiscovery>
<announcementEndpoints>
<endpoint name=”wsdlAnnouncement” kind=”udpAnnouncementEndpoint” />
</announcementEndpoints>
</serviceDiscovery>

C.
Insert the following element at line 06.
<serviceMetadata httpGetEnabled=”true” />

D.
Insert the following element at line 06.
<serviceMetadata httpGetEnabled=”false” />

Explanation:
<serviceMetadata>
(http://msdn.microsoft.com/en-us/library/ms731317.aspx)

httpGetEnabled A Boolean value that specifies whether to publish service metadata for retrieval using an HTTP/Get request.
The default is false. If the httpGetUrl attribute is not specified, the address at which the metadata is published
is the service address plus a “?wsdl”. For example, if the service address is “http://localhost:8080/CalculatorService”,
the HTTP/Get metadata address is “http://localhost:8080/CalculatorService?wsdl”.
If this property is false, or the address of the service is not based on HTTP or HTTPS, ?wsdl is ignored.