You are on page 1of 186

Microsoft 70-513

TS: Windows Communication Foundation Development with Microsoft .NET Framework 4

Practice Test
Version: 20.1

Microsoft 70-513: Practice Exam Topic 1, Main Questions

QUESTION NO: 1 DRAG DROP Exhibit: <endpoint address = http://www.PassGuide.com/PassGuideService Binding=netTc pBinding bindingConfiguraton-NetTcpBinding_PassGuideService contract="ServiceReference 1. IPassGuideService name=NetTcpBinding_PassGuideService"/>

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService use address tcp:www.PassGuide.com/PassGuideService to listens for messages. The logical address is www.PassGuide.com/PassGuideService The WCF client is configured as in the exhibit. However, the client is unable to communicate with the server. In what way must the configuration be adjusted?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

Microsoft 70-513: Practice Exam

QUESTION NO: 2 There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService has a callback contract. There is a client application PassGuideClient. PassGuideClient calls PassGuideService. How can you ensure that PassGuideClient and PassGuideService can communicate? Select two. A. B. C. D. E. F. G. Use the OperationContractAttribute.. On PassGuideService.. On PassGuideClient.. ..set set the Async Pattern property value to false ..set set the Async Pattern property value to true ..use GetCallbackChannel <T> ..add a proxy derived from DuplexClientBase <TChannel>

Answer: C,G Explanation:

QUESTION NO: 3 There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService has a callback contract. There is a client application PassGuideClient. PassGuideClient calls PassGuideService.
"Pass Any Exam. Any Time." - www.mooninternational.com.pk

Microsoft 70-513: Practice Exam How can you ensure that PassGuideClient and PassGuideService can communicate? Select two. A. B. C. D. E. F. G. Use the OperationContractAttribute.. On PassGuideService.. On PassGuideClient.. ..set set the Async Pattern property value to false ..set set the Async Pattern property value to normal ..use GetCallbackChannel (Of T) ..add a proxy derived from DuplexClientBase (Of TChannel)

Answer: C,G Explanation:

QUESTION NO: 4 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService supports transactions. Messages handled by PassGuideService must be encoded using a binary encoding, must be secured using Windows stream-based security, and must be sent over TCR. PassGuideService must implement a custom binding for the service. How should the stacking order be defined?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

Microsoft 70-513: Practice Exam

QUESTION NO: 5 DRAG DROP There is a WCF (Windows Communication Foundation) application PassGuideApp. PassGuideApp exposes a service as and end point (SOAP) for consumption by cross-platforms clients. You want to log messages that the service receives from the client. What action should you take?

"Pass Any Exam. Any Time." - www.actualtests.com

5 4

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 6 There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService communicates with a database PassGuideDB. PassGuideDB uses a workflow engine. PassGuideDB handles data access authorization. A security exception is raised an unauthorized user tries to access PassGuideDB. This exception must be transmitted the client that is calling PassGuideService. How can this be achieved? Select two. A. B. C. D. E. F. Use PassGuideDB.. Use PassGuideService.. ..and configure service Debug. ..and configure router. ..and configure router Security Audit. ..and configure Unhandled Exception

Answer: B,C Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

Microsoft 70-513: Practice Exam QUESTION NO: 7 There is a WCF (Windows Communication Foundation) service PassGuideService. There are out of-process process resources that PassGuideService must access on behalf of an originating caller. What should you do?

A. Use the service contract PrincipalPermissionAttribute.. B. Use ServiceSecurityContext.CurrentWindowsidentity.ImpersonationLevel.. C. ..and set the value to D. ..and change the value of bindingConfiguration attribute in the endpoint element of the configuration file to.. E. .. TokenImpersonationLevelDelegation F. .. wsHttpBinding G. .. ssHttpBinding H. .. Impersonation Answer: B,C,E Explanation:

QUESTION NO: 8 There is WCF (Windows Communication Foundation) application PassGuideApp. There is a data contract PassGuideData, with several data members, that is used by PassGuideApp. Consider a serialized instance of PassGuideData which is deserialized. If any of data members are not available PassGuideApp must throw a Serialization Exception. What action should you take? Select three. A. For each data member B. Use PassGuideData and.. C. Set a default value in each of the data member declarations. D. .. Set the IsRequired property.. E. .. Emit Default Value proper.. F. .. Order property.. G. ..add the Unknown Type attribute. H. ..add the Known Type attribute. I. ..to false. J. ..to true. K. .. to a unique integer value. L. .. to a unique string value. "Pass Any Exam. Any Time." - www.actualtests.com 7

Microsoft 70-513: Practice Exam Answer: A,D,J Explanation:

QUESTION NO: 9 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService exposes the operations PassGuide1 and PassGuide2. PassGuide1 should run with the identity of the client. PassGuide2 should run with the identity of the PassGuideService. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 10 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService handles accounting related processes. You must ensure that PassGuideService runs with the identity of the application that is calling PassGuideService. How can this be ensured?

"Pass Any Exam. Any Time." - www.actualtests.com

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 11 "Pass Any Exam. Any Time." - www.actualtests.com 10

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is secured. How can you track attempts to access PassGuideService that are unsuccessful? Select all that apply. A. Use the serviceAuthorization behavior.. B. Use the serviceDebugger behavior.. C. Use the serviceSecurityAudit behavior.. D. Use the security configuration element.. E. ..and use attribute.. F. ..and use method.. G. Mode H. messageAuthenticationAuditLevel I. includeExceptionDetailsInFaults J. authorizationManagerType K. ..and set it to.. L. True M. False N. Success O. Failure P. Service Q. Message Answer: C,E,H,K,O Explanation:

QUESTION NO: 12 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. There is also a WCF (Windows Communication Foundation) client application PassGuideApp. PassGuideApp uses HTTP to communicate with PassGuideService. Message logging must be enabled. The logging should includes tokens and nonces should be included in the logged security information. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

11

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

12

Microsoft 70-513: Practice Exam

QUESTION NO: 13 There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService generates separate namespace declarations for every body member the message contract. How can the XML representation of the message contract be simplified under the assumption that all body members have the same namespace? Select two or three. A. Add a new MessageContract Class PGClass0. B. For each MessageBodyMember attribute.. C. Add a new DataContract Class PGClass1. D. All body members should be declared as members of PGClass0. E. PGClass0 should be the only body member for the message contract. F. All body members should be declared as members of PGClass1. G. PGClass1 should be the only body member for the message contract. H. ..set the wrapper namespace property to the same namespace. I. ..set the namespace property to the same namespace.

"Pass Any Exam. Any Time." - www.actualtests.com

13

Microsoft 70-513: Practice Exam Answer: C,F,G Explanation:

QUESTION NO: 14 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. There is a method PassGuideSubmit. PassGuideSubmit handles System.ServiceModel.Channels.Message types of messages. For any message the body of the message is processed several times. How can this be ensured? Make use of method

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

14

Microsoft 70-513: Practice Exam

QUESTION NO: 15 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService uses POX (plain-old xML). Only POX, JSON, or ATOM formats must be used by /catalog.svcfitems operation when it responds. The usage of these same URL must be enforced whatever the result type. The response format must be determined through the Accepts HTTP header. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

15

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 16 DRAG DROP There is a WCF (Windows Communication Foundation) solution PassGuideSol. PassGuideSol uses two services, PassGuide1 and PassGuide2, to handle a shopping cart Service. PassGuide1 handles messages that contains line items between $0 and $1000. PassGuide2 handles messages that contains line items that total more than $1000. The business logic priority of PassGuide1 and PassGuide2 are the same. Which filters should be used to facilitate WCF routing to the PassGuide1 and PassGuide2?

"Pass Any Exam. Any Time." - www.actualtests.com

16

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 17 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. How can you ensure that other services are notified when PassGuideService starts?

"Pass Any Exam. Any Time." - www.actualtests.com

17

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 18 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. There is a a public non-transactional MSMQ queue PassGuideQueue. PassGuideService reads messages from PassGuideQueue. New PassGuideService must be tweaked to read messages from the failed-delivery queue. The endpoint configuration settings URI must be specified.

"Pass Any Exam. Any Time." - www.actualtests.com

18

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 19 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is currently exposing a contract over HTTP. Now the contract needs to be exposed over both HTTP and TCP. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

19

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 20 There is a WCF (Windows Communication Foundation) Web service PassGuideService. PassGuideService have problems handling larger messages. PassGuideService is not responding to messages larger than 96 KB. How can this be remedied? Select three "Pass Any Exam. Any Time." - www.actualtests.com 20

Microsoft 70-513: Practice Exam A. Use the httpRuntime element.. B. Use the endpoint binding.. C. ..and decrease the value of.. D. ..and increase the value of.. E. maxRequestLength F. maxBufferPoolSize G. minRequestLength H. minBufferPoolSize I. minBufferSize J. minReceivedMessageSize K. maxBufferSize L. maxReceivedMessageSize Answer: B,D,L Explanation:

QUESTION NO: 21 There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is handling transmission XML documents between systems. PassGuideService must be able to communicate with non .NET systems that uses SOAP. PassGuideService must not use base64 encoding or escape characters in the XML documents that is transferred. PassGuideService must minimize the size of transmission by attaching transmitted XML documents as is. How can this be ensured? Select two or three. A. Use XML encoding.. B. Use message encoding.. C. Use service encoding.. D. .. Text message encoding.. E. .. Message Transmission Optimization Mechanism (MTOM) F. ..hexadecimal G. ..binary H. ..with version set to null I. ..with version set to none J. ..with version set to SOAP 1.2 Answer: B,E Explanation: "Pass Any Exam. Any Time." - www.actualtests.com 21

Microsoft 70-513: Practice Exam

QUESTION NO: 22 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is going to be moved from development into production. In order to check the performance and health of PassGuideService you intend to enable all performance counter instances exposed by the ServiceModelService 40.0.0 counter group. Which action should be taken?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

22

Microsoft 70-513: Practice Exam

QUESTION NO: 23 DRAG DROP There are four WCF (Windows Communication Foundation) services. These services are hosted within MS IIS (Internet Information Services) application PassGuideApp. PassGuideApp must be tweaked so that every service and endpoint has a limit of 40 concurrent calls, and a limit of concurrent seasons to 20. In the web-config file there is no behavior configuration. What should be done?

"Pass Any Exam. Any Time." - www.actualtests.com

23

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

24

Microsoft 70-513: Practice Exam

QUESTION NO: 24 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted within a console application PassGuideApp. PassGuideService use the TimeService class to implement ITimeService service interface. To ensure HTTP communication how should the service endpoint be configured?

"Pass Any Exam. Any Time." - www.actualtests.com

25

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 25 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is hosted in MS IIS (Internet Information Services). There is a new application PassGuideApp. PassGuideService is hosted within PassGuideApp. The PassGuideService DLL is copied to PassGuideApp bin folder. How should the deployment of PassGuideService be completed?

"Pass Any Exam. Any Time." - www.actualtests.com

26

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 26 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. "Pass Any Exam. Any Time." - www.actualtests.com 27

Microsoft 70-513: Practice Exam PassGuideService will be hosted in MS IIS (Internet Information Services) 7.0. PassGuideService will be hosted in an IIS application PassGuideApp. How can enable PassGuideService so it it can be hosted in IIS?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

28

Microsoft 70-513: Practice Exam

QUESTION NO: 27 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService must be ASP.NET compatible in order to use session states. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

29

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 28 There is a WCF (Windows Communication Foundation) service PassGuideService. There is a WCF (Windows Communication Foundation) client proxy PassGuideClient. PassGuideClient was created with the Microsoft Visual Studio Add Service Reference command. PassGuideClient must be able to handle responses up to size of 8 MB. How can this be achieved? Select three. A. Change the configuration file by.. B. Change the contract of PassGuideClient by.. C. Change the contract of PassGuideService by.. D. ..setting the attribute maxBytesPerRead to.. E. ..setting the attribute maxBytesPerRead to.. F. ..setting the attribute maxReceivedMessageSize to.. G. ..setting the attribute maxBufferPoolSize to.. H. ..setting the attribute minBytesPerRead to.. I. ..setting the attribute minBytesPerRead to.. J. ..setting the attribute minReceivedMessageSize to.. K. ..setting the attribute minBufferPoolSize to.. L. .. 1048576. M. . 5242880 N. .. 8388608 Answer: A,F,N Explanation:

QUESTION NO: 29 "Pass Any Exam. Any Time." - www.actualtests.com 30

Microsoft 70-513: Practice Exam Exhibit: <script typeetext/javaScript src=Services/PassGuideService.svc/js/>

There is a resful WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is hosted by the ASP.NET application PassGuideApp. PassGuideApp hosts PassGuideService at location /Services/PassGuideService.svc. Client access PassGuideService through a JavaScript resource. See exhibit for an explicit page markup reference to PassGuideService. How can you obtain the debug version of JavaScipt service? Select two or three. A. B. C. D. E. F. G. Use <%@Page%> header.. Use the src attribute Use <%@ ServiceHos %> header for /Services/PassGuideService.sv.. ..in the script tag.. ..and set debug attribute to true. ..and set debug attribute to false. ..and append debug to it.

Answer: B,D,G Explanation:

QUESTION NO: 30 DRAG DROP There is a WCF (Windows Communication Foundation) client application PassGuideApp. There are two service interfaces PassGuide1 and PassGuide2. PassGuideApp consumes PassGuide1 and PassGuide2. You must make sure that PassGuideApp detects services that implement PassGuide1 and PassGuide2. Assume that the services to be detected are already online or comes online within 45 seconds. How can you enforce this behavior with WCF discovery?

"Pass Any Exam. Any Time." - www.actualtests.com

31

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

32

Microsoft 70-513: Practice Exam QUESTION NO: 31 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. When PassGuideService is stopped or started it sends notification. You want to enable the clients to log these notifications. Which class should be used?

Answer:

QUESTION NO: 32 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService.

"Pass Any Exam. Any Time." - www.actualtests.com

33

Microsoft 70-513: Practice Exam Which binding element should be used to be able to use a customized message-level security binding?

Answer:

QUESTION NO: 33 DRAG DROP You are employed as a developer at PassGuide.com. There is a WCF (Windows Communication Foundation) service PassGuideService. basicHttpBinding is used by the PassGuideService endpoint for its binding. At the moment clear text messages are allowed but now you need to ensure that the messages are encrypted when they are sent over the PassGuide.com network. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

34

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 34

"Pass Any Exam. Any Time." - www.actualtests.com

35

Microsoft 70-513: Practice Exam You are employed as a developer at PassGuide.com. There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is based on WSHttpBinding. Now you need to make sure that each caller must be authenticated on every call. You also prevent caching of request token. How can this be enforced? Choose three. A. Use the message security configuration.. B. Use the service implementation class.. C. ..and set stablishSecurityContext to.. D. ..and set clientCredentialType to.. E. .. and apply a ServiceBehavior attribute, and set InstanceContextMode property to.. F. True G. False H. Null I. Single J. Multiple K. Issuedtoken L. UserName Answer: A,C,G Explanation:

QUESTION NO: 35 You are employed as a developer at PassGuide.com. There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. During authentication PassGuideService must provide a certifixate of type X.509. How can this be enforced? Select two. A. B. C. D. E. F. G. Use the following method of the X509CertificateRecipientServiceCredential class.. Use the following method of the X509CertificateInitiatorServiceCredential class.. Use the following method of the X509CertificateServiceCredential class.. SetCertificate Authenticate TrustedStoreLocation Certificate "Pass Any Exam. Any Time." - www.actualtests.com 36

Microsoft 70-513: Practice Exam Answer: A,D Explanation:

QUESTION NO: 36 DRAG DROP Exhibit: <%@ServiceHost Service="System Web Application Services Authentication ServiceFactory="System.Web.ApplicationServices.AppicationServicesHostFactory%> You are employed as a developer at PassGuide.com. There is a ASP.Net web application PassGuideApp. PassGuideApp hosts a few WCF services. These services have ASP.NET Compatibility Mode enabled. A cookie-based ASR NET Forms Authentication model is used by PassGuideApp to authenticate users. There is a service file PassGuide.svc. PassGuide.svc includes the code in the exhibit. How can you ensure that users can access the services hosted by PassGuideApp without having to keep re-authenticating?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

37

Microsoft 70-513: Practice Exam

QUESTION NO: 37 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. To communicate PassGuideService uses a secure HTTP binding. The binding works in principal permission mode. The binding demands the users to supply their Windows logon credentials. Which property can be used to the caller identity?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

38

Microsoft 70-513: Practice Exam

QUESTION NO: 38 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. To communicate PassGuideService uses a secure HTTP binding. The binding works in principal permission mode. The binding demands the users to supply their Windows logon credentials. Which property can be used to the caller identity ?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

39

Microsoft 70-513: Practice Exam

QUESTION NO: 39 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService uses claims-based tokens. PassGuideService must be able to use claims when there are different names for the same elements. How can this be ensured?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

40

Microsoft 70-513: Practice Exam

QUESTION NO: 40 There is a WCF (Windows Communication Foundation) service PassGuideService. There are application-defined roles stored in a database PassGuideDB. PassGuideService uses a list of the roles stored in PassGuideDB. How can you ensure that calls are authorized with these roles? >Select two. A. Use the following service behaviour... B. Use the following service attribute... C. <serviceAuthorization principalPermissionMode=Custom roleProviderName=Ole> D. <serviceAuthorization principalPermissionMode=UseAspNetRoles roleProviderName=Ole> E. <serviceAuthorization principalPermissionMode=None roleProviderName=Ole> F. <serviceAuthorization principalPermissionMode=UseWindowsGroups roleProviderName=Ole> G. <serviceAuthorization principalPermissionMode=Custom roleProviderName=SqlProvider> H. <serviceAuthorization principalPermissionMode=UseAspNetRoles roleProviderName=SqlProvider> I. <serviceAuthorization principalPermissionMode=None roleProviderName=SqlProvider> J. <serviceAuthorization principalPermissionMode=UseWindowsGroups roleProviderName=SqlProvider> Answer: A,I Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

41

Microsoft 70-513: Practice Exam QUESTION NO: 41 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. The Windows Event Log is used by PassGuideService to log all authorization attempts. PassGuideService needs to be configured with a behavior to achieve this. Which behavior is appropriate?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

42

Microsoft 70-513: Practice Exam

QUESTION NO: 42 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is configured to accept messages that are encrypted and signed. There is a client PassGuideClient that is using PassGuideService. PassGuideClient is not working well. It is not receiving proper responses from PassGuideService. To troubleshoot this problem you need to verify that the messages from PassGuideClient are encrypted and signed. You would need to enable logging. Furthermore, you need to check the content of each message body before it is deserialized to a .NET object. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

43

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 43 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. There is a PassGuideClient that communicates with PassGuideService. There is a need of a comparison of PassGuideClient and PassGuideService traces. What should be done?

"Pass Any Exam. Any Time." - www.actualtests.com

44

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

45

Microsoft 70-513: Practice Exam

QUESTION NO: 44 DRAG DROP Exhibit: Opening System.ServiceModel.ServiceHost/8423414 Get configuration section. Get configuration section. MSMQ detected successfully. Throwing an exception. Error. Failed to open System.ServiceModel.ServiceHost Warning Faulted to System.ServiceModel.ServiceHost Warning ServiceHost faulted

"Pass Any Exam. Any Time." - www.actualtests.com

46

Microsoft 70-513: Practice Exam Message: Binding validation failed because the bindings MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. The channel factory or service host cannot be opened. There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService has some run-time problems. SvcTraceviewer.exe is used to retrieve tracing information. Parts of this information is being displayed in the exhibit. You are required to determine where the determine where the error occurred. You must also recommend what is the best action to take.

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

47

Microsoft 70-513: Practice Exam

Topic 2, C#

QUESTION NO: 45 DRAG DROP Contract exhibit: [ServiceContract] public interface IHelloService [OperationContract] [WebGet(UriTemplate =helloname={name})] string PassGuideHello(string name); } Class exhibit: public class HelloService: IHelloService { public string PassGuideHello(string name) { return Hi there + name;

"Pass Any Exam. Any Time." - www.actualtests.com

48

Microsoft 70-513: Practice Exam } } Hosting code exhibit: WebServiceHost svcHost = CreateHost(); svcHost.Open(); Console.ReadLine(); SrvHost.Close(); There is a WCF (Windows Communication Foundation) service PassGuideService. The contract of PassGuideService, the implementation, and self-hosted service hosting code are displayed in separate exhibits. A single endpoint, at http://PassGuide:7500/HelloService, is used for the implementation of CreateHost. Which code should you use?

"Pass Any Exam. Any Time." - www.actualtests.com

49

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 46 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is selfed-hosted within a console application. PassGuideService is implementing the DataAccess contract. The PassGuideApplication namespace includes a definition of the DataAccess contract. A ServiceHost instance must first be created and then be assigned to a host variable. The service host must be intantiated. Which code should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

50

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

51

Microsoft 70-513: Practice Exam

QUESTION NO: 47 DRAG DROP There is a WCF (Windows Communication Foundation) service application PassGuideApp. PassGuideApp is required to provide service to a heavy client request load, even simulatanous requests. Stateful conversation must be provided for each ensure subsequent individual client request. Which attribute should be added to the class implementation?

"Pass Any Exam. Any Time." - www.actualtests.com

52

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 48 ServiceContract Exhibit: Your service has the rollowing service contract. [ServiceContract] public class PassGuideService { [OperationContract] public Boolean PassGuideConfirm(string PhoneNumber, double wage, integer EmployeeNumber) {} }

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService exists within SOA (Service Oriented Architecture) within an enterprise. The serviceContact of PassGuideService is displayed in the exhibit. Method PassGuideConfirm, when executed, must be participate transperentally in existing transactions.Furthermore, when there is no existing transaction, a new transaction must be created. How should the ServiceContract be tweaked to achieve is?

"Pass Any Exam. Any Time." - www.actualtests.com

53

Microsoft 70-513: Practice Exam A. Use the PassGuideConfirm method.. B. Use the ServiceContract.. C. ..add the following attribute.. D. ..add the following code inside the definition .. E. [OperationBehavior(TransactionScopeRequired false)] F. [OperationBehavior(TransactionScopeRequired true)] G. [OperationBehavior(TransactionAutoComplete true)] H. [OperationBehavior(TransactionAutoComplete false)] I. using(new CommittableTransaction()) J. using(new TransactionScope ()) Answer: A,C,F Explanation:

QUESTION NO: 49 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. The clients and the service that uses PassGuideService use NetTcpBinding (transaction flow enabled). Assuming that the operations PassGuideOP1 and PassGuideOP2 are called within the same client session, you need to enforce that they are executed within the same transaction context. Which contract should PassGuideService have?

"Pass Any Exam. Any Time." - www.actualtests.com

54

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

55

Microsoft 70-513: Practice Exam

QUESTION NO: 50 Contract exhibit: [ServiceContract(CallbackContract typeof(INameService))] public interface IGreetingSennce { [OperationContract]

string GetMessage0, }

"Pass Any Exam. Any Time." - www.actualtests.com

56

Microsoft 70-513: Practice Exam [ServiceContract] public interface INameService { [OperationContract] string GetName(); } IGreetingService interface exhibit: public class GreetingService IGreetingService { public string GetMessage() { INameService clientChannel OperationContext Current.GetCallbac kChannel <INameService>; using clientName = clientChanne[GetName()]; return String.Format(Hi there {0}, clientName); }}

Hosting code exhibit: ServiceHost host = new ServiceHost(typeof(GreetingService)); NetTcpBinding binding = new NetTcpBinding(SecurityMode.None); host Add ServiceEndpoint(PassGuideAppIGreetingService", binding, net.tcp:localhost = 96374"); host Open(); INameService interface exhibit: class NameService INameService {

"Pass Any Exam. Any Time." - www.actualtests.com

57

Microsoft 70-513: Practice Exam string name; public NameService(string name) { this.name = name; } public string GetName() { return name; }}

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. The implementations of contracts, the IGreetingService interface, the hosting code, and the INameService interface are all being displayed in the exhibits. At the moment the above code fails at line return String.Format(Hi there {0}, clientName);. You need to tweak the code in order to make it work. What should you do? (select three) Use code A. [ServiceContract(CallbackContract = typeof(INameService), SessionMode = SessionMode. Required)] B. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Unique)] C. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)] D. ..and Insert the following code before the first line in the implementation of.. E. ..and replace the first in the implementation of.. F. ..the contracts. G. .. the IGreetingService interface H. .. the hosting code I. .. INameService interface Answer: C,D,G Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

58

Microsoft 70-513: Practice Exam

QUESTION NO: 51 Contract exhibit: [ServiceContract(CallbackContract typeof(INameService))] public interface IGreetingSennce { [OperationContract] string GetMessage0, } [ServiceContract] public interface INameService { [OperationContract] string GetName(); } IGreetingService interface exhibit: public class GreetingService IGreetingService { public string GetMessage() { INameService clientChannel OperationContext Current.GetCallbac kChannel <INameService>; using clientName = clientChanne[GetName()]; return String.Format(Hi there {0}, clientName); }}

"Pass Any Exam. Any Time." - www.actualtests.com

59

Microsoft 70-513: Practice Exam Hosting code exhibit: ServiceHost host = new ServiceHost(typeof(GreetingService)); NetTcpBinding binding = new NetTcpBinding(SecurityMode.None); host Add ServiceEndpoint(PassGuideAppIGreetingService", binding, net.tcp:localhost = 96374"); host Open(); INameService interface exhibit: class NameService INameService { string name; public NameService(string name) { this.name = name; } public string GetName() { return name; }}

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. The implementations of contracts, the IGreetingService interface, the hosting code, and the INameService interface are all being displayed in the exhibits. At the moment the above code fails at line return String.Format(Hi there {0}, clientName);. You need to tweak the code in order to make it work. What should you do? (select three)

"Pass Any Exam. Any Time." - www.actualtests.com

60

Microsoft 70-513: Practice Exam Use code A. [ServiceContract(CallbackContract = typeof(INameService), SessionMode = SessionMode. Required)] B. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Unique)] C. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] D. ..and Insert the following code before the first line in the implementation of.. E. ..and replace the first line in the implementation of.. F. ..the contracts. G. .. the IGreetingService interface H. .. the hosting code I. .. INameService interface Answer: C,D,G Explanation:

QUESTION NO: 52 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. Which WCF service code should be used when your goal is to provide the clients a good response time from PassGuideService?

"Pass Any Exam. Any Time." - www.actualtests.com

61

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 53 DRAG DROP Service implementation exhibit: class PassGuideService: IPassGuideService { public void PassGuideOp1(string value) {} public void PassGuideOp2(string value) { } }

Contract exhibit: [ServiceContract(SessionMode s SessionMode Required)] public interface IPassGuideService { [OperationContract(IsOneWay = true, IsInitiating = true)] void PassGuideOp1(string value); [OperationContract(IsOneWay = true, IsInitiating = false)] "Pass Any Exam. Any Time." - www.actualtests.com 62

Microsoft 70-513: Practice Exam void PassGuideOp2(string value); } There is a WCF (Windows Communication Foundation) service PassGuideService. The contract and implementation of PassGuideService is being displayed in the exhibits. NetMsmqBinding us used by PassGuideService to listen for messages. The queue is configured to use transactions for removing and adding messages. How can you ensure that PassGuideOp1 and PassGuideOp2 runs within the same transaction whenever they are called within the same session?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

63

Microsoft 70-513: Practice Exam

QUESTION NO: 54 DRAG DROP ContractExhibit: Interface [ServiceContract] public interface IPassGuideService { [OperationContract] void SaveEmployee(Employee person); } Binding exhibit: NetTcpBinding binding new NetTcpBinding { TransactionFlow = true }; Client Call exhibit: using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) { IPassGuideService client = factoryCreateChannel(); "Pass Any Exam. Any Time." - www.actualtests.com 64

Microsoft 70-513: Practice Exam client SaveEmployee(employee); ConsoleWriteLine( TransactionCurrentTransactionlnformation. DistributedIdentifier); tsComplete(); } SaveEmployee Exhibit: public void IPassGuideService SaveEmployee(Employee employee) { employee.Save(); ConsoleWriteLine(TransactionCurrentTransactionlnformation. Distributedidentifier); }

There is a WCF (Windows Communication Foundation) service PassGuideService. The service and the client has the service contract displayed in the contract exhibit. The binding of the service and the client is displayed in the binding exhibit. The client call exhibit displays how the client calls PassGuideService. The implementation of the PassGuideService SaveEmployee method is displayed in the SaveEmployee Exhibit. However, there is a problem. There is distributed identifier mismatch between the client and PassGuideService. How can this be remedied?

"Pass Any Exam. Any Time." - www.actualtests.com

65

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 55 DRAG DROP There is a WCF (Windows Communication Foundation) solution for PassGuide. You need to specify the contract complying to the following requirements: PassGuideInitialize can always be called before PassGuideTerminate is called. PassGuideSomething can only be called after PassGuideInitialize has been called.

"Pass Any Exam. Any Time." - www.actualtests.com

66

Microsoft 70-513: Practice Exam PassGuideSomething cannot be called after PassGuideTerminate has been called. PassGuideTerminate can only be called after PassGuideInitialize has been called. Which contract should be used?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

67

Microsoft 70-513: Practice Exam

QUESTION NO: 56 DRAG DROP Hosting Code Exhibit: ServiceHost host = new ServiceHost(typeof(CounterService)); NetTcpBinding bind1 = new NetTcpBinding(SecurityMode None); host.AddServiceEndpoint(PassGuideApp.ICounterService, bind1, net.tcp://localhost: 98765); host.Open0; Bind2 exhibit: host.AddServiceEndpoint(PassGuideApp.ICounterService, bind2, http:Illocalhost: 98765);

"Pass Any Exam. Any Time." - www.actualtests.com

68

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) self-hosted service PassGuideService. PassGuideService provides a session-based counter. PassGuideService is exposed over TCP. The PassGuideService hosting code is being displayed in the exhibit. PassGuideService must also be exposed over HTTP for external clients. The session-counter must be able to perform over HTTP at it does over TCP. How should bind2 be defined and configured?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

69

Microsoft 70-513: Practice Exam

QUESTION NO: 57 DRAG DROP Exhibit: [ServiceContract] [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] public class DataAccessService { [OperationContract] public void PutMessage(string message) { MessageDatabase.PutMessage(message); } [OperationContract] public string SeachMessages(string search) { return MessageDatabase.SearchMessages(search); } } There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is specified in the exhibit. PassGuideService is used over a TCP binding. At the moment MessageDatabase only support a small finite number of concurrent executions of the methods belonging to it. While not preventing users to connecting to PassGuideService you need to tweak the performance of PassGuideService so it allows the maximum number calls the methods. What should be done? "Pass Any Exam. Any Time." - www.actualtests.com 70

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 58 DRAG DROP Exhibit: [ServiceContract] public interface ITeamMessageService {

"Pass Any Exam. Any Time." - www.actualtests.com

71

Microsoft 70-513: Practice Exam [OperationContract] string GetMessage0; [OperationContract] void PutMessage(string message); }

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService uses the contract being displayed in the exhibit. PassGuideService is used to share messages between the clients. You need to ensure that all the clients receive the same message from the GetMessage method, even if the PutMessage method is used by another client. Which code should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

72

Microsoft 70-513: Practice Exam }

Answer:

QUESTION NO: 59 DRAG DROP Data contract Exhibit: [DataContract] public class Employee { [DataMember] public string Name, [DataMember]

"Pass Any Exam. Any Time." - www.actualtests.com

73

Microsoft 70-513: Practice Exam public string City: [DataMember] public mnt Wage; [DataMember] public int EMPLOYEEID; } XML exhibit: <Employee> <Name xsi:niltrue/> <City xsi:nil true"/> < EMPLOYEEID >123456789 </ EMPLOYEEID > </Employee> There is WCF (Windows Communication Foundation) application PassGuideApp. PassGuideApp uses the data contract being displayed data contract exhibit. The XML code in the XML exhibit must be produces with the data contract is serialized. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

74

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 60 DRAG DROP There is WCF (Windows Communication Foundation) service which is being implemented. The error information that is being sent to the user should not include stack trace information. Which code should you use?

"Pass Any Exam. Any Time." - www.actualtests.com

75

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 61 DRAG DROP Exhibit: public class Machine { public int Multiply(int x, nty) { } } There is WCF (Windows Communication Foundation) service which is being implemented. You use the class displayed in the exhibit. The class must be exposed as a service named PassGuideA and operation OperationX. The internal implementation at the service layer should not be exposed. Which code should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

76

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 62 DRAG DROP "Pass Any Exam. Any Time." - www.actualtests.com 77

Microsoft 70-513: Practice Exam There is WCF (Windows Communication Foundation) service PassGuideService. A data contract PassGuideContract for PassGuideService is being implemented. PassGuideContract must be forward-compatible. The round trips must include the information in PassGuideContract. It should be able to add ew data members to PassGuideContract. You do have to follow a strict schema validitiy. Which interface should be used for PassGuideContract class?

Answer:

QUESTION NO: 63

"Pass Any Exam. Any Time." - www.actualtests.com

78

Microsoft 70-513: Practice Exam Contract exhibit: [ServiceContract(Namespaces"http://PassGuide.com)] public interface IShipping { [OperationContract] string PassGuideWork(int id); } There is a WCF (Windows Communication Foundation) application PassGuideApp. There is a WCF (Windows Communication Foundation) service PassGuideService. The contract of PassGuideService is being displayed in the exhibit. PassGuideApp is also hosting other services. PassGuideApp endpoints use SOAP 1.2 bindings with WS-Addressing 1.0. There is one single lister configured in System.ServiceModel.MessageLogging trace source of the system.diagnostics configuration section. Only the messeages that the PassGuideWork operation returns should be logged. How should this be achieved? Select four.

A. Use system.serviceModel/diagnostics/messageLogging/filters B. Use system.machineModel/diagnostics/messageLogging/filters C. ..and add XML code.. D. ..add add attribute code.. E. <add xmlns:soap="http://www.w3.org/2003/05/soap-envelope> F. <add xmlns:addr=http://www.w3.org/2005/08/addressing> G. <add xmlns: soap=http://www.w3.org/2003/05/soap-envelope> H. <add xmlns: addr="http://www.w3.org/2005/08/addressing> I. //soap:Action[text() = 'http://PassGuide.com/IShipping/PassGuideWorkResponse] </add> J. //soap:Action[text() = http://PassGuide.com/IShipping/PassGuideWork'] </add> K. //addr:Action[text() = 'http://PassGuide.com/IShipping/PassGuideWorkResponse] </add> L. //addr:Action[text() = http://PassGuide.com/IShipping/PassGuideWork'] </add> Answer: A,C,F,K Explanation:

QUESTION NO: 64 DRAG DROP

"Pass Any Exam. Any Time." - www.actualtests.com

79

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) service IPassGuideService in class PassGuideService. PassGuideService intermittently throws an exception and then fails. Now you need to handle the unhandled exceptions to clients by sending the stack trace of these to the clients as a fault message. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

80

Microsoft 70-513: Practice Exam

QUESTION NO: 65 DRAG DROP Soap envelope exhibit: <s:Envelope xmlns:sehttp://schemas.xmlsoporg/soap/enveloper> <s: Header> <h:PassGuideID xmlns = "http:/www.PassGuide.com> 9283 </h: PassGuideID> </s:Header> <s:Body> <PassGuideStock xmlns=http://www.PassGuide.com> <ParticularID>1234 </ ParticularID > </PassGuideStock> </s: Body> </s: Envelope>

"Pass Any Exam. Any Time." - www.actualtests.com

81

Microsoft 70-513: Practice Exam The SOAP envelope in the exhibit must be generated. How should this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

82

Microsoft 70-513: Practice Exam

QUESTION NO: 66 DRAG DROP PassGuideService exhibit: [OperationContract] void PassGuideService(Order data);

There is a client PassGuideClient. PassGuideClient sends multiple SOAP message to a WCF (Windows Communication Foundation) service method PassGuideService. PassGuideService must be tweaked so that any SOAP message can be received. Which code should you use?

"Pass Any Exam. Any Time." - www.actualtests.com

83

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 67 DRAG DROP PassGuideService Exhibit: [ServiceContract] public interface PassGuideService { [OperationContract] DateTime GetPassGuideServiceTime; } There is a class PassGuideService. PassGuideService is hosted within an ASP.NET application PassGuideApp. PassGuideService implements the interface being displayed in the exhibit. "Pass Any Exam. Any Time." - www.actualtests.com 84

Microsoft 70-513: Practice Exam PassGuideApp must be tweaked so that the GetPassGuideServiceTime method returns the result formatted as JSON when request url ends in /PassGuide. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

85

Microsoft 70-513: Practice Exam

QUESTION NO: 68 Exhibit: string void PassGuideDelete(string PassGuideId); There is a WCF service PassGuideService. PassGuideService implements restful manner operations. The PassGuideDelete method is implemented as displayed in the exhibit. When a client calls PassGuideService with the HTTP DELETE operation PassGuideService must use this method. How can this be achieved? Select two or three. A. Use the operation.. B. Change the return type to.. C. Change the string PassGuideID parameter.. "Pass Any Exam. Any Time." - www.actualtests.com 86

Microsoft 70-513: Practice Exam D. ..and add attribute E. ..add method.. F. .. WebInvoke(UriTemplate = "/Items/(id,Method=DELETE") G. .. HttpDelete H. ..DeleteHttp I. ..text. J. ..RemovedActivityAction Answer: A,D,F Explanation:

QUESTION NO: 69 DRAG DROP Service Contract exhibit: [ServiceContract] public interface IService { [OperationContract] string PassGuideOp (string s); } There is a WCF service PassGuideService. PassGuideService uses the service contract in the exhibit. PassGuideOp must respond to HTTP POST request. How can this be ensured?

"Pass Any Exam. Any Time." - www.actualtests.com

87

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 70 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is implementing a contract through one-way and request reply operations. PassGuideService is exposed over a TCP transport. End users use a router to access PassGuideService. How should the router be implemented?

"Pass Any Exam. Any Time." - www.actualtests.com

88

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

89

Microsoft 70-513: Practice Exam

QUESTION NO: 71 DRAG DROP Exhibit: You are modifying an existing Windows Communication Foundation (WCF) service that is defined as follows [ServiceContract] public interface MessageProcessor { [OperationContract] void PassGuideProcess () public class MessageProcessor: IMessageProcessor { public void ProcessMessage()

"Pass Any Exam. Any Time." - www.actualtests.com

90

Microsoft 70-513: Practice Exam PassGuideSubmit(); } There is a WCF (Windows Communication Foundation) service PassGuideService. It is defined in the exhibit. PassGuideSubmit uses another service not defined above. There is performance problem with the PassGuideProcess method when it is run in heavy load. Processing of multiple messages must be supported. Additionaly you must make sure that new messages is only processed when PassGuideProcess is not waiting for request and there is no waiting for PassGuideSubmit processes to finish. How can this be ensured?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

91

Microsoft 70-513: Practice Exam

QUESTION NO: 72 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. There is a client for PassGuideService. Which class should be used when you want to create a proxy to consume this service?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

92

Microsoft 70-513: Practice Exam

QUESTION NO: 73 DRAG DROP There is a WCF (Windows Communication Foundation) service client application PassGuideService. There is a proxy named PassGuideServiceProxy You need to provide code that are able to catch and handle errors for this proxy. Which code should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

93

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 74 DRAG DROP Exhibit: <client> <endpoint address=nettcp://server/PassGuideService Binding=netTcpBinding Contracts PassGuide.IPassGuideService name=netTcp /> <endpoint address=net.pipe://localhost/PassGuideService Binding=netNamedPipeBinding" Contracts PassGuide.IPassGuideService Name=netPipe" /> </client>

"Pass Any Exam. Any Time." - www.actualtests.com

94

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) service client PassGuideServiceClient. The system ServiceModel element of PassGuideServiceClient includes the XML element that is being displayed in the exhibit. There is a need of channel factory. The channel factory should send messages to endpoint listening at net.pipe://localhost/PassGuideService. Which code should be used for the channel factory?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

95

Microsoft 70-513: Practice Exam

QUESTION NO: 75 DRAG DROP Exhibit: [ServiceContract(CallbackContract = typeof(INameService))] public interface IGreetingService { [OperationContract] string PassGuideMessage(); } [ServiceContract] public intetface INameService { [OperationContract] string PassGuideName(); }

"Pass Any Exam. Any Time." - www.actualtests.com

96

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) solution PassGuideSol, which is using some contracts being displayed in the exhibit. Whenever the client uses PassGuideMessage on the service interface, the service uses the client callback to call PassGuideName. Within the client the callback contract is implemented by the NameService class. The service callback must processed by an instance of NameService. How should the client channed be implemented?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

97

Microsoft 70-513: Practice Exam

QUESTION NO: 76 DRAG DROP Exhibit: [ServiceContract] public interface IDataService [OperationContract] string PassGuideData(); There is a WCF (Windows Communication Foundation) solution PassGuideSol, which is exposing the contract being displayed in the exhibit. At the moment calls to PassGuideData has a 10 seconds completion time. Current client calls makes blocking calls to PassGuideData. New clients must be allowed to make non-blocking calls to obtain data from PassGuideData.

"Pass Any Exam. Any Time." - www.actualtests.com

98

Microsoft 70-513: Practice Exam At the same time the existing clients must not break. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

99

Microsoft 70-513: Practice Exam

QUESTION NO: 77 DRAG DROP Exhibit: [ServiceContract] public interface IDataAccessService { [OperationContract] void PassGuidePut(string message) [OperationContract] [FaultContract(typeof(TimeoutFaultException)) [FaultContract(typeof(FaultException))] string PassGuideSearch(string search); } There is a WCF (Windows Communication Foundation) service. The service implements the contract being displayed in the exhibit. Database timeouts causes PassGuideSearch to throw TimeoutFaultException exceptions. Other issues that causes problems for PassGuideSearch thows Exceptions. The clients receives the exceptions as generic FaultException exceptions. A new channel must be created on the client. New error handling code for PassGuideSearch must be created. This code should only handle errors on the new channel. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

100

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 78 DRAG DROP Exhibit: [ServiceContract] public interface ICatalog { [OperationContract] [WebGet(UriTemplate = /Catalog/Items/{id}, ResponseFormat = WebMessageFormatJson)] string PassGuideRetrieve(int id); } There is a WCF (Windows Communication Foundation) service. The service is consumed by an ASP. NET Web application PassGuideApp. "Pass Any Exam. Any Time." - www.actualtests.com 101

Microsoft 70-513: Practice Exam /Catalogsvc is used to host the service. The definition of the service is displayed in the exhibit. JQuery, with variable EmployeeID, must be used to call the service to obtain data of an item indicated by EmployeeID. How can this be achieved?

Answer:

QUESTION NO: 79 DRAG DROP Exhibit: [DataContract(Namespace)] public class Item { "Pass Any Exam. Any Time." - www.actualtests.com 102

Microsoft 70-513: Practice Exam [ServiceContract(Namespace)] public interface Catalog { [OperationContract] [WebInvoke(Method = POST, UriTemplate = Item)] Item UpdateItem(Item item); } } There is a WCF (Windows Communication Foundation) service that is being consumed. The interface of the service is displayed in the exhibit. There is a WebResponse with the name of PassGuideResponse that the client application receives from the service. PassGuideResponse must be deserialized into a strongly typed object. This object represents value that is returned by the method. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

103

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 80 DRAG DROP There is a WCF (Windows Communication Foundation) client application PassGuideApp. PassGuideApp is consuming an syndication RSS feed from librivox.org. PassGuideApp uses a SyndicaionFeed variable PassGuideFeed. For each syndication item PassGuideApp needs to show the content type and body on the display. Which code should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

104

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 81 DRAG DROP Exhibit: [DataContract] public class Order { [DataMember] public string CustomerName { get; set;} [DataMember] public string PhoneNumber { get; set; } }

There is a WCF (Windows Communication Foundation) process PassGuideProcess. PassGuideProcess handles orders. The data contract of Order is displayed in the exhibit. It includes name of the customer (CustomerName) and their telephone number (PhoneNumber). The Order data must be transmitted from the client to PassGuideProcess.

"Pass Any Exam. Any Time." - www.actualtests.com

105

Microsoft 70-513: Practice Exam PhoneNumber data must not be sent in clear text, but this data must be available for PassGuideProcess. How can this be achieved?

Answer:

QUESTION NO: 82 DRAG DROP Exhibit: [MessageContract] public class Agent {

"Pass Any Exam. Any Time." - www.actualtests.com

106

Microsoft 70-513: Practice Exam public string PassGuideName { get; set: } public string PassGuideSecret { get; set; } } There is a WCF (Windows Communication Foundation) process PassGuideProcess. When clients are started the send messages to PassGuideProcess. These messages are accepted by PassGuideProcess. The contract of the messages is being displayed in the exhibit. PassGuideProcess must be able to make sure that the property values is kept unchanged after it has been sent by the client. PassGuideName should be sent in clear text while PassGuideSecret must not. PassGuideProcess must be able to read both. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

107

Microsoft 70-513: Practice Exam

QUESTION NO: 83 Exhibit: [ServiceContract] public interface IService { [OperationContract] string PassGuide1(); [OperationContract] string PassGuide2(); }

There is a WCF (Windows Communication Foundation) client PassGuideClient. The service contract of PassGuideClient is being displayed in the exhibit. There are two operations PassGuide1 and PassGuide2. "Pass Any Exam. Any Time." - www.actualtests.com 108

Microsoft 70-513: Practice Exam Calls to PassGuide1 and PassGuide2 from PassGuideClient must not be unencrypted. How can this be ensured? Select all that apply. A. B. C. D. E. F. G. For PassGuide1 add a SecurityCriticalAttribute For PassGuide2 add a SecunitySafeCriticalAttribute. For PassGuide2 add a SecurityCriticalAttribute For PassGuide1 add a SecunitySafeCriticalAttribute. Replace [OperationContract] with [OperationContract ProtectionLevel=Sign] Replace [OperationContract] with [OperationContract ProtectionLevel=EncryptAndSign] Replace [OperationContract] with [OperationContract ProtectionLevel=Encrypt]

Answer: E Explanation:

Topic 3, VB

QUESTION NO: 84 DRAG DROP Exhibit: service contract [ServiceContract] public interface IOrderProcessing { [OperationContract] void ConfirmOrder(int id) } <ServiceContract> Public Interface IOrderProcessing <OperationContract> Sub ConfirmOrder(ByVal id As Integer) End Interface

"Pass Any Exam. Any Time." - www.actualtests.com

109

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is implementing the service contract being displayed in the exhibit. How can you ensure that only users that are members of the role named Employees can use the ConfirmOrder method?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

110

Microsoft 70-513: Practice Exam QUESTION NO: 85 Exhibit: <ServiceContract> Public Interface lService <OperationContract> Function PassGuide1() As String <OperationContract0> Function PassGuide2() As String End Interface There is a WCF (Windows Communication Foundation) client PassGuideClient. The service contract of PassGuideClient is being displayed in the exhibit. There are two operations PassGuide1 and PassGuide2. Calls to PassGuide1 and PassGuide2 from PassGuideClient must not be unencrypted. How can this be ensured? Select all that apply. A. B. C. D. E. F. G. For PassGuide1 add a SecurityCriticalAttribute For PassGuide2 add a SecunitySafeCriticalAttribute. For PassGuide2 add a SecurityCriticalAttribute For PassGuide1 add a SecunitySafeCriticalAttribute. Replace [OperationContract] with [OperationContract ProtectionLevel=Sign] Replace [OperationContract] with [OperationContract ProtectionLevel=EncryptAndSign] Replace [OperationContract] with [OperationContract ProtectionLevel=Encrypt]

Answer: E Explanation:

QUESTION NO: 86 DRAG DROP Exhibit: <MessageContract> Public Class Agent

"Pass Any Exam. Any Time." - www.actualtests.com

111

Microsoft 70-513: Practice Exam Public Property PassGuideName As String Public Property PassGuideName As String End Class There is a WCF (Windows Communication Foundation) process PassGuideProcess. When clients are started the send messages to PassGuideProcess. These messages are accepted by PassGuideProcess. The contract of the messages is being displayed in the exhibit. PassGuideProcess must be able to make sure that the property values is kept unchanged after it has been sent by the client. PassGuideName should be sent in clear text while PassGuideSecret must not. PassGuideProcess must be able to read both. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

112

Microsoft 70-513: Practice Exam

QUESTION NO: 87 DRAG DROP Exhibit: <DataContract> Public Class Order <DataMember> Public Property CustomerName As String <DataMember> Public Property PhoneNumber As String End Class There is a WCF (Windows Communication Foundation) process PassGuideProcess. PassGuideProcess handles orders. The data contract of Order is displayed in the exhibit. It includes name of the customer (CustomerName) and their telephone number (PhoneNumber). "Pass Any Exam. Any Time." - www.actualtests.com 113

Microsoft 70-513: Practice Exam The Order data must be transmitted from the client to PassGuideProcess. PhoneNumber data must not be sent in clear text, but this data must be available for PassGuideProcess. How can this be achieved?

Answer:

QUESTION NO: 88 DRAG DROP There is a WCF (Windows Communication Foundation) client application PassGuideApp. PassGuideApp is consuming an syndication RSS feed from librivox.org. PassGuideApp uses a SyndicaionFeed variable PassGuideFeed. For each syndication item PassGuideApp needs to show the content type and body on the display. "Pass Any Exam. Any Time." - www.actualtests.com 114

Microsoft 70-513: Practice Exam Which code should be used?

Answer:

QUESTION NO: 89 DRAG DROP Exhibit: <DataContract(Namespace:)> Public Class Item End Class <ServiceContract(Namespace)> "Pass Any Exam. Any Time." - www.actualtests.com 115

Microsoft 70-513: Practice Exam Public Interface Catalog <OperationContract> <WebInvoke(Method = POST, UriTemplate = Item)> Function UpdateItem(ByVal item As Item) As Item End Interface

There is a WCF (Windows Communication Foundation) service that is being consumed. The interface of the service is displayed in the exhibit. There is a WebResponse with the name of PassGuideResponse that the client application receives from the service. PassGuideResponse must be deserialized into a strongly typed object. This object represents value that is returned by the method. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

116

Microsoft 70-513: Practice Exam

QUESTION NO: 90 DRAG DROP Exhibit: <ServiceContract> Public Interface ICatalog <OperationContract> <WebGet(UriTemplate ="/Catalog/Itemsl{id}. ResponseFormat =WebMessageFormatJson)> Function PassGuideRetrieve(ByVal id As Integer) As String End Interface There is a WCF (Windows Communication Foundation) service. The service is consumed by an ASP. NET Web application PassGuideApp. /Catalogsvc is used to host the service. The definition of the service is displayed in the exhibit. JQuery, with variable EmployeeID, must be used to call the service to obtain data of an item indicated by EmployeeID.

"Pass Any Exam. Any Time." - www.actualtests.com

117

Microsoft 70-513: Practice Exam How can this be achieved?

Answer:

QUESTION NO: 91 DRAG DROP Exhibit: <ServiceContract> Public Interface IDataAccessService <OperationContract> Sub PassGuidePut(ByVal message As String) <OperationContract>

"Pass Any Exam. Any Time." - www.actualtests.com

118

Microsoft 70-513: Practice Exam <FaultContract(GetType(TimeoutFaultException))> <FaultContract(GetType(FaultException))> Function PassGuideSearch(ByVal search As String) As String() End Interface

There is a WCF (Windows Communication Foundation) service. The service implements the contract being displayed in the exhibit. Database timeouts causes PassGuideSearch to throw TimeoutFaultException exceptions. Other issues that causes problems for PassGuideSearch thows Exceptions. The clients receives the exceptions as generic FaultException exceptions. A new channel must be created on the client. New error handling code for PassGuideSearch must be created. This code should only handle errors on the new channel. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

119

Microsoft 70-513: Practice Exam

QUESTION NO: 92 DRAG DROP Exhibit: <ServiceContract> Public Interface IDataService <OperationContract> Function PassGuideData() As String End Interface

There is a WCF (Windows Communication Foundation) solution PassGuideSol, which is exposing the contract being displayed in the exhibit. At the moment calls to PassGuideData has a 10 seconds completion time. Current client calls makes blocking calls to PassGuideData. New clients must be allowed to make non-blocking calls to obtain data from PassGuideData. At the same time the existing clients must not break. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

120

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 93 DRAG DROP Exhibit: <ServiceContract(CallbackContract =GetType(INameService))> Public Interface IGreetingService <OperationContract> Function PassGuideMessage() As String End Interface <ServiceContract> Public Interface INameService <OperationContract> Function PassGuideName() As String End Interface

"Pass Any Exam. Any Time." - www.actualtests.com

121

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) solution PassGuideSol, which is using some contracts being displayed in the exhibit. Whenever the client uses PassGuideMessage on the service interface, the service uses the client callback to call PassGuideName. Within the client the callback contract is implemented by the NameService class. The service callback must processed by an instance of NameService. How should the client channed be implemented?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

122

Microsoft 70-513: Practice Exam

QUESTION NO: 94 DRAG DROP Exhibit: <client> <endpoint address=nettcp://server/PassGuideService Binding=netTcpBinding Contracts PassGuide.IPassGuideService name=netTcp /> <endpoint address=net.pipe://localhost/PassGuideService Binding=netNamedPipeBinding" Contracts PassGuide.IPassGuideService Name=netPipe" /> </client>

"Pass Any Exam. Any Time." - www.actualtests.com

123

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) service client PassGuideServiceClient. The system ServiceModel element of PassGuideServiceClient includes the XML element that is being displayed in the exhibit. There is a need of channel factory. The channel factory should send messages to endpoint listening at net.pipe://localhost/PassGuideService. Which code should be used for the channel factory?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

124

Microsoft 70-513: Practice Exam QUESTION NO: 95 DRAG DROP There is a WCF (Windows Communication Foundation) service client application PassGuideService. There is a proxy named PassGuideServiceProxy You need to provide code that are able to catch and handle errors for this proxy. Which code should be used?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

125

Microsoft 70-513: Practice Exam

QUESTION NO: 96 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. There is a client for PassGuideService.

"Pass Any Exam. Any Time." - www.actualtests.com

126

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 97 DRAG DROP Contract exhibit: <ServiceContract> Public Interface IHelloService <OperationContract> <WebGet(UriTemplate: =hellonane={name}> Function PassGuideHello(Byval name As String) As string End Interface Class exhibit: Public Class HelloService Implements IHelloService Public Function PassGuideHello(ByVal name As String) As String_ Implements lHelloService PassGuideHello Return Hi there & name End Function End Class

"Pass Any Exam. Any Time." - www.actualtests.com

127

Microsoft 70-513: Practice Exam Hosting code exhibit: Dim svcHost As WebServiceHost = CreateHost() svcHost.Open() Console.ReadLine() svcHost.Close()

There is a WCF (Windows Communication Foundation) service PassGuideService. The contract of PassGuideService, the implementation, and self-hosted service hosting code are displayed in separate exhibits. A single endpoint, at http://PassGuide:7500/HelloService, is used for the implementation of CreateHost. Which code should you use? You need to implement CreateHost so that the service has a single endpoint hosted http:/IPassGuide7500/HeloService. Which code segment should you use?

"Pass Any Exam. Any Time." - www.actualtests.com

128

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 98 DRAG DROP Exhibit: <ServiceContract> Public Interface IMessageProcessor <OperationContract> Sub PassGuideProcess() End Interface Public Class MessageProcessor Implements IMessageProcessor Public Sub ProcessMessage() Implements IMessageProcessor ProcessMessage PassGuideSubmit() End Sub "Pass Any Exam. Any Time." - www.actualtests.com 129

Microsoft 70-513: Practice Exam End Class There is a WCF (Windows Communication Foundation) service PassGuideService. It is defined in the exhibit. PassGuideSubmit uses another service not defined above. There is performance problem with the PassGuideProcess method when it is run in heavy load. Processing of multiple messages must be supported. Additionaly you must make sure that new messages is only processed when PassGuideProcess is not waiting for request and there is no waiting for PassGuideSubmit processes to finish. How can this be ensured?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

130

Microsoft 70-513: Practice Exam

QUESTION NO: 99 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is implementing a contract through one-way and request reply operations. PassGuideService is exposed over a TCP transport. End users use a router to access PassGuideService. How should the router be implemented?

"Pass Any Exam. Any Time." - www.actualtests.com

131

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

132

Microsoft 70-513: Practice Exam

QUESTION NO: 100 DRAG DROP Service Contract exhibit: <ServiceContract> Public Interface IService <OperationContract>? Function PassGuideOp (ByVal s As String) As String There is a WCF service PassGuideService. PassGuideService uses the service contract in the exhibit. PassGuideOp must respond to HTTP POST request. How can this be ensured?

"Pass Any Exam. Any Time." - www.actualtests.com

133

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 101 Exhibit: Sub PassGuideDelete (Byval PassGuideId As String) There is a WCF service PassGuideService. PassGuideService implements restful manner operations. The PassGuideDelete method is implemented as displayed in the exhibit. "Pass Any Exam. Any Time." - www.actualtests.com 134

Microsoft 70-513: Practice Exam When a client calls PassGuideService with the HTTP DELETE operation PassGuideService must use this method. How can this be achieved? Select two or three. A. Use the operation.. B. Change the return type to.. C. Change the string PassGuideID parameter.. D. ..and add attribute E. ..add method.. F. .. WebInvoke(UriTemplate = "/Items/(id,Method=DELETE") G. .. HttpDelete H. ..DeleteHttp I. ..text. J. ..RemovedActivityAction Answer: A,D,F Explanation:

QUESTION NO: 102 DRAG DROP PassGuideService Exhibit: <ServiceContract> Public Interface PassGuideService <OperationContract> Function GetPassGuideServiceTime() As DateTime End Interface

There is a class PassGuideService. PassGuideService is hosted within an ASP.NET application PassGuideApp. PassGuideService implements the interface being displayed in the exhibit. PassGuideApp must be tweaked so that the GetPassGuideServiceTime method returns the result formatted as JSON when request url ends in /PassGuide. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

135

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

136

Microsoft 70-513: Practice Exam

QUESTION NO: 103 DRAG DROP PassGuideService exhibit: < OperationContract > Sub OperationContract (Byval data As Order) There is a client PassGuideClient. PassGuideClient sends multiple SOAP message to a WCF (Windows Communication Foundation) service method PassGuideService. PassGuideService must be tweaked so that any SOAP message can be received. Which code should you use?

"Pass Any Exam. Any Time." - www.actualtests.com

137

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 104 DRAG DROP Soap envelope exhibit: <s:Envelope xmlns:sehttp://schemas.xmlsoporg/soap/enveloper> <s: Header> <h:PassGuideID xmlns = "http:/www.PassGuide.com> 9283 </h: PassGuideID> "Pass Any Exam. Any Time." - www.actualtests.com 138

Microsoft 70-513: Practice Exam </s:Header> <s:Body> <PassGuideStock xmlns=http://www.PassGuide.com> <ParticularID>1234 </ ParticularID > </PassGuideStock> </s: Body> </s: Envelope> The SOAP envelope in the exhibit must be generated. How should this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

139

Microsoft 70-513: Practice Exam

QUESTION NO: 105 DRAG DROP Data contract Exhibit: <DataContract> Public Class Employee <DataMember> Public Name As String <DataMember> Public City As String <DataMember> Public Wage As Integer <DataMember> Public EMPLOYEEID As Integer End Class

"Pass Any Exam. Any Time." - www.actualtests.com

140

Microsoft 70-513: Practice Exam XML exhibit: <Employee> <Name xsi:niltrue/> <City xsi:nil true"/> < EMPLOYEEID >123456789 </ EMPLOYEEID > </Employee> There is WCF (Windows Communication Foundation) application PassGuideApp. PassGuideApp uses the data contract being displayed data contract exhibit. The XML code in the XML exhibit must be produces with the data contract is serialized. How can this be achieved?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

141

Microsoft 70-513: Practice Exam

QUESTION NO: 106 DRAG DROP There is a WCF (Windows Communication Foundation) service IPassGuideService in class PassGuideService. PassGuideService intermittently throws an exception and then fails. Now you need to handle the unhandled exceptions to clients by sending the stack trace of these to the clients as a fault message. How can this be achieved?

"Pass Any Exam. Any Time." - www.actualtests.com

142

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

143

Microsoft 70-513: Practice Exam QUESTION NO: 107 Contract exhibit: <ServiceContract(Namespaces"http://PassGuide.com)> Public Interface IShipping <OperationContract> Function PassGuideWork(ByVal id As Integer) As String End Interface There is a WCF (Windows Communication Foundation) application PassGuideApp. There is a WCF (Windows Communication Foundation) service PassGuideService. The contract of PassGuideService is being displayed in the exhibit. PassGuideApp is also hosting other services. PassGuideApp endpoints use SOAP 1.2 bindings with WS-Addressing 1.0. There is one single lister configured in System.ServiceModel.MessageLogging trace source of the system.diagnostics configuration section. Only the messeages that the PassGuideWork operation returns should be logged. How should this be achieved? Select four.

A. Use system.serviceModel/diagnostics/messageLogging/filters B. Use system.machineModel/diagnostics/messageLogging/filters C. ..and add XML code.. D. ..add add attribute code.. E. <add xmlns:soap="http://www.w3.org/2003/05/soap-envelope> F. <add xmlns:addr=http://www.w3.org/2005/08/addressing> G. <add xmlns: soap=http://www.w3.org/2003/05/soap-envelope> H. <add xmlns: addr="http://www.w3.org/2005/08/addressing> I. //soap:Action[text() = 'http://PassGuide.com/IShipping/PassGuideWorkResponse] </add> J. //soap:Action[text() = http://PassGuide.com/IShipping/PassGuideWork'] </add> K. //addr:Action[text() = 'http://PassGuide.com/IShipping/PassGuideWorkResponse] </add> L. //addr:Action[text() = http://PassGuide.com/IShipping/PassGuideWork'] </add> Answer: A,C,F,K Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

144

Microsoft 70-513: Practice Exam

QUESTION NO: 108 ServiceContract Exhibit: <ServiceContract> Public Class PassGuideService <OperationContract> Public Function PassGuideConfirm(ByVal PhoneNumber As String,ByVal wage As Double,ByVal EmployeeNumber Integer) As Boolean ... End Function There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService exists within SOA (Service Oriented Architecture) within an enterprise. The serviceContact of PassGuideService is displayed in the exhibit. Method PassGuideConfirm, when executed, must be participate transperentally in existing transactions.Furthermore, when there is no existing transaction, a new transaction must be created. How should the ServiceContract be tweaked to achieve is?

A. Use the PassGuideConfirm method.. B. Use the ServiceContract.. C. ..add the following attribute.. D. ..add the following code inside the definition .. E. <OperationBehavior(TransactionScopeRequired false)> F. <OperationBehavior(TransactionScopeRequired true)> G. <OperationBehavior(TransactionAutoComplete true)> H. <OperationBehavior(TransactionAutoComplete false)> I. Using New TransactionScope J. Using New TransactionScope Answer: A,C,F Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

145

Microsoft 70-513: Practice Exam QUESTION NO: 109 DRAG DROP There is a WCF (Windows Communication Foundation) service application PassGuideApp. PassGuideApp is required to provide service to a heavy client request load, even simulatanous requests. Stateful conversation must be provided for each ensure subsequent individual client request. Which attribute should be added to the class implementation?

Answer:

QUESTION NO: 110 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. The clients and the service that uses PassGuideService use NetTcpBinding (transaction flow enabled). Assuming that the operations PassGuideOP1 and PassGuideOP2 are called within the same client session, you need to enforce that they are executed within the same transaction context.

"Pass Any Exam. Any Time." - www.actualtests.com

146

Microsoft 70-513: Practice Exam Which contract should PassGuideService have?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

147

Microsoft 70-513: Practice Exam

QUESTION NO: 111 Contract exhibit: [ServiceContract(CallbackContract typeof(INameService))] public interface IGreetingSennce { [OperationContract] string GetMessage0, } [ServiceContract] public interface INameService "Pass Any Exam. Any Time." - www.actualtests.com 148

Microsoft 70-513: Practice Exam { [OperationContract] string GetName(); }

IGreetingService interface exhibit: <ServiceContract(CallbackContract typeof(INameService))> Public Interface IGreetingService <OperationContract> Function GetMessage() As String End Interface <ServiceContract> Public Interface INameService <OperationContract> Function GetNamne() As String End Interface Hosting code exhibit: Dim host As ServiceHost = New ServiceHost(GetType(GreetingService)) Dim binding As NetTcpBinding = New NetTc pBindng(SecurityMode.None) Host.AddServiceEndpoint(PassGuideAppIGreetingService", binding, net.tcp:localhost = 96374") Host Open()

INameService interface exhibit:

"Pass Any Exam. Any Time." - www.actualtests.com

149

Microsoft 70-513: Practice Exam class NameService INameService { string name; public NameService(string name) { this.name = name; } public string GetName() { return name; }} Class NameService Implements INameService Dim name As String Public Sub NameService(ByV name As String) Me.reme = name End Sub Public Function GetName() As String Impements INameService. GeNamee Return name End Function End Class There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. The implementations of contracts, the IGreetingService interface, the hosting code, and the INameService interface are all being displayed in the exhibits.

"Pass Any Exam. Any Time." - www.actualtests.com

150

Microsoft 70-513: Practice Exam At the moment the above code fails at line return String.Format(Hi there {0}, clientName);. You need to tweak the code in order to make it work. What should you do? (select three) Use code A. <ServiceContract(CallbackContract = typeof(INameService), SessionMode = SessionMode. Required)> B. <ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Unique)> C. <ServiceBehavior(ConcurrencyMode = ConcurrencyMode. Multiple)> D. ..and Insert the following code before the first line in the implementation of.. E. ..and replace the first line in the implementation of.. F. ..the contracts. G. .. the IGreetingService interface H. .. the hosting code I. .. INameService interface Answer: C,D,G Explanation:

QUESTION NO: 112 Contract exhibit: [ServiceContract(CallbackContract typeof(INameService))] public interface IGreetingSennce { [OperationContract] string GetMessage0, } [ServiceContract] public interface INameService { [OperationContract] string GetName(); "Pass Any Exam. Any Time." - www.actualtests.com 151

Microsoft 70-513: Practice Exam }

IGreetingService interface exhibit: <ServiceContract(CallbackContract typeof(INameService))> Public Interface IGreetingService <OperationContract> Function GetMessage() As String End Interface <ServiceContract> Public Interface INameService <OperationContract> Function GetNamne() As String End Interface Hosting code exhibit: Dim host As ServiceHost = New ServiceHost(GetType(GreetingService)) Dim binding As NetTcpBinding = New NetTc pBindng(SecurityMode.None) Host.AddServiceEndpoint(PassGuideAppIGreetingService", binding, net.tcp:localhost = 96374") Host Open()

INameService interface exhibit: class NameService INameService { string name;

"Pass Any Exam. Any Time." - www.actualtests.com

152

Microsoft 70-513: Practice Exam public NameService(string name) { this.name = name; } public string GetName() { return name; }} Class NameService Implements INameService Dim name As String Public Sub NameService(ByV name As String) Me.reme = name End Sub Public Function GetName() As String Impements INameService. GeNamee Return name End Function End Class There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is self-hosted. The implementations of contracts, the IGreetingService interface, the hosting code, and the INameService interface are all being displayed in the exhibits. At the moment the above code fails at line return String.Format(Hi there {0}, clientName);. You need to tweak the code in order to make it work. What should you do? (select three) "Pass Any Exam. Any Time." - www.actualtests.com 153

Microsoft 70-513: Practice Exam Use code A. <ServiceContract(CallbackContract = typeof(INameService), SessionMode = SessionMode. Required)> B. <ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Unique)> C. <ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)> D. ..and Insert the following code before the first line in the implementation of.. E. ..and replace the first line in the implementation of.. F. ..the contracts. G. .. the IGreetingService interface H. .. the hosting code I. .. INameService interface Answer: C,D,G Explanation:

QUESTION NO: 113 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. Which WCF service code should be used when your goal is to provide the clients a good response time from PassGuideService?

"Pass Any Exam. Any Time." - www.actualtests.com

154

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 114 DRAG DROP There is a WCF (Windows Communication Foundation) service PassGuideService. Which WCF service code should be used when your goal is to provide the clients a good response time from PassGuideService?

"Pass Any Exam. Any Time." - www.actualtests.com

155

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 115 DRAG DROP Service implementation exhibit: "Pass Any Exam. Any Time." - www.actualtests.com 156

Microsoft 70-513: Practice Exam Class PassGuideService Implements IPassGuideService Public Sub PassGuideOne(ByVal value As String) Implements IPassGuideService. OperationOne ... End Sub Public Sub PassGuideTwo(ByVal value As String) Impements IPassGuideService. PassGuideTwo ... End Sub

Contract exhibit: <ServiceContract(SessionMode s SessionMode.Required)> Publc Interface IPassGuideService <OperationContract(IsOneWay=True, IsInitiating=True)> Sub PassGuideOne(ByVal value As String) <OperationContract(IsOneWay=True, IsInitiating=False)> Sub PassGuideTwo(ByVal value As String) End Interface

There is a WCF (Windows Communication Foundation) service PassGuideService. The contract and implementation of PassGuideService is being displayed in the exhibits. NetMsmqBinding us used by PassGuideService to listen for messages. The queue is configured to use transactions for removing and adding messages. How can you ensure that PassGuideOp1 and PassGuideOp2 runs within the same transaction whenever they are called within the same session?

"Pass Any Exam. Any Time." - www.actualtests.com

157

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 116 DRAG DROP ContractExhibit: "Pass Any Exam. Any Time." - www.actualtests.com 158

Microsoft 70-513: Practice Exam <ServiceContract> Public Interface IPassGuideService <OperationContract> Sub SaveEmployee(Byval employee As Employee) End Interface Binding exhibit: Dim binding As NetTcpBinding = New NetTcpBinding With (TransactionFlow = True) Client Call exhibit: using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) { IPassGuideService client = factoryCreateChannel(); client SaveEmployee(employee); Console.WriteLine( Transaction.CurrentTransactiominformation DistributedIdentifier); tsComplete(); }

SaveEmployee Exhibit: Public Sub SaveEmployee(ByVal employee As Employee)_ Implements IPassGuideService SaveEmployee employee.Save() ConsoleWriteLine(TransactionCurrentTransactionlnformation. Distributedldentifier) End Sub

"Pass Any Exam. Any Time." - www.actualtests.com

159

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) service PassGuideService. The service and the client has the service contract displayed in the contract exhibit. The binding of the service and the client is displayed in the binding exhibit. The client call exhibit displays how the client calls PassGuideService. The implementation of the PassGuideService SaveEmployee method is displayed in the SaveEmployee Exhibit. However, there is a problem. There is distributed identifier mismatch between the client and PassGuideService. How can this be remedied?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

160

Microsoft 70-513: Practice Exam

QUESTION NO: 117 DRAG DROP There is a WCF (Windows Communication Foundation) solution for PassGuide. You need to specify the contract complying to the following requirements: PassGuideInitialize can always be called before PassGuideTerminate is called. PassGuideSomething can only be called after PassGuideInitialize has been called. PassGuideSomething cannot be called after PassGuideTerminate has been called. PassGuideTerminate can only be called after PassGuideInitialize has been called. Which contract should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

161

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

162

Microsoft 70-513: Practice Exam

QUESTION NO: 118 DRAG DROP Hosting Code Exhibit: Dim host As ServiceHost = New ServiceHost(GetType(CounterService)) Dim bidl As NetTcpBinding = New NetTcpBinding(SecurityMode.None) host.AddServiceEndpoint(PassGuideApp.ICounterService, binding, net.tcp://localhost: 98765) host.Open()

Bind2 exhibit: host.AddServiceEndpoint('PassGuideApp.ICounterService, bind2, http:/!localhost: 98765) "Pass Any Exam. Any Time." - www.actualtests.com 163

Microsoft 70-513: Practice Exam There is a WCF (Windows Communication Foundation) self-hosted service PassGuideService. PassGuideService provides a session-based counter. PassGuideService is exposed over TCP. The PassGuideService hosting code is being displayed in the exhibit. PassGuideService must also be exposed over HTTP for external clients. The session-counter must be able to perform over HTTP at it does over TCP. How should bind2 be defined and configured?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

164

Microsoft 70-513: Practice Exam

QUESTION NO: 119 DRAG DROP Exhibit: <ServiceContract> <ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)> Public class DataAccessService <OperationContract> Public Function PutMessage(ByVal message As String) MessageDatabase.PutMessage(message) <OperationContract> Public Function SearchMessages(ByVal search As String) as String Return MessageDatabase.SearchMessages(search) End Function End Class

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService is specified in the exhibit. PassGuideService is used over a TCP binding. At the moment MessageDatabase only support a small finite number of concurrent executions of the methods belonging to it. While not preventing users to connecting to PassGuideService you need to tweak the performance of PassGuideService so it allows the maximum number calls the methods. What should be done?

"Pass Any Exam. Any Time." - www.actualtests.com

165

Microsoft 70-513: Practice Exam

Answer:

QUESTION NO: 120 DRAG DROP Exhibit: <ServiceContract> PuElic Interface ITeamMessageService <OperationContract>

"Pass Any Exam. Any Time." - www.actualtests.com

166

Microsoft 70-513: Practice Exam Function GetMessage() As String <OperationContract> Sub PutMessage(Byval message As String) End Interface

There is a WCF (Windows Communication Foundation) service PassGuideService. PassGuideService uses the contract being displayed in the exhibit. PassGuideService is used to share messages between the clients. You need to ensure that all the clients receive the same message from the GetMessage method, even if the PutMessage method is used by another client. Which code should be used?

"Pass Any Exam. Any Time." - www.actualtests.com

167

Microsoft 70-513: Practice Exam Answer:

QUESTION NO: 121 DRAG DROP There is WCF (Windows Communication Foundation) service which is being implemented. The error information that is being sent to the user should not include stack trace information. Which code should you use?

"Pass Any Exam. Any Time." - www.actualtests.com

168

Microsoft 70-513: Practice Exam

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

169

Microsoft 70-513: Practice Exam

QUESTION NO: 122 DRAG DROP Exhibit: public class Machine { public int Multiply(int x, nty) { } } Public Class Calculator Public Function Add(ByVal x As Integer, ByVal yAs Integer) As Integer End Function End Class There is WCF (Windows Communication Foundation) service which is being implemented. "Pass Any Exam. Any Time." - www.actualtests.com 170

Microsoft 70-513: Practice Exam You use the class displayed in the exhibit. The class must be exposed as a service named PassGuideA and operation OperationX. The internal implementation at the service layer should not be exposed. Which code should be used?

Answer:

"Pass Any Exam. Any Time." - www.actualtests.com

171

Microsoft 70-513: Practice Exam

QUESTION NO: 123 DRAG DROP There is WCF (Windows Communication Foundation) service PassGuideService. A data contract PassGuideContract for PassGuideService is being implemented. PassGuideContract must be forward-compatible. The round trips must include the information in PassGuideContract. It should be able to add ew data members to PassGuideContract. You do have to follow a strict schema validitiy. Which interface should be used for PassGuideContract class?

"Pass Any Exam. Any Time." - www.actualtests.com

172

Microsoft 70-513: Practice Exam

Answer:

Topic 4, Mixed Questions

QUESTION NO: 124 You work as an Application Developer for PassGuide.com. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You have decided to implement transactions in your WCF service. You wish to implement transactions in your binding settings. Which of the following are NOT the attributes you would set? Each correct answer represents a complete solution. Choose two. A. transactionProtocol B. transactionFlow C. maxConnections D. receiveTimeout

"Pass Any Exam. Any Time." - www.actualtests.com

173

Microsoft 70-513: Practice Exam Answer: C,D Explanation:

QUESTION NO: 125 You work as a Windows Developer for PassGuide.com. You are tasked to create a Windows Communication Foundation client application by using Microsoft .NET Framework 4.0. You are required to examine the parameters on the client application. Which of the following actions should you perform to accomplish the task? Each correct answer represents a part of the solution. Choose three. A. Implement IEndpointBehavior behavior to add parameter inspector to the Dispatcher.ClientOperation.ParameterInspectors method. B. Implement IClientMessageInspector interface. C. Implement IParameterInspector interface. D. Insert a behavior before you call the ClientBase.Open method. E. Implement IEndpointBehavior behavior to add parameter inspector to the Dispatcher.DispatchOperation.ParameterInspectors method. Answer: A,C,D Explanation:

QUESTION NO: 126 John works as Windows Application Developer for PassGuide.com. The company uses Visual Studio .NET Framework 4.0 as its application development platform. John has been given a task to create a WCF Service based on Framework 4.0. John is required to add the following code segment: (Line numbers are included for reference only.) 01 [ServiceContract(SessionMode=SessionMode.Required)] 02 public interface IInventoryManager 03 { 04 05 void CloseOrder(); 06 } John needs to decorate and manage the operation as the method that closes the current session method. Which of the following code statements should you insert at line number 04 to accomplish the task?

"Pass Any Exam. Any Time." - www.actualtests.com

174

Microsoft 70-513: Practice Exam A. [OperationContract(IsTerminating=true)] B. [OperationContract(IsTerminating=false)] C. [OperationContract(IsInitiating=true)] D. [OperationContract(IsInitiating=false)] Answer: A Explanation:

QUESTION NO: 127 You are working on a WCF service that will be accessed by several clients. The service will be used by a bank to handle financial calculations. You want to ensure that the service uses sessions. You have written the following code segment: (Line numbers are included for reference only.) 01 namespace MyBankService 02 { 03 [ServiceContract(Name = "BankService", 04 Namespace = "http://www.mybankservice.com", 05 CallbackContract = typeof(IBankService), 06 ' Insert code statement here.)] 07 public interface IBankService 08 { 09 [OperationContract(IsOneWay = true)] 10 int Deposit(double amount, int accountnum); 11 } 12 } Which of the following codes should you insert at line number 06? A. SessionMode = SessionMode.Allowed B. SessionMode = Required C. SessionMode = SessionMode.Required D. SessionMode = Allowed Answer: C Explanation: "Pass Any Exam. Any Time." - www.actualtests.com 175

Microsoft 70-513: Practice Exam

QUESTION NO: 128 You have been tasked with creating a WCF service for a hospital. This service will provide access to patient data. You have written the following code: using System; using System.ServiceModel; namespace MyHospital.PatientService { [ServiceContract(Namespace="MyHospital.PatientService")] public interface IPatientService { [OperationContract] void CheckOutPatient(int PatientID); int FindPatientRecord(string LastName,stringFirstName); int AddPatientRecord(string LastName,stringFirstName); } } However, you are getting an error in the above code. What should be done in the code to correct this error so that the service will compile and run properly? A. The IPatientService interface should be a class. B. The [OperationContract] attribute should be defined before the interface definition. C. The namespace syntax is incorrect. It should simply have Namespace="PatientService"). D. The code should have the [OperationContract] attribute before each method, and not just before the first method. Answer: D Explanation:

QUESTION NO: 129 You work as a Windows Developer for PassGuide.com. The company uses Visual Studio .NET "Pass Any Exam. Any Time." - www.actualtests.com 176

Microsoft 70-513: Practice Exam Framework 4.0 as its application development platform. You have been tasked to implement transactions in your WCF service 4.0. Which of the following attributes would you need to specify in your binding, in order to implement transactions in your WCF service 4.0? Each correct answer represents a complete solution. Choose all that apply. A. OperationBehaviorattribute B. ServiceBehaviorattribute C. transactionProtocol D. transactionFlow Answer: C,D Explanation:

QUESTION NO: 130 You work as an Application Developer for PassGuide.com. You are tasked with creating a WCF application for a bank. You write the following code segment: (Line numbers are for reference only.) 01 [ServiceContract] 02 public interface IBankService 03 { 04 [OperationContract] 05 void WithdrawFunds(); 06{ 07 08 public class ServiceImpl : IBankService 09 { 10 [OperationBehavior(TransactionScopeRequired=true)] 11 public void WithdrawFunds() { } 12 } You need to ensure that each service call is allowed on the service instance at a time and the service object is released as soon as the current transaction is completed. Which of the following code segments should you insert at line number 07?

"Pass Any Exam. Any Time." - www.actualtests.com

177

Microsoft 70-513: Practice Exam A. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple, ReleaseServiceInstanceOnTransactionComplete=true)] B. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant, ReleaseServiceInstanceOnTransactionComplete=false)] C. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple, ReleaseServiceInstanceOnTransactionComplete=false)] D. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single, ReleaseServiceInstanceOnTransactionComplete=true)] Answer: D Explanation:

QUESTION NO: 131 Which of the following mechanisms is a commonly used technique that allows the .NET process to act as an authenticated user, or as an arbitrarily specified user? A. Data binding B. Impersonation C. Contract D. Message contract Answer: B Explanation:

QUESTION NO: 132 You work as a Windows Developer for PassGuide.com. You need to define a new Service contract. Which of the following corresponds to the .NET attributes from the System.ServiceModel namespace that you require when defining your Service contract? A. The ServiceContractAttribute and the FaultContractAttribute B. The ServiceContractAttribute and the OperationContractAttribute C. The MessageParameterAttribute and the OperationContractAttribute D. The FaultContractAttribute and the OperationContractAttribute Answer: B Explanation:

QUESTION NO: 133 John works as a Windows Application Developer for PassGuide.com. The company uses "Pass Any Exam. Any Time." - www.actualtests.com 178

Microsoft 70-513: Practice Exam Microsoft Visual Studio .NET 2010 as its application development platform for creating applications. He has been given a task of creating a WCF service based on Framework 4.0. He has finished creating the WCF service and must now configure the bindings. He requires using WSHttpBinding binding. He has already defined and implemented the service contract on the application. What is the next step that he must take to accomplish the task? A. Construct a Service.svc file that uses and manages WSHttpBinding. B. Construct a Web.config file to configure an endpoint for the Service that uses and manages WSHttpBinding. C. Construct a Web.config file to configure an endpoint for the Service that uses and manages WebHttpBinding. D. Construct a Service.svc file that uses and manages WebHttpBinding. Answer: B Explanation:

QUESTION NO: 134 You work as a Windows Developer for PassGuide.com. You have been provided with a task to create a WCF service by using Microsoft .NET Framework 4.0. For this, you need to host the service in a medium trust environment on a Web server. Which of the following bindings whould you use to accomplish the task? Each correct answer represents a complete solution. Choose two. A. WSDualHttpBinding B. WSHttpBinding C. BasicHttpBinding D. NetTcpBinding E. WebHttpBinding Answer: C,D Explanation:

QUESTION NO: 135 You are working on a WCF service that will have various client sessions connecting to it. You want a service instance to be created each time a client uses the service. Which of the following code segments should you use to implement this? A. [ServiceContract (InstanceContextMode = InstanceContextMode.PerCall)] B. [ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode.PerCall)] C. [ServiceContract(InstanceContextMode = InstanceContextMode.PerCall)] "Pass Any Exam. Any Time." - www.actualtests.com 179

Microsoft 70-513: Practice Exam D. [ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode.PerSession)] Answer: B Explanation:

QUESTION NO: 136 You are creating a WCF application that includes a client using a remote WCF service. You are concerned about security for the communications between client and server. Your application specifications state that you should have end-to-end security. Which of the following security methods should you implement? A. Message level security B. Transport level security C. Https D. Kerberos Answer: A Explanation:

QUESTION NO: 137 John works as a Windows Application Developer for PassGuide.com. The company uses Microsoft Visual Studio .NET 2010 as its application development platform for creating applications. He has been given a task of creating a WCF service based on Framework 4.0. He has finished creating the WCF service and must now configure the bindings. He requires using WSHttpBinding binding. He has already defined and implemented the service contract on the application. What is the next step that he must take to accomplish the task? A. Construct a Web.config file to configure an endpointforthe Service that uses and manages WSHttpBinding. B. Construct a Service.svc file that uses and manages WSHttpBinding. C. Construct a Service.svc file that uses and manages WebHttpBinding. D. Construct a Web.config file to configure an endpointforthe Service that uses and manages WebHttpBinding. Answer: A Explanation:

QUESTION NO: 138 John works as a Windows Application Developer for PassGuide.com. The company uses Visual "Pass Any Exam. Any Time." - www.actualtests.com 180

Microsoft 70-513: Practice Exam Studio .NET 2010 as its application development platform. John has been given a task to create a WCF service for his company using .NET Framework 4.0. Which of the following properties does the service require, in order to configure endpoints? Each correct answer represents a part of the solution. Choose all that apply. A. Binding B. COM interface C. Contract D. Address Answer: A,C,D Explanation:

QUESTION NO: 139 John works as a Windows Developer for PassGuide.com. John has been given a task to create a WCF 4.0 by using the Microsoft .NET Framework 4.0. The client applications are unable to use SSL feature. John here needs to make sure that a client is authenticated by using a token mentioned by a Security Token Service (STS). What should John do to accomplish the task? A. Use a WSFederationHttpBinding binding with the security code set to Message. B. Use a BasicHttpBinding binding. C. Use a BasicHttpBinding binding with the security code set to Message. D. Use a WSFederationHttpBinding binding. Answer: A Explanation:

QUESTION NO: 140 You work as a Windows Developer for PassGuide.com. You need to define a new Service contract. Which of the following corresponds to the .NET attributes from the System.ServiceModel namespace that you require when defining your Service contract? A. The ServiceContractAttribute and the FaultContractAttribute B. The MessageParameterAttribute and the OperationContractAttribute C. The ServiceContractAttribute and the OperationContractAttribute D. The FaultContractAttribute and the OperationContractAttribute

"Pass Any Exam. Any Time." - www.actualtests.com

181

Microsoft 70-513: Practice Exam Answer: C Explanation:

QUESTION NO: 141 You work as a Windows Developer for PassGuide.com. You need to generate a Windows Communication Foundation service by using Microsoft .NET Framework 4.0. You set up tracing for the service. The tracing fails because of an error in the service configuration. You need to recognize the cause of the error. What should you do to accomplish the service without any error? A. Observe the application log. B. Observe the system event log. C. Observe the application EventLog class. D. Observe the security log. Answer: C Explanation:

QUESTION NO: 142 You work as a Windows Developer for PassGuide.com. You have a task to create a WCF service 4.0 by using Microsoft .NET Framework 4.0. The WCF service will be hosted in a managed console application of the Framework. The WCF 4.0 service endpoint has an address that is comparative to the base address of the WCF service. You are required to programmatically add and manage the base address to the WCF service. What should you do to accomplish the task? A. Create and add a custom endpoint behavior to the service. B. Add the IEndpointBehavior object to the Service.Endpoint.Behaviors property. C. Call a constructor of the ServiceHost class. D. Configure the behavior using an application configuration file. Answer: C Explanation:

QUESTION NO: 143 You work as a Windows Developer for PassGuide.com. You are required to create a WCF service by using Microsoft .NET Framework 4.0. The WCF service uses the net.tcp transport. You are required to ensure that when the company's server starts, the service also starts and continues to run. What should you do to accomplish this task? "Pass Any Exam. Any Time." - www.actualtests.com 182

Microsoft 70-513: Practice Exam A. Host the service under IIS 7.0 by using Windows Activation Services. B. Host the service under IIS 6.0 by using the IIS 5.0 compatibility mode. C. Host the service in a Windows service. D. Host the service under IIS 2.0 by using the IIS 1.0 compatibility mode. Answer: C Explanation:

QUESTION NO: 144 Which of the following are the main requirements to self-host your services? Each correct answer represents a complete solution. Choose two. A. WCF service B. REST C. Managed .NET application D. WCF runtime Answer: C,D Explanation:

QUESTION NO: 145 You work as a Windows Developer for PassGuide.com. You are required to handle orders placed for the company's IT department. You are required to write the following code for a service contract: <ServiceContract> Public Interface IOrderManager <OperationContract> Sub OrderPlaced(ordered As Integer) EndSub End Interface You want to make sure that the OrderPlaced method uses transactions, and if no exception occurs, then regulates and commits automatically. Which of the following implementations would you use? A. <TransactionFlow(TransactionFlowOption.NotAllowed)> "Pass Any Exam. Any Time." - www.actualtests.com 183

Microsoft 70-513: Practice Exam <OperationBehavior> Public Sub OrderPlaced(ordered As Integer) End Sub B. <TransactionFlow(TransactionFlowOption.Allowed)> <OperationBehavior> (TransactionScopeRequired:=False, TransactionAutoComplete:=True)] Public Sub OrderPlaced (ordered As Integer) End Sub C. <TransactionFlow(TransactionFlowOption.NotAllowed)> <OperationBehavior> Public Sub OrderPlaced(ordered As String) End Sub D. <TransactionFlow(TransactionFlowOption.Allowed)> <OperationBehavior> (TransactionScopeRequired:=True, TransactionAutoComplete:=False)] Public Sub OrderPlaced (ordered As Integer) End Sub Answer: B Explanation:

QUESTION NO: 146 You work as a Windows Developer for PassGuide.com. You are required to create a WCF 4.0 service that will be used by multiple clients afterwards. According to the requirements, one service object should handle all service calls and this service object should not be recycled. Which of the following values for the session instance will You use to accomplish the task? A. Single B. Reentrant C. PerCall D. PerSession Answer: A Explanation:

QUESTION NO: 147 You work as an Application Developer for PassGuide.com. You have been assigned to create a WCF service for the Business School of Management. You write the following code segment to define the service: Public Interface ISchoolService <OperationContract()> Sub FindStudent(int StudentID)

"Pass Any Exam. Any Time." - www.actualtests.com

184

Microsoft 70-513: Practice Exam End Interface Public Class School Implements ISchoolService <OperationBehavior(TransactionAutoComplete:=False, TransactionScopeRequired:=True) > Public Sub FindStudent(int studentnumber) End Sub End Class Your next task is to set the <ServiceContract> attribute for the transaction behavior of this service. Which of the following code statements should you insert at the beginning of the above mentioned code segment? A. <ServiceContract(SessionMode:=SessionMode.Required)> B. <ServiceContract(SessionMode:=SessionMode.NotAllowed)> C. <ServiceContract(SessionMode:=SessionMode.Permitted)> D. <ServiceContract(SessionMode:=SessionMode.Allowed)> Answer: A Explanation:

QUESTION NO: 148 You work as a Windows Developer for PassGuide.com. The company uses .NET Framework 4.0 as its application platform. You are tasked to create a WCF service based on .NET 4.0 that uses message queues. You also find that most of the messages that are in the queue failed to reach their final destination. Which of the following actions would you choose to troubleshoot the problem and accomplish the task? A. Confirm the dead-letter queue. B. Implement the Inspector. C. Confirm the Journal queue. D. Confirm the undelivered message queue. Answer: A Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

185

Microsoft 70-513: Practice Exam QUESTION NO: 149 You work as a Windows Developer for PassGuide.com. You have been provided with a task to create a WCF service by using Microsoft .NET Framework 4.0. For this, you need to host the service in a medium trust environment on a Web server. Which of the following bindings whould you use to accomplish the task? Each correct answer represents a complete solution. Choose two. A. NetTcpBinding B. BasicHttpBinding C. WebHttpBinding D. WSHttpBinding E. WSDualHttpBinding Answer: B,C Explanation:

QUESTION NO: 150 Which of the following determines whether an existing instance of the service class (the service instance) can process the request? A. Data contract B. SSP C. Event throttling D. WCF Answer: D Explanation:

"Pass Any Exam. Any Time." - www.actualtests.com

186

You might also like