Which XML elements should you include in Target 1, Targ…

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:

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:

Answer:

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



Leave a Reply 5

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


puvpul

puvpul

Agree with Null Manu

Larsen

Larsen

T3 should be False.