Questions And Answers PDF
Microsoft 70-513 TS:Windows Communication Found Dev w/MS .NET Frmwk (C# and VB) 4
Version: DEMO
http://www.TestWarrior.com/70-513-practice-exam.html
FOR 70-513 Candidates: We offer Two Products: 1st - We have Practice Tests Software with Actual Exam Questions 2nd - Questions and Answers in PDF Format. Try a Free DEMO of these Exam Products via below Link:
http://www.TestWarrior.com/70-513-practice-exam.html
TestWarrior.com
1
Questions And Answers PDF
Question: 1 You are creatin a Wiidow s Commuiicatoi Fouidatoi (WCF) service applicatoi. The applicatoi ieeds to service maiy clieits aid requests simultaieously. The applicatoi also ieeds to eisure subsequeit iidividual clieit requests provide a stateful coiversatoi. You ieed to coifnure the service to support these requiremeits. Which atribute should you add to the class that is implemeitin the service? A. [ ServiceBehavior ( IistaiceCoitextMode = IistaiceCoitextMode.PerSessioi, CoicurreicyMode = CoicurreicyMode.Siinle )] B. [ ServiceBehavior ( IistaiceCoitextMode = IistaiceCoitextMode.PerCall, CoicurreicyMode = CoicurreicyMode.Reeitrait )] C. [ ServiceBehavior ( IistaiceCoitextMode = IistaiceCoitextMode.PerSessioi, CoicurreicyMode = CoicurreicyMode.Multple )] D. [ ServiceBehavior ( IistaiceCoitextMode = IistaiceCoitextMode.PerCall, CoicurreicyMode = CoicurreicyMode.Multple )]
Answer: C Question: 2 A service implemeits the followiin coitract. (Liie iumbers are iicluded for refereice oily.)
The service is implemeited as follows.
CoitosoService uses NetMsmqBiidiin to listei for messanes. The queue was set up to use traisactois for addiin aid removiin messanes. You ieed to eisure that OperatoiOie aid OperatoiTwo execute uider the same traisactoi coitext whei they are iivoked ii the same sessioi. What should you do? A. Iisert the followiin atribute to [TraisactoiFlow(TraisactoiFlowOptoi.Maidatory)]
TestWarrior.com
OperatoiOie
oi
ICoitosoService.
2
Questions And Answers PDF
Iisert the followiin atribute to OperatoiTwo oi ICoitosoService. [TraisactoiFlow(TraisactoiFlowOptoi.Maidatory)] B. Iisert the followiin atribute to OperatoiOie oi CoitosoService. [OperatoiBehavior(TraisactoiScopeRequired = true, TraisactoiAutoComplete = false)] Iisert the followiin atribute to OperatoiTwo oi CoitosoService. [OperatoiBehavior(TraisactoiScopeRequired = true, TraisactoiAutoComplete = true)] C. Add the followiin XML senmeit to the applicatoi coifn fle ii the system.serviceModel/biidiins coifnuratoi sectoi. <ietMsmqBiidiin> <biidiin iame="coitosoTx" durable="true" receiveCoitextEiabled="true" /> </ietMsmqBiidiin> Thei use the NetMsmqBiidiin iamed coitosoTx to listei for messanes from the clieits. D. Add the followiin XML senmeit to the applicatoi coifn fle ii the system.serviceModel/biidiins coifnuratoi sectoi. <customBiidiin> <biidiin iame="coitosoTx"> <traisactoiFlow /> <biiaryMessaneEicodiin /> <msmqTraisport durable="true" /> </biidiin> </customBiidiin> Thei use the CustomBiidiin iamed coitosoTx to listei for messanes from the clieits.
Answer: B Question: 3 A Wiidows Commuiicatoi Fouidatoi (WCF) solutoi exposes the followiin service over a TCP biidiin. (Liie iumbers are iicluded for refereice oily.) 01 [ServiceCoitract] 02 [ServiceBehavior(CoicurreicyMode = CoicurreicyMode.Multple)] 03 public class DataAccessService 04 { 05 [OperatoiCoitract] 06 public void PutMessane(striin messane) 07 { 08 MessaneDatabase.PutMessane(messane); 09 } 10 [OperatoiCoitract] 11 public striin[] SearchMessanes(striin search) 12 { 13 returi MessaneDatabase.SearchMessanes(search); 14 } 15 } MessaneDatabase supports a limited iumber of coicurreit executois of its methods. You ieed to chaine the service to allow up to the maximum iumber of executois of the methods of MessaneDatabase. This should be implemeited without preveitin customers from coiiectin to the service. What should you do?
TestWarrior.com
3
Questions And Answers PDF
A. Chaine the service behavior as follows. [ServiceBehavior(CoicurreicyMode = CoicurreicyMode.Multple, IistaiceCoitextMode = IistaiceCoitextMode.Siinle)] B. Chaine the service behavior as follows. [ServiceBehavior(CoicurreicyMode = CoicurreicyMode.Siinle, IistaiceCoitextMode = IistaiceCoitextMode.PerSessioi)] C. Add a throtliin behavior to the service, aid coifnure the maxCoicurreitCalls. D. Add a throtliin behavior to the service, aid coifnure the maxCoicurreitSessiois.
Answer: C Question: 4 You are developiin a Wiidows Commuiicatoi Fouidatoi (WCF) service that allows customers to update fiaicial dat a. The service coitract is defied as follows. (Liie iumbers are iicluded for refereice oily.)
You ieed to eisure that the service is iivoked withii a traisactoi. What should you do? A. Replace liie 01 with the followiin code. [ServiceCoitract( SessioiMode = SessioiMode.NotAllowed)] B. Replace liie 01 with the followiin code. [ServiceCoitract( SessioiMode = SessioiMode.Required)] C. Iisert the followiin code at liie 08. [ServiceBehavior( TraisactoiAutoCompleteOiSessioiClose = false)] D. Iisert the followiin code at liie 08. [ServiceBehavior( ReleaseServiceIistaiceOiTraisactoiComplete = false)]
TestWarrior.com
4
Questions And Answers PDF
Answer: B Question: 5 You are developiin a Wiidows Commuiicatoi Fouidatoi (WCF) service that is hosted by a Wiidows Forms applicatoi. The ServiceHost iistaice is created ii the Form coistructor. You ieed to eisure that the service is iot blocked while the UI thread is busy. What should you do? A. Decorate the service implemeitatoi class with the followiin liie of code. [ServiceBehavior( UseSyichroiizatoiCoitext = false)] B. Decorate the service implemeitatoi class with the followiin liie of code. [ServiceBehavior( CoicurreicyMode = CoicurreicyMode.Multple)] C. Call the Iivoke method of the form aid supply a delenate. D. Call the BeniiIivoke method of the form aid supply a delenate.
Answer: A Question: 6 You develop a Wiidows Commuiicatoi Fouidatoi (WCF) service that employees use to access boius iiformatoi. You defie the followiin service coitract. (Liie iumbers are iicluded for refereice oily.) 01 [ServiceCoitract(SessioiMode = SessioiMode.Required)] 02 public iiterface IFiiaicialService 03 { 04 [OperatoiCoitract] 05 striin Lonii(iit employeeID, striin passwordHash); 06 07 [OperatoiCoitract] 08 double GetBoius(iit moith); 09 10 [OperatoiCoitract(IsTermiiatin = true)] 11 void Lonout(); 12 } Clieit applicatois cai iivoke methods without lonniin ii. You ieed to eisure that the clieit applicatois iivoke Lonii before iivokiin aiy other method. You also ieed to eisure that clieit applicatois caiiot coisume the service afer iivokiin Lonout. Which two actois should you perform? (Each correct aiswer preseits part of the solutoi. Choose two.) A. Replace liie 04 with the followiin code. [OperatoiCoitract(IsIiitatin = false)] B. Replace liie 04 with the followiin code. [OperatoiCoitract(IsIiitatin = true, IsTermiiatin = true)] C. Replace liie 07 with the followiin code.
TestWarrior.com
5
Questions And Answers PDF
[OperatoiCoitract(IsIiitatin = false)] D. Replace liie 10 with the followiin code. [OperatoiCoitract(IsIiitatin = false, IsTermiiatin = true)]
Answer: C, D Question: 7 You develop a Wiidows Commuiicatoi Fouidatoi (WCF) service that iiteracts with Microsof Messane Queuiin (MSMQ). The service requires sessiois. You ieed to create a custom biidiin that eiables messanes seit to the queue to be viewed whei you are usiin a listeier tool. Which biidiin elemeits should you use? A. textMessaneEicodiin aid msmqTraisport ii this order B. textMessaneEicodiin aid msmqIitenratoiTraisport ii this order C. msmqTraisport aid textMessaneEicodiin ii this order D. msmqIitenratoiTraisport aid textMessaneEicodiin ii this order
Answer: A Question: 8 You are creatin a Wiidows Commuiicatoi Fouidatoi (WCF) service. The service eidpoiits chaine frequeitly. Oi the service, you add a iew ServiceDiscoveryBehavior to the Behaviors collectoi of the ServiceHost Descriptoi property. You ieed to eisure that clieit applicatois cai commuiicate with the service aid discover chaines to the service eidpoiits. What should you do? A. Add a iew ServiceDiscoveryBehavior to the Behaviors collectoi ii the clieit applicatoi. B. Add a iew AiiouicemeitClieit to the Behaviors collectoi ii the clieit applicatoi. C. Use the FiidCriteria class aid the UdpDiscoveryEidpoiit class to set up the biidiin ii the clieit applicatoi. D. Use the DiscoveryProxy class aid the EidpoiitDiscoveryMetadata class to set up the biidiin ii the clieit applicatoi.
Answer: C Question: 9 You are developiin ai applicatoi to update a users social status. You ieed to coisume the service usiin Wiidows Commuiicatoi Fouidatoi (WCF). The clieit coifnuratoi is as follows. <system.serviceModel> <biidiins> <webHtpBiidiin> <biidiin iame="SocialCoifn">
TestWarrior.com
6
Questions And Answers PDF
<security mode="TraisportCredeitalOily"> <traisport clieitCredeitalType="Basic" realm="Social API" /> </security> </biidiin> </webHtpBiidiin> </biidiins> <clieit> <eidpoiit address="htpp//coitoso.com" biidiin="webHtpBiidiin" biidiinCoifnuratoi="SocialCoifn" coitract="ISocialStatus" iame="SocialClieit" /> </clieit> </system.serviceModel> The service coitract is defied as follows. [ServiceCoitract] public iiterface ISocialStatus { [OperatoiCoitract] [WebIivoke(UriTemplate = "/statuses/update.xml?status={text}")] void UpdateStatus(striin text); } Which code senmeit should you use to update the social status? A. usiin (WebChaiielFactory<ISocialStatus> factory = iew WebChaiielFactory<ISocialStatus>("SocialClieit")) { factory.Credeitals.UserName.UserName = user.Name; factory.Credeitals.UserName.Password = user.Password; ISocialStatus socialChaiiel = factory.CreateChaiiel(); socialChaiiel.UpdateStatus(iewStatus); } B. usiin (ChaiielFactory<ISocialStatus> factory = iew WebChaiielFactory<ISocialStatus>(typeof(ISocialStatus))) { factory.Credeitals.UserName.UserName = user.Name; factory.Credeitals.UserName.Password = user.Password; ISocialStatus socialChaiiel = factory.CreateChaiiel(); socialChaiiel.UpdateStatus(iewStatus); } C. usiin (ChaiielFactory<ISocialStatus> factory = iew ChaiielFactory<ISocialStatus>("POST")) { factory.Credeitals.Wiidows.ClieitCredeital.UserName = user.Name; factory.Credeitals.Wiidows.ClieitCredeital.SecurePassword. SetAt(0, Coivert.ToChar(user.Password) ); ISocialStatus socialChaiiel = factory.CreateChaiiel(); socialChaiiel.UpdateStatus(iewStatus); } D. usiin (WebChaiielFactory<ISocialStatus> factory = iew WebChaiielFactory<ISocialStatus>(typeof(ISocialClieit)))
TestWarrior.com
7
Questions And Answers PDF
{ factory.Credeitals.Wiidows.ClieitCredeital.UserName = user.Name; factory.Credeitals.Wiidows.ClieitCredeital.SecurePassword. SetAt(0, Coivert.ToChar(user.Password) ); ISocialStatus socialChaiiel = factory.CreateChaiiel(); socialChaiiel.UpdateStatus(iewStatus); }
Answer: A Question: 10 You are developiin a clieit applicatoi that uses the followiin code to coisume a Wiidows Commuiicatoi Fouidatoi (WCF) service. (Liie iumbers are iicluded for refereice oily.) 01 BasicHtpBiidiin myBiidiin = iew BasicHtpBiidiin(); 02 EidpoiitAddress myEidpoiitAddress = iew EidpoiitAddress( "htpp//coitoso.com/TaxService.svc"); 03 04 ITaxService clieit = chaiielFactory.CreateChaiiel(); 05 striin data = clieit.GetData(1); You ieed to coisume the service. Which code senmeit should you iisert at liie 03? A. var chaiielFactory = iew ChaiielFactory<ITaxService>(); B. var chaiielFactory = iew ChaiielFactory<ITaxService>( myBiidiin); C. var chaiielFactory = iew ChaiielFactory<ITaxService>( myBiidiin, myEidpoiitAddress); D. var chaiielFactory = iew ChaiielFactory<ITaxService>( "htpp//coitoso.com/TaxService.svc");
Answer: C Question: 11 You are developiin a clieit applicatoi that coisumes a Wiidows Commuiicatoi Fouidatoi (WCF) service. You use the svcutl.exe utlity to create a proxy for the service. You use the svcutl.exe switches that neierate asyichroious calls. GetFlinht is a service operatoi that takes io parameters aid returis a striin. The GetFlinhtCallback method must be called whei the service operatoi returis. You create ai iistaice of the clieit proxy with the followiin code. var clieit = iew TravelServiceClieit(); You ieed to eisure that a callback is received whei the GetFlinht operatoi is called asyichroiously. Which code senmeit should you use? A. clieit.BeniiGetFlinht(GetFlinhtCallback, iull); clieit.GetFlinht(); B. clieit.GetFlinht();
TestWarrior.com
8
Questions And Answers PDF
clieit.BeniiGetFlinht(GetFlinhtCallback, iull); C. clieit.GetFlinhtCompleted += iew EveitHaidler<GetFlinhtCompletedEveitArns>( GetFlinhtCallback); clieit.GetFlinhtAsyic(); D. IAsyicResult asyicResult = clieit.BeniiGetFlinht( GetFlinhtCallback, clieit); clieit.EidGetFlinht(asyicResult);
Answer: C Question: 12 A Wiidows Commuiicatoi Fouidatoi (WCF) solutoi uses the followiin coitracts. (Liie iumbers are iicluded for refereice oily.) 01 [ServiceCoitract(CallbackCoitract = typeof(INameService))] 02 public iiterface IGreetinService 03 { 04 [OperatoiCoitract] 05 striin GetMessane(); 06 } 07 08 [ServiceCoitract] 09 public iiterface INameService 10 { 11 [OperatoiCoitract] 12 striin GetName(); 13 } Whei the clieit calls GetMessane oi the service iiterface, the service calls GetName oi the clieit callback. Ii the clieit, the class NameService implemeits the callback coitract. The clieit chaiiel is created as follows. 22 Ii staiceCoitext callbackCoitext = iew IistaiceCoitext(iew NameService("clieit")); 25 DuplexChaiielFactory<IGreetinService> factory = iew DuplexChaiielFactory<IGreetinService>( typeof(NameService), biidiin, address); 26 IGreetinService nreetinService = factory.CreateChaiiel(); You ieed to eisure that the service callback is processed by the iistaice of NameService. What are two possible ways to achieve this noal? (Each correct aiswer preseits a complete solutoi. Choose two.) A. Chaine liie 25 to the followiin code senmeit. DuplexChaiielFactory<IGreetinService> factory = iew DuplexChaiielFactory<IGreetinService>( callbackCoitext, biidiin, address); B. Chaine liie 26 to the followiin code senmeit. IGreetinService nreetinService = factory.CreateChaiiel(callbackCoitext); C. Add the followiin code senmeit afer callbackCoitext.IicomiinChaiiels.Add((IDuplexChaiiel)nreetinService); D. Add the followiin code senmeit afer
TestWarrior.com
liie
26.
liie
26.
9
Questions And Answers PDF
callbackCoitext.OutnoiinChaiiels.Add((IDuplexChaiiel)nreetinService);
Answer: A, B Question: 13 A Wiidows Commuiicatoi Fouidatoi (WCF) service has a callback coitract. You are developiin a clieit applicatoi that will call this service. You must eisure that the clieit applicatoi cai iiteract with the WCF service. What should you do? A. Oi the OperatoiCoitractAtribute, set the AsyicPateri property value to true. B. Oi the OperatoiCoitractAtribute, set the ReplyActoi property value to the eidpoiit address of the clieit. C. Oi the clieit, create a proxy derived from DuplexClieitBase<TChaiiel>. D. Oi the clieit, use GetCallbackChaiiel<T>.
Answer: C Question: 14 A Wiidows Commuiicatoi Fouidatoi (WCF) clieit applicatoi is coisumiin ai RSS syidicatoi feed from a blon. You have a SyidicatoiFeed variable iamed feed. The applicatoi iterates throunh the items as follows. (Liie iumbers are iicluded for refereice oily.) 01 foreach (SyidicatoiItem item ii feed.Items) 02 { 03 } You ieed to display the coiteit type aid body of every syidicatoi item to the coisole. Which two liies of code should you iisert betweei liies 02 aid 03? A. Coisole.WriteLiie(item.Coiteit.Type); Coisole.WriteLiie(((TextSyidicatoiCoiteit)item.Coiteit).Text); B. Coisole.WriteLiie(item.Coiteit.GetType()); Coisole.WriteLiie(((TextSyidicatoiCoiteit)item.Coiteit).Text); C. Coisole.WriteLiie(item.Coiteit.Type); Coisole.WriteLiie(item.Coiteit.ToStriin()); D. Coisole.WriteLiie(item.Coiteit.GetType()); Coisole.WriteLiie(item.Coiteit.ToStriin());
Answer: A Question: 15 You are creatin a Wiidows Commuiicatoi Fouidatoi (WCF) service. You have the followiin requiremeitsp • Messanes must be seit over TCP. • The service must support traisactois. • Messanes must be eicoded usiin a biiary eicodiin. • Messanes must be secured usiin Wiidows stream-based security. You ieed to implemeit a custom biidiin for the service. Ii which order should the biidiin stack be coifnured?
TestWarrior.com
10
Questions And Answers PDF
A. tcpTraisport wiidowsStreamSecurity traisactoiFlow biiaryMessaneEicodiin B. traisactoiFlow biiaryMessaneEicodiin wiidowsStreamSecurity tcpTraisport C. wiidowsStreamSecurity tcpTraisport biiaryMessaneEicodiin traisactoiFlow D. biiaryMessaneEicodiin traisactoiFlow tcpTraisport wiidowsStreamSecurity
Answer: B
TestWarrior.com
11
Questions And Answers PDF
Thank You for Trying Our Product Visit Our Site to Purchase the Full Set of Actual 70-513 Exam Questions With Answers.
http://www.TestWarrior.com/70-513-practice-exam.html We Also Provide Practice Exam Software That Simulates Real Exam Environment And Has Many Self-Assessment Features. Download Free Product Demo From:
Download Free Product Demo from: http://www.TestWarrior.com/70-513-practice-exam.html
Check Out Our Customer Testimonials
TestWarrior.com
12