nerdexam
Microsoft

70-513 · Question #298

A Windows Communication Foundation (WCF) solution provides a session-based counter. The service is self-hosted. The hosting code is as follows. Dim host As ServiceHost = New…

The correct answer is A. Define binding2 as follows. See the full explanation below for the reasoning.

Question

A Windows Communication Foundation (WCF) solution provides a session-based counter. The service is self-hosted. The hosting code is as follows. Dim host As ServiceHost = New ServiceHost(GetType(CounterService)) Dim bnding As NetTcpBinding = New NetTcpBinding(SecurityMode.None) host.AddServiceEndpoint("MyApplication. ICounterService", binding, "net.tcp://localhost:23456") host. Open() This service is currently exposed over TCP, but needs to be exposed to external clients over HTTP. Therefore, a new service endpoint is created with the following code. host.AddServiceEndpoint(''MyApplication. lCounterService", binding2, "http:/!localhost:12345' You need to complete the implementation and ensure that the session-based counter will perform over HTTP as it does over TCP. What should you do?

Options

  • ADefine binding2 as follows.
  • BDefine binding2 as follows.
  • CDefine binding2 as follows.
  • DDefine binding2 as follows.

How the community answered

(19 responses)
  • A
    68% (13)
  • B
    16% (3)
  • C
    5% (1)
  • D
    11% (2)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice