DRAG DROP
You are developing a WCF service.
You need to configure the web.config file to ensure that metadata is exposed only via the MEX protocol.
You have the following markup:
Which XML elements should you include in Target 1, Target 2, Target 3 and Target 4 to complete the markup?
(To answer, drag the appropriate XML elements to the correct targets in the answer area/ Each XML element
may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to
view content.)
Select and Place:
Explanation:
Target 1: mexHttpBinding
Target 2: IMetadataExchange
Example of valid endpoint definition for the MEX protocol:
<endpoint address=”mex”
binding=”mexHttpBinding”contract=”IMetadataExchange”/>
Target 3: httpGetEnabled
Target 4: true
Cervice behaviors are configured for the default endpoints by using anonymous <behavior> sections within
<serviceBehaviors> sections. Any unnamed <behavior> elements within <serviceBehaviors> are used to
configure service behaviors. For example, the following configuration file enables service metadata publishing
for all services within the host.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled=”True”/>
</behavior>
</serviceBehaviors>
</behaviors> <!– No <service> tag is necessary. Default endpoints are added to the service –>
<!– The service behavior with name=”” is picked up by the service –>
</system.serviceModel>
https://docs.microsoft.com/en-us/dotnet/framework/wcf/simplified-configuration
httpGetEnabled should be false since the question states metadata should only be exposed via the MEX protocol.
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/servicemetadata
httpGetEnabled=false
+1
Agree with Null Manu
T3 should be False.