Which code segment should you use?
A. Dim svc Host As WebSennceHost = New WebServiceHost(GetType(HdloService)) svc HotsAddServiceEndpoint(GdType(lHelloService), New WebHttpBinding (WebHttpSecurityModeNone), “http:/Ibc alhost 8000!HelloService”) Return svc Host
B. Dim baseAddress As Ur New Uri(“http:/i1ocahost:8000r) Dim svcHo As WebServiceHost = New WebServiceHost(GetType(HelloService), baseAddress) svc Host.AddServiceEndpoint(GdType(lHelloService),? New Web Http Binding (WebHttpSec urityMode None), HelloService) Return svc Host
C. Dim svc Host As WebServiceHost = New WebServiceHost(New HelloSennceO) svcHost.AddServiceEndpoint(GetType(IHelloService), New WebHttpBinding (WebHttpSecurityModeNone), Thttp://bc aihost: 8000/HelloSennce”) Return svc Host
D. Dim baseAddress As Ur = New Uri(“http/I1ocahost 8OOOP Dim svcHo As WebServiceHost = New WebServiceHost(New HelloService0, baseAddress) svc HostAddServiceEndpoint(GdType(IHelIoService), New WebHttpBinding(WebHttpSecuntyMode None), “HelloService”) Return svc Host
Answer:B
Which code segment should you use?
A. Dim svc Host As WebSennceHost = New WebServiceHost(GetType(HdloService)) svc HotsAddServiceEndpoint(GdType(lHelloService), New WebHttpBinding (WebHttpSecurityModeNone), “http:/Ibc alhost 8000!HelloService”) Return svc Host B. Dim baseAddress As Ur New Uri(“http:/i1ocahost:8000r) Dim svcHo As WebServiceHost = New WebServiceHost(GetType(HelloService), baseAddress) svc Host.AddServiceEndpoint(GdType(lHelloService),? New Web Http Binding (WebHttpSec urityMode None), HelloService) Return svc Host C. Dim svc Host As WebServiceHost = New WebServiceHost(New HelloSennceO) svcHost.AddServiceEndpoint(GetType(IHelloService), New WebHttpBinding (WebHttpSecurityModeNone), Thttp://bc aihost: 8000/HelloSennce”) Return svc Host D. Dim baseAddress As Ur = New Uri(“http/I1ocahost 8OOOP Dim svcHo As WebServiceHost = New WebServiceHost(New HelloService0, baseAddress) svc HostAddServiceEndpoint(GdType(IHelIoService), New WebHttpBinding(WebHttpSecuntyMode None), “HelloService”) Return svc Host