This page was exported from Braindump2go Free Exam Dumps with PDF and VCE Collection [ https://www.mcitpdump.com ] Export date:Fri Apr 26 10:23:37 2024 / +0000 GMT ___________________________________________________ Title: Daily Updated 70-513 Practice Exam Questions Free Download From Braindump2go (291-300) --------------------------------------------------- MICROSOFT NEWS: 70-513 Exam Questions has been Updated Today! Get Latest 70-513 VCE and 70-513 PDF Instantly! Welcome to Download the Newest Braindump2go 70-513 VCE&70-513 PDF Dumps: http://www.braindump2go.com/70-513.html (341 Q&As) New Released Braindump2go Microsoft 70-513 Dumps PDF - Questions and Answers Updated with Microsoft Official Exam Center! Visit Braindump2go and download our 70-513 Exam Questions Now, Pass 70-513 100% at your first time! Exam Code: 70-513Exam Name: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4Certification Provider: MicrosoftCorresponding Certifications: MCPD, MCPD: Web Developer 4, MCPD: Windows Developer 4, MCTS, MCTS: Microsoft .NET Framework 4, Service Communication Applications70-513 Dumps PDF,70-513 eBook,70-513 VCE,70-513 PDF,70-513 Latest Dumps,70-513 Certification,70-513 Training Kit PDF,70-513 Braindump,70-513 Exam Dumps,70-513 Exam Book,70-513 Exam PDF,70-513 Exam Book,70-513 Exam Preparation,70-513 Dumps VCE,70-513 Practice Test,70-513 Pracrice Exam,70-513 Preparation Book QUESTION 291A 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(IeetingService04 <OperationContractO>05 Function GetMessage() As Stnng07 End Interface09 <ServiceContractO>10 Public Interface INameService12 <OperationContractO>13 Function GetName() As String15 End InterfaceThe code that implements the KleetingService interface is as follows.20 Public Class GretingService21 Impements lGreaingService23 Public Function GetMessage0As String -24 lmpements IGredingService. GetMessage26 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 Function33 hnd ClassThe 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()lThe code that implements the INameService interface is as follows.42 Class NameService43 lmpements INameService45 Dim name As String47 Public Sub NameService(ByV name As String)48 Me.reme = name49 End Sub51 Public Function GetName() As String -52 lmpements INameService. GeName54 Reti.rn name55 End Function56 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 successfullyWhat 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 292You 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 try03 {04     proxy.ProcessInvoice(invoice);05 }06 catch07 {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 293A 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 attributeB.    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 294You 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 295A 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" IsC.    <serviceAuthorization principalPermissionModes"None" roleProviderNames"SqlProvider" I>D.    <serviceAuthorization principalPermissionModez"None" roleProviderNamez'SqlProvider" /> Answer: B QUESTION 296A Windows Communication Foundation (WCF) service uses the following service contract.<ServiceContract>Public Interface IService <OperationContract0>?Function Operation 1 (RyVal s As String) As StringEnd 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 StringB.    <OperationContract0> <WebGet(UriTemplate: "POST')> Function Operation 1 (ByVal s As String) As StringC.    <OperationContract(ReplyAction: `POST")>Function Operation 1 (ByVal s As String) As StringD.    <OperationContract(Action:z"POST")>Function Operation 1 (ByVal s As String) As String Answer: A QUESTION 297A 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 ITeamMessageService03 {04 [OperationContract]05 string GetMessage0;07 [OperationContract]08 void PutMessage(string message);09)The code for the service class is as follows10 public class TeamMessageService: ITeamMessageService11 {12 Guid key = GuicLNewGuidO;13 string message = "Today's Message":14 public string GetMessage()15 {16 return stringFormat("Message:{0} Key:{1}",message, Key);1719 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 PutMessageWhat 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 followsstatic string message = "Today's Message";Then change the implementation of PutMessage in lines 19-22 to the followingpublic void PutMessage(string message) { TeamMessageServiceMessage.PutMessage;} Answer: A QUESTION 298A 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 = TrueB.    Define binding2 as follows.Dim binding2 As WSHttpBinding = -- New WSHttpBinding(SecurityMode.None) Add the following behavior to the service implementation. <ServceBehavior(lnstanceContextMode:1nstanceContextMode.PerSession)sC.    Define binding2 as follows.Dim binding2 As BasicHttpBinding = New BasicHttpBinding(BasicHttpSecurityMode.None) Enable cookies forbinding2.binding2.AllowCookies = TrueD.    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 299You 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 300A 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 All 341 Microsoft 70-513 Exam Dumps Questions are the New Checked and Updated! In recent years, the 70-513 certification has become a global standard for many successful IT companies. Looking to become a certified Microsoft professional? Download Braindump2go 2015 Latest Released 70-513 Exam Dumps Full Version and Pass 70-513 100%! FREE DOWNLOAD: NEW UPDATED 70-513 PDF Dumps & 70-513 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-513.html (341 Q&A) --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2015-11-26 02:48:35 Post date GMT: 2015-11-26 02:48:35 Post modified date: 2015-11-26 02:48:35 Post modified date GMT: 2015-11-26 02:48:35 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com