[2016-New] GreatExam Microsoft 70-513 Practice Test Free Download (61-70)

2016 June Microsoft Official New Released 70-513 Q&As in GreatExam.com!

100% Free Download! 100% Pass Guaranteed!

Microsoft New Released Exam 70-513 exam questions are now can be download from GreatExam! All questions and answers are the latest! 100% exam pass guarantee! Get this IT exam certification in a short time!

Following questions and answers are all new published by Microsoft Official Exam Center: (The full version is in the end of the article!!!)

QUESTION 61
You are creating a Windows Communication Foundation (WCF) service.
You do not want to expose the internal implementation at the service layer.
You need to expose the following class as a service named Arithmetic with an operation named Sum:
public class Calculator
{
public int Add(int x, int y)
{
}
}
Which code segment should you use?

A.    [ServiceContract(Namespace=”Arithmetic”)]
public class Calculator
{
[Operation Contract(Action=”Sum”)]
public int Add(int x, int y)
{}
}
B.    [ServiceContract(ConfigurationName=”Arithmetic”)]
public class Calculator
{
[Operation Contract(Action=”Sum”)]
public int Add(int x, int y)
{}
}
C.    [ServiceContract(Name=”Arithmetic”)]
public class Calculator
{
[OperationContract(Name=”Sum”)]
public int Add(int x, int y)
{}
}
D.    [ServiceContract(Name=”Arithmetic”)]
public class Calculator
{
[OperationContract(ReplyAction=”Sum”)]
public int Add(int x, int y)
{}
}

Answer: C

QUESTION 62
You develop a Windows Communication Foundation (WCF) service.
Many client applications will consume the service.
You have the following requirements:
– You must enable client sessions on the service.
– The service must support multi-threaded operations.
– If a client application uses sessions, the lifetime of the service instance must be scoped to the lifetime of the session.
– If a client application does not use sessions, the lifetime of the service must be scoped to the lifetime of a method cal
You need to configure the service.
What should you do? (Each correct answer presents part of the solution. Choose three.)

A.    In the ServiceContract attribute, set the value of the InstanceContextMode property to
InstanceContextMode.PerSession.
B.    In the ServiceContract attribute, set the value of the SessionMode property to
SessionMode.Allowed.
C.    In the ServiceBehavior attribute, set the value of the InstanceContextMode property to
InstanceContextMode. PerSession.
D.    In the ServiceContract attribute, set the value of the ConcurrencyMode property to
ConcurrencyMode.Multiple
E.    In the ServiceBehavior attribute, set the value of the ConcurrencyMode property to
ConcurrencyMode.Multiple
F.    In the ServiceBehavior attribute, set the value of the SessionMode property to
SessionMode.Allowed.

Answer: BCE
Explanation:
B (not F): Service ContractAttribute.SessionMode Property
Gets or sets whether sessions are allowed, not allowed or required.
C (not A):
– ServiceBehaviorAttribute Class
ecifies the internal execution behavior of a service contract implementation.
– ServiceBehaviorAttribute.InstanceContextMode Property
Gets or sets the value that indicates when new service objects are created.
One of the InstanceContextMode values; the default value is PerSession.
E (not D): ServiceBehaviorAttribute.ConcurrencyMode Property
Gets or sets whether a service supports one thread, multiple threads, or reentrant calls.
Note:
Example:
[ServiceContract(
Namespace=”http://microsoft.wcf.documentation”,
SessionMode=SessionMode.Required
)]
[ServiceBehavior(
ConcurrencyMode=ConcurrencyMode.Single,
InstanceContextMode=InstanceContextMode.PerSession,
ReleaseServiceInstanceOnTransactionComplete=true
)]

QUESTION 63
You are developing a Windows Communication Foundation (WCF) service that contains the following service contract.
You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object.
What should you do?
631

A.    Add the following KnownType attribute to the Employee class and to the Customer class.
[KnownType(GetType(Person))]
B.    Implement the IExtensibleDataObject interface in the Person class.
C.    Implement the IExtension(ofType(T)) interface in the Person class.
D.    Add the following KnownType attributes to the Person class.
[KnownType(GetType(Employee))]
[KnownType(GetType(Customer))]

Answer: D

QUESTION 64
A Windows Communication Foundation (WCF) solution uses the following contracts. (Line numbers are included for reference only.)
01 [ServiceContract(CallbackContract=typeof(INameService))]
02 public interface IGreetingService
03 {
04 [OperationContract]
05 string GetMessage();
06 }
07
08 [ServiceContract]
09 public interface INameService
10 {
11 [OperationContract]
12 string GetName();
13 }
When the client calls GetMessage on the service interface, the service calls GetName on the client callback.
In the client, the class NameService implements the callback contract.
The client channel is created as follows:
22 InstanceContext callbackContext =
new InstanceContext(new NameService(“client”));
23 …
24 …
25 DuplexChannelFactory<IGreetingService> factory =
new DuplexChannelFactory<IGreetingService>(
typeof(NameService), binding, address);
26 IGreetingService greetingService = factory.CreateChannel();
You need to ensure that the service callback is processed by the instance of NameService.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A.    Change line 25 to the following code segment:
DuplexChannelFactory<IGreetingService> factory =
new DuplexChannelFactory<IGreetingService>
(callbackContext, binding, address);
B.    Change line 26 to the following code segment:
IGreetingService greetingServicefactory =
CreateChannel(callbackContext);
C.    Add the following code segment after line 26:
callbackContext.IncomingChannels.
Add((IDuplexChannel)greetingService);
D.    Add the following code segment after line 26:
callbackContext.OutgoingChannels.
Add((IDuplexChannel)greetingService);

Answer: AB

QUESTION 65
You are using tracing to diagnose run-time issues when you look at the traces for the service in Svc Trace viewer exe, you see what is shown in the exhibit (Click the Exhibit button)
The exception trace is selected in Svc Trace reviewer exe.
You need to interpret the trace results to determine where the error occurred and what to do next.
What should you do?
651

A.    This issue occurred in the ServiceHost during ServiceHost.Open().
Enable WMI by adding the following configuration to the system.serviceModel configuration
section in the application configuration file
<diagnostics wmiProviderEnabled=”true”/>
Restart the application and inspect the endpoints visible through WMI.
B.    This issue occurred in the ServiceHost during ServiceHost.Open().
Compare the security settings for any endpoints that use an MSMQ transport to the security
configuration of the MSMQ queue used by the endpoint.
C.    This issue occurred at the ServiceHost when receiving a message.
Compare the security configurations on the client and server to make sure that they are
compatible.
D.    This issue occurred at the ServiceHost when accepting an initial set of messages from
MSMQ.
Log all messages sent between the client and the sever.

Answer: B

QUESTION 66
You are creating an ASP.NET web application that hosts several Windows Communication Foundation (WCF) services.
The services have ASP.NET Compatibility Mode enabled.
Users authenticate with the Web application by using a cookie-based ASP.NET Forms Authentication model.
You add a service file named Authentication.svc that contains the following code segment:
<%@ ServiceHost Service=”System.Web.ApplicationServices.AuthenticationService”        Factory=”System.Web.ApplicationServices.ApplicationServicesHostFactory” %>
You need to ensure that users can access the WCF services without having to re-authenticate.
Which two configuration settings should you add? (Each is part of a complete solution. Choose two.)

A.    In the system web. Extensions scripting/webServices/authenticationService element, set
the enabled attribute to true.
B.    In the system web. Extensions scripting/webServices/profileService element, set the
enabled attribute to true.
C.    Add a service endpoint with basicHttpBinding for the contract
System.Web.ApplicationServices.AuthenticationService.
D.    Add a custom service behavior named AuthenticationService Type Behaviors with a
service AuthenticationManager element that has service AuthenticationManagerType set to
System.Web.Security.SQL Membership Provider

Answer: AC

QUESTION 67
You are developing a Windows Communication Foundation (WCF) service.
You must record all available information for the first 1,000 messages processed, even if they are malformed.
You need to configure the message logging section of the configuration file.
Which configuration segment should you use?

A.    <messageLogging logEntireMessage=”true”
logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″/>
B.    <messageLogging logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″/>
C.    <messageLogging logEntireMessage=”false”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”1000″/>
D.    <messageLogging logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”1000″/>

Answer: A

QUESTION 68
You are consuming a Windows Communication Foundation (WCF) service.
The service interface is defined as follows:
[DataContract(Namespace = ”]
public class Item
{
}
[ServiceContract(Namespace = ”)]
public interface Catalog
{
[OperationContract]    
[WebInvoke(Method=”POST”, UriTemplate=”{Item}”)]
Item UpdateItem(Item item);
}
The client application receives a WebResponse named response with the response from the service.
You need to deserialize this response into a strongly typed object representing the return value of the method.
Which code segment should you use?

A.    DataContractSerializer s = new DataContractSerializer(typeof(Item));
Item item = s.ReadObject(response.GetResponseStream()) as Item;
B.    BinaryFormatter f = new BinaryFormatter();
Item item = f.Deserialize(response.GetResponseStream() as Item;
C.    XmlDictionaryReader r = JsonReaderWriterFactory.CreateJsonReader(
response.GetResponseStream(),
XmlDictionaryReaderQuotas.Max);
DataContractSerializer s = new DataContractSerializer(typeof(Item));
Item item = s.ReadObject(r) as Item;
D.    DataContractJsonSerializer s = new DataContractJsonSerializer
(typeof(Item));
Item item = s.ReadObject(response.GetResponseStream()) as Item;

Answer: A

QUESTION 69
You are developing a Windows Communication Foundation (WCF) service that contains the following operation contract.
[OperationContract]
CustomerNames GetCustomerNames();
The operation returns customer names.
You need to develop a definition for the operation contract that produces XML with the following structure.
Which code segment should you use?
691

A.    [MessageContract(IsWrapped = false)]
public class CustomerNames
{
   [MessageBodyMember]
   public string[] Names;
}
B.    [MessageContract(WrapperName = “”)]
public class CustomerNames
{
   [MessageBodyMember]
   public string[] Names;
}
C.    [DataContract]
public class CustomerNames
{
   [DataMember]
   public string[] Names;
}
D.    [DataContract]
public class CustomerNames
{
   [DataMember(IsRequired = false)]
   public string[] Names;
}

Answer: A

QUESTION 70
You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms application.
The ServiceHost instance is created in the Form constructor.
You need to ensure that the service is not blocked while the UI thread is busy.
What should you do?

A.    Decorate the service implementation class with the following line of code
[ServiceBehavior(UseSyncronizationContext = false)]
B.    Decorate the service implementation class with the following line of code
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
C.    Call the Invoke method of the form and supply a delegate.
D.    Call the BeginInvoke method of the form and supply a delegate.

Answer: A

GreatExam gives the latest, authoritative and complete 70-513 braindumps for 70-513 exam, because of that, all of our candidates pass 70-513 certification without any problem. The biggest feature is the regular update of 70-513 PDF and VCE, which keeps our candidates’ knowledge up to date and ensures their 70-513 exam success.

2016 Microsoft 70-513 exam dumps (All 341 Q&As) from GreatExam:

http://www.greatexam.com/70-513-exam-questions.html [100% Exam Pass Guaranteed!!!]