PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which type of binding should you use?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You want to use a built-in binding to support reliable sessions. You need to create a service that uses SOAP to transfer messages between endpoints. The service must deliver the messages only once, and in the same order in which they were sent. Which type of binding should you use?

Which code segment should you use?

You are creating an endpoint for a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You create the endpoint by using a custom binding. You write the following code segment.

BasicHttpBinding binding=new BasicHttpBinding();
binding.Security.Message.ClientCredentialType=
BasicHttpMessageCredentialType.Certificate;
binding.Security.Mode=BasicHttpSecurityMode.Message; CustomBinding cb=new CustomBinding(binding);
BindingElementCollection bec=cb.CreateBindingElements();

You need to prevent the custom binding from making a persistent connection to the service endpoint.
Which code segment should you use?

What should you do?

You create a user control named MySearchBox.ascx.

You plan to change the native search control in SharePoint to MySearchBox.ascx. You implement a Feature that contains the following code segment.

<Control Id=”SmallSearchInputBox”
Sequence=”100″
ControlSrc=”~/_controltemplates/MySearchBox/MySearchBox.ascx”>
</Control>

You discover that the MySearchBox.ascx control fails to appear. You need to ensure that the MySearchBox.ascx control appears.

What should you do?

Which code segment should you insert at line 04?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment for the service implementation. (Line numbers are included for reference only.)

01 public void PutMessage(Message msg)
02 {
03 string value=null;
05 }

You need to retrieve the content from the received message body and store it in the variable named value. Which code segment should you insert at line 04?