PrepAway - Latest Free Exam Questions & Answers

What should you do?

You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP.
You need to expose that contract over HTTP and TCP. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Add a net.tcp base address to the host.

B.
Add an endpoint configured with a netTcpBinding.

C.
Add an endpoint behavior named netTcpBehavior to the existing endpoint.

D.
Add a binding configuration to the existing endpoint named netTcpBinding.

Explanation:
<system.serviceModel>
<services>
<service behaviorConfiguration=”WcfServiceLibrary1.Service1Behavior” name=”WcfServiceLibrary1.Service1″>
<endpoint address=”” binding=”netTcpBinding” bindingConfiguration=”” contract=”WcfServiceLibrary1.IService1″>
<identity>
<dns value=”localhost” />
</identity>
</endpoint>
<endpoint address=”mex” binding=”mexTcpBinding” bindingConfiguration=”” contract=”IMetadataExchange” />
<host>
<baseAddresses>
<add baseAddress=”net.tcp://localhost:8523/Service1″ />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name=”WcfServiceLibrary1.Service1Behavior”>
<serviceMetadata httpGetEnabled=”false” />
<serviceDebug includeExceptionDetailInFaults=”false” />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

One Comment on “What should you do?


Leave a Reply