2016 June Microsoft Official New Released 70-513 Q&As in GreatExam.com!
100% Free Download! 100% Pass Guaranteed!
GreatExam is ready to provide Microsoft candidates with 70-513 exam dumps which can be very helpful for getting Microsoft certification, which means that candidates can easily get access to the services of Microsoft 70-513 exam dumps, which will assure them 100% passing success rate. With GreatExam 70-513 exam dumps, it will be easy to pass your 70-513 exam at your first 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 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)]

(more…)