PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

[ServiceContract| public interface IHelloService { [OperationContract] [VVebGet(UriTemplate = “hello?

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 http://localhost:8000/HelloService which code
segment should you use?

Which code segment should you use?

You are creating an ASP.NET Web site. You create a HTTP module named CustomModule, and you
register the module in the web.config file. The CustomModule class contains the following code.
public class CustomModule : IHttpModule
{
string footerContent = “<div>Footer Content</div>”;
public void Dispose( ) {}
}
You need to add code to CustomModule to append the footer content to each processed ASP.NET
page.
Which code segment should you use?

You need to enable this service to be hosted in IIS by changing the web.config file

You are developing a Windows Communication Foundation (WCF) service that will be
hosted in Microsoft Internet Information Services (IIS) 7.0. The service must be hosted in an
IIS application named Info. You need to enable this service to be hosted in IIS by changing
the web.config file. Which XML segment should you add to the web.config file

Which method of the FieldTemplateUserControl class should you override in the BooleanField class?

You are developing an ASP.NET Dynamic Data Web application. Boolean fields must display as Yes or
No instead of as a check box. You replace the markup in the default Boolean field template with the
following markup.
<asp:Label runat=”server” ID=”label” />
You need to implement the code that displays Yes or No. Which method of the
FieldTemplateUserControl class should you override in the BooleanField class?

Which message encoding should you use?

A Windows Communication Foundation (WCF) service is responsible for transmitting XML
documents between systems. The service has the following requirements: It must minimize
the transmission size by attaching the XML document as is without using escape characters
or base64 encoding. It must interoperate with systems that use SOAP but are not built on
the .NET platform. You need to configure the service to support these requirements. Which
message encoding should you use?