Microsoft
70-513 · Question #118
70-513 Question #118: Real Exam Question with Answer & Explanation
Sign in or unlock 70-513 to reveal the answer and full explanation for question #118. The question stem and answer options stay visible for context.
Question
A Windows Communication Foundation (WCF) service implements the following contract. [ServiceContract| public interface IHelloService { [OperationContract] [VVebGet(UriTemplate = "hello?namee{name}")] string SayHello(string name); } The implementation is as follows. public class HelloService: IHelloService { public string SayHello(string name) { return "Hello ".+ name; } } The senvice is self-hosted, and the hosting code is as follows. WebServiceHost svcHost = CreateHoseO; svcHost.OpenO; Console. ReadLineO; SrvHost.CloseO; You need to implement CreateHost so that the senvice has a single endpoint hosted at
Options
- AWebServiceHost svcHost new WebServiceHost(typeof(HelloService));
- BUr baseAddress = new Urit'http:I/localhost:800O1");
- CWebServiceHost svcHost = new Web Service Host(new HelloServiceO);
- DUr baseAddress new Uri('http //Iocalhost 8000/");
Unlock 70-513 to see the answer
You've previewed enough free 70-513 questions. Unlock 70-513 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.