web analytics

New Released Exam Dumps Free Download In Lead2pass

Updated Lead2pass PDF And VCE Dumps

[2016-New] GreatExam Provides Latest Exam 70-513 Dumps VCE For Free Downloading (291-300)

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

100% Free Download! 100% Pass Guaranteed!

After purchasing the dumps for the 70-513 Exam from GreatExam, I had no doubt that I’d easily pass the exam. Bundle of thanks to GreatExam for helping me pass the exam without any troubles.

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

QUESTION 291
A Windows Communication Foixdation (WCF) solution uses the following contracts (Line numbers are included for reference only)
01 eServiceContract(Callback contract: GetType(lNameService))>
02 Putlic Interface I(IeetingService
04 <OperationContractO>
05 Function GetMessage() As Stnng
07 End Interface
09 <ServiceContractO>
10 Public Interface INameService
12 <OperationContractO>
13 Function GetName() As String
15 End Interface
The code that implements the KleetingService interface is as follows.
20 Public Class GretingService
21 Impements lGreaingService
23 Public Function GetMessage0As String –
24 lmpements IGredingService. GetMessage
26 Dim clientChann As INameService =
27 OperationContet. Current.
28 GetCallbackChamel(Of INameService)()
29 Dim clientName As String = clientChannelGetName()
30 Retumn String Format(“Hello {O)”, clientName)
32 End Function
33 hnd Class
The service is self-hosted The hosting code is as follows.
35 Dim host As SeniceHost =
36 New ServiceHost(GetType(GrstingService))?
37 Dim binding As NetTcpBinding =
38 New NetTcpBinding(Sec urityMode. None)
39 hostAddServiceEndpoint(‘Myapplication lGreetingService”.
40 bincng, net.tcp:Ilocalhost: 12345W)
41 HotOpen()l
The code that implements the INameService interface is as follows.
42 Class NameService
43 lmpements INameService
45 Dim name As String
47 Public Sub NameService(ByV name As String)
48 Me.reme = name
49 End Sub
51 Public Function GetName() As String –
52 lmpements INameService. GeName
54 Reti.rn name
55 End Function
56 End Class Currently, this code fails at runtime, and an Invalid Operation Exception is thrown at mne 25.
You need to correct the code so that the call from the service back to the client complets successfully
What e two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A.    Change the service contract definition in line 01 as follows.
[ServiceContract(CallbackContract = typeof(INameService),
SessionMode = SessionMode.Required)]
B.    Add the following attribute to the NameService class, before line 40.
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
C.    Add the following attribute to the GreetingService class, before line 20.
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
D.    Add the following attribute to the GreetingService class, before line 20.
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]

Answer: CD

QUESTION 292
You are working with a Windows Communication Foundation (WCF) client application that has a generated proxy named SampleServiceProxy.
When the client application is executing, in line 04 of the following code, the channel faults (Line numbers are included for reference only.)
01 SampleServiceProxy proxy = new SampleServiceProxy();
02 try
03 {
04     proxy.ProcessInvoice(invoice);
05 }
06 catch
07 {
08     if(proxy.State == CommunicationState.Faulted)
09     {
10         …
11     }
12 }
13 proxy.UpdateCustomer(customer);
You need to return proxy to a state in which it can successfully execute the call in line 13.
Which code segment should you use at line 10?

A.    proxy.Close();
B.    proxy = new SampleServiceProxy();
C.    proxy.Abort();
D.    proxy.Open();

Answer: B

QUESTION 293
A Windows Communication Foundation (WCF) service is generating a separate namespace declaration for each body member of a message contract, even though all body members share the same namespace.
You need to simplify the XML representation of your message contract so that the namespace is only declared once.
What should you do?

A.    Declare a wrapper namespace for the message contract by using the WrapperNamespace
property of the MessageContract attribute
B.    Explicitly set the Namespace property of all the MessageBodyMember attrbutes to the same
namespace.
C.    Declare all of the body members as properties of a DataContract class and use the class as
the only body member of the message contract.
D.    Declare all of the body members as properties of a separate MessageContract class and use
the class as the only body member of the message contract.

Answer: C

QUESTION 294
You are implementing a Windows Communication Foundation (WCF) client application that consumes the ICatalog and lCatalog2 service interfaces.
You need to ensure that the client discovers services implementing these interfaces.
The services may already be online or may come online within a 30 second time limit.
How should you use WCF Discovery to accomplish this?

A.    Create one FindCriteria object for each interface and set the Duration of each FindCriteria to
30 seconds. Call the FindAsync method of the DiscoveryClient class twice, one time for each
of the FindCriteria objects, to search for the services.
B.    Create one FindCriteria object for each interface and set the Duration of each FindCnteria to
two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search
for the services.
Within each loop iteration, call the Find method of the DiscoveryClient class once for each of
the FindCriteria objects.
Run the loop until a service is found or 30 seconds pass.
C.    Create a single FindCriteria object and add both interfaces to its ContractTypeNames
collection. Set the criteria’s Duration to two seconds.
Create a loop that calls the Find method of the DiscoveryClient class to search for the
services. Within each loop iteration, call the Find method of the DiscoveryClient class to
search for the services
Run the loop until a service is found or 30 seconds pass.
D.    Create a single FindCritera object and add both interfaces to the ContractTypeNames
collection. Set the Duration to 30 seconds and use the FindAsync method of the
DiscoveryClient class to search for the services.

Answer: B

QUESTION 295
A Windows Communication Foundation (WCF) service uses a list of application-defined roles for operations.
These roles are stored in a database.
You need to authorize calls against the list of roles retrieved from the database.
Which service behavior should you use to authorize the calls?

A.    <serviceAuthorization principalPermissionModez”None”
roleProviderNames”SqlProvider” />
B.    <serviceAuthorization principalPermissionMode=”None”
roleProviderNamee”SqlProvider” Is
C.    <serviceAuthorization principalPermissionModes”None”
roleProviderNames”SqlProvider” I>
D.    <serviceAuthorization principalPermissionModez”None”
roleProviderNamez’SqlProvider” />

Answer: B

QUESTION 296
A Windows Communication Foundation (WCF) service uses the following service contract.
<ServiceContract>
Public Interface IService <OperationContract0>?
Function Operation 1 (RyVal s As String) As String
End Interface
You need to ensure that the operation contract Operation 1 responds to HTTP POST requests.
Which code segment should you use?

A.    <OperationContract0> <Weblnvoke(Method:z’POST”)>
Function Operation 1 (ByVal s As String) As String
B.    <OperationContract0> <WebGet(UriTemplate: “POST’)>
Function Operation 1 (ByVal s As String) As String
C.    <OperationContract(ReplyAction: `POST”)>
Function Operation 1 (ByVal s As String) As String
D.    <OperationContract(Action:z”POST”)>
Function Operation 1 (ByVal s As String) As String

Answer: A

QUESTION 297
A Windows Communication Foundation (WCF) solution uses the following contract to share a message across its clients. (Line numbers are included for reference only.)
01 [ServiceContract]
02 public interface ITeamMessageService
03 {
04 [OperationContract]
05 string GetMessage0;
07 [OperationContract]
08 void PutMessage(string message);
09)
The code for the service class is as follows
10 public class TeamMessageService: ITeamMessageService
11 {
12 Guid key = GuicLNewGuidO;
13 string message = “Today’s Message”:
14 public string GetMessage()
15 {
16 return stringFormat(“Message:{0} Key:{1}”,
message, Key);
17
19 public void PutMessage(string message)
20 {
21 thismessage = message;
22 }
23 )
The senvice is self-hosted.
The hosting code is as follows.
24 ServiceHost host =
25 BasicHttpBinding binding =
new BasicHttpBinding(BasicHttpSecuntyMode.None):
26 host AddServiceEndpoint(
HMyApplication lTeamMessageService, binding,
“http:/Ilocalhost: 12345w);
27 host Open0;)
You need to ensure that all clients calling GetMessage will retrieve the same string, even if the message is updated by clients calling PutMessage
What should you do?

A.    Add the following attribute to the TeamMessageService class, before line 10.
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
B.    Add the following attribute to the TeamMessageService class, before line 10.
[ServiceBehavior(InstanceContextMode =
InstanceContextMode.PerSession)]
Then change the binding definition on the service at line 25, and on the client to the following
WSHttpBinding binding = new WSHttpBinding(SecurityMode.None);
binding.ReliableSession.Enabled = true;
C.    Pass a service instance to the instancing code in line 24, as follows.
ServiceHost host = new ServiceHost(new TeamMessageService());
D.    Redefine the message string in line 13, as follows
static string message = “Today’s Message”;
Then change the implementation of PutMessage in lines 19-22 to the following
public void PutMessage(string message)
{
TeamMessageServiceMessage.PutMessage;
}

Answer: A

QUESTION 298
A Windows Communication Foundation (WCF) solution provides a session-based counter.
The service is self-hosted.
The hosting code is as follows.
Dim host As ServiceHost = New ServiceHost(GetType(CounterService))
Dim bnding As NetTcpBinding =
New NetTcpBinding(SecurityMode.None)
host.AddServiceEndpoint(“MyApplication. ICounterService”,
binding, “net.tcp://localhost:23456”)
host. Open()
This service is currently exposed over TCP, but needs to be exposed to external clients over HTTP.
Therefore, a new service endpoint is created with the following code.
host.AddServiceEndpoint(”MyApplication. lCounterService”,
binding2, “http:/!localhost:12345′
You need to complete the implementation and ensure that the session-based counter will perform over HTTP as it does over TCP.
What should you do?

A.    Define binding2 as follows.
Dim binding2 As WS2007HttpBinding =
New WS200lHttpBinding(SecurityMode. None)
Configure binding2 as follows.
binding2.ReliableSession.Enabled = True
B.    Define binding2 as follows.
Dim binding2 As WSHttpBinding = —
New WSHttpBinding(SecurityMode.None)
Add the following behavior to the service implementation.
<ServceBehavior(lnstanceContextMode:
1nstanceContextMode.PerSession)s
C.    Define binding2 as follows.
Dim binding2 As BasicHttpBinding =
New BasicHttpBinding(BasicHttpSecurityMode.None)
Enable cookies for
binding2.
binding2.AllowCookies = True
D.    Define binding2 as follows.
Dim binding2 As BasicHttpBinding =
New BasicHttpBinding(BasicHttpSecurityMode. None)
add the following behavior to the service implementation.
<ServiceBehavior(lnstanceContextMode:
1nstanceContextMode.Single)>

Answer: A

QUESTION 299
You are developing a Windows Communication Foundation (WCF) service.
You write a method named Submit that accepts messages of the type System.ServiceModel.Channels.Message.
You need to process the body of the incoming messages multiple times in the method.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Use the GetBody method of the Message class to read the content of the messages.
B.    Use the CreateBufferedCopy method of the Message class to load the messages into memory.
C.    Use the WriteBodyContents method of the BodyWriter class to make a copy of the messages.
D.    Use the CreateMessage method of the MessageBuffer class to make a copy of the messages.

Answer: BD

QUESTION 300
A Windows Communication Foundation (WCF) service has the following contract:
[ServiceContract]
public class ContosoService
{
    [OperationContract]
    [TransactionFlow(TransactionFlowOption.Mandatory)]
    [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete=false)]
    void TxOp1(string value) {… };
    [OperationContract(IsTerminating=true)]
    [TransactionFlow(TransactionFlowOption.Mandatory)]
    [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete=false)]
    void TxOp2(string value)
    {
        …
        OperationContext.Current.SetTransactionComplete();
    }
}
The service and the clients that call the service use NetTcpBinding with transaction flow enabled.
You need to configure the service so that when TxOp1 and TxOp2 are invoked under the same client session, they run under the same transaction context.
What should you do?

A.    Update the service contract to read as follows.
[ServiceContract(SessionMode=SessionMode.Required)]
Add the following behavior to the service implementation
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
B.    Update the service contract to read as follows.
[ServiceContract(SessionMode=SessionMode.Allowed)]
Add the following behavior to the service implementation.
[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single,
ReleaseServiceInstanceOnTransactionComplete=false)]
C.    Update the service contract to read as follows
[ServiceContract(SessionMode=SessionMode.Allowed)]
Add the followng behavior to the service implementation.
[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
D.    Update the service contract to read as follows.
[ServiceContract(SessionMode=SessionMode.Required)]
Add the following behavior to the service implementation.
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]

Answer: A

I understood all of the questions very easily. I scored 96% on my first try. I am definitely going to spread the word amongst friends and colleagues. Keep up the great work.

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!!!]