PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

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
Implements IHttpModule
Dim footerContent As String = “<div>Footer Content</div>”
Public Sub Dispose() Implements IHttpModule.Dispose
End Sub
End Class
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 ensure that client applications can communicate with the service and discover changes to the servi

You are creating a Windows Communication Foundation (WCF) service. The service
endpoints change frequently. On the service, you add a new ServiceDiscoveryBehavior to
the Behaviors collection of the ServiceHost Description property. You need to ensure that
client applications can communicate with the service and discover changes to the service
endpoints. What should you do?

You need to display the Error.aspx page if an unhandled error occurs on any page within the site

You are implementing an ASP.NET Web site. The root directory of the site contains a page named
Error.aspx. You need to display the Error.aspx page if an unhandled error occurs on any page within
the site. You also must ensure that the original URL in the browser is not changed. What should you
do?