Você está na página 1de 7

WCF [Chapter 10 to Chapter 18]

Chapter 10
1. Which bindings of the following does not support reliable messaging?
A. netTcpBinding
B. wsDualHttpBinding
C. netNamedPipeBinding
D. wsHttpBinding
Answer: B, C [netTcpBinding, wsDualHttpBinding supports by default, msmqIntegrationBinding and netMsmqBinding have support
but in different way]
2. How can you ensure that a service processes messages in the same order that the client sent them rather than the order that
they were received?
A. By implementing reliable messaging
B. By implementing persistent session
C. By implementing reliable session
D. By Implementing durable session
Answer: A [Reliable messaging is concerned with ensuring that messages are delivered exactly once and ordered delivery, and a
reliable session provides a context for sending and receiving a series of reliable messages]
3. Why do you set the InactivityTimeout property of a reliable session?
A. To specify how long the WCF runtime at client application will wait for between messages before deciding that
something has gone wrong and messages have gone missing
B. To specify the time period of inactivity, the client should send keep alive message
C. To specify the time period of valid session
D. None of the above
Answer: A
4. Which one is the first message in WS-ReliableMessaging protocol to initiate the reliable session?
A. CreateSequence message
B. KeepAlive message
C. StartSession message
D. Acknowledgement message
Answer: A
5. In reliable session which message client sends to close the session?
A. TerminateSequence
B. CloseSession
C. Close
D. LastMessage
Answer: D
6. In reliable messaging, which message it sends to service to indicate that it is not going to send any more messages using the
sequence specified by the identifier?
A. TerminateSequence
B. CloseSession
C. Close
D. LastMessage
Answer: A
7. Reliable sessions can generate a significant amount of additional network traffic.
A. True
B. False
Answer: A
8. Which attribute do you use if you want to ensure that messages will be processed by the service in the order in which they
were sent by the client, and the service host will buffer them if necessary if it receives any messages out of order?
A. DeliveryRequirements with RequireOrderedDelivery property set to true
B. ReliableSession with Ordered property set to true
C. DeliveryRequirements with Ordered property set to true
D. RequireOrderedDelivery with Ordered property set to true
Answer: A
9. The WCF security channel implements replay detection by default.
A. True
B. False
Answer: A
10. In WCF service, which one ensures that messages form client application to a service are delivered exactly once?
A. Reliable session
B. Reliable messaging
C. Durable session
D. Nonce
Answer: B
Chapter 11
1. Which one connects an endpoint to the transport channel of the channel stack?
A. EndpointDispatcher
B. CahnnelDispatcher
C. ChannelListener
D. Encoding channel
Answer: C
2. What is the purpose of an encoding channel?
A. Connecting an endpoint to the transport channel for the channel stack
B. Parses the incoming request and outgoing reply messages and convert it into a format that the channels above it in the
channel stack can understand
C. Invoking the appropriate method in the service, passing the data items in the message as parameters to the method.
D. Creating a ChannelListener object for each URI on which the service can accept messages
Answer: B
3. What is the purpose of an EndpointDispatcher?
A. Connecting an endpoint to the transport channel for the channel stack
B. Parses the incoming request and outgoing reply messages and convert it into a format that the channels above it in
the channel stack can understand
C. Invoking the appropriate method in the service, passing the data items in the message as parameters to the method.
D. Creating a ChannelListener object for each URI on which the service can accept messages
Answer: D
4. How can you change the way that components in the WCF infrastructure operate?
A. By applying behaviors
B. By changing binding
C. By creating custom binding
D. By creating custom channel
Answer: A
5. Anonymous behaviors are applied automatically to a _____________ or____________.
Which two correctly fit the blank spaces?
A. service
B. endpoint
C. binding
D. contract
Answer: A, C
6. How can you specify behaviors for services, endpoints, operations, and contracts?
A. imperatively by adding code
B. declaratively by using attributes
C. creating custom filter
D. adding message inspector
Answer: A, B
7. You can specify contract and operation behaviors using declaratively in configuration file?
A. True
B. False
Answer: B [You can do so by adding attributes in code, Page 403 read last paragraph]
8. How can you examine messages as they are sent and received and also modify an incoming message prior to it being
processed by a service or before an outgoing message is transmitted to a client?
A. Using WCF trace logging
B. Using message interception
C. By using TCP trace utility
D. By using custom binder
Answer: B
9. How can you create message inspector and apply it on a service?
A. Create a class that implements the IDispatchMessageInspector interface
B. Insert the class into binding configuration
C. Insert the class into the WCF infrastructure by defining a behavior
D. Pass the class as parameter in ServiceContract attribute
Answer: A, C
10. The WCF runtime uses the _____________________ object to instantiate the channel stack and connect it to the URI specified by
the endpoint.
A. ChannelDispatcher
B. EndpointDispatcher
C. ChnnelListener
D. ChannelFactory
Answer: D
Chapter 12
1. In Which technology a client application sending messages and a service receiving them do not need to be running at the
same time?
A. Microsoft Message Queue Server
B. REST
C. MTOM
D. WCF Data Service
Answer: A
2. When a client invokes a one way operation, what will happen if the message call is not received at the service end?
A. Client will not be aware of the failure as it is waiting for service return
B. Client will be alerted with an exception
C. Client will be alerted by a callback
D. None of the above
Answer: B
3. Which of the following is or are true about one way operations?
A. Operations must be void
B. Operations cannot have parameters marked as out or ref
C. Operations cannot have parameters
D. Operations cannot have FaultContract
Answer: A, B
4. If you design a service and mark all one-way operations in a service contract with the
TransactionFlow(TransactionFlowOption.Allowed) attribute, what will happen if you start the service?
A. WCF runtime throws an InvalidOperationException exception
B. Service will start but transactions will not succeed
C. Service will start without transaction
D. Service will start but it throw exception on operation invoke
Answer: A
5. How can you implement asynchronous invocation of operations?
A. in the client application invoking the operation
B. in the WCF service implementing the operation
C. creating an object of ServiceProxy class
D. using DuplexChannel
Answer: A, B
6. How can you generate asynchronous proxy a WCF service?
A. using the /async flag with the svcutil utility
B. using the Add Service Reference Wizard in Visual Studio and selecting Generate Asynchronous Operations check box in
the Service Reference Settings dialog box
C. creating a sub-class of ServiceProxy
D. using service discovery
Answer: A, B
7. How can you specify that an operation of a WCF service supports asynchronous processing?
A. setting the AsyncPattern property to true in the ServiceContract attribute
B. setting the AsyncPattern property to true in the OperationContract attribute
C. setting the IsOneWay property to true in the OperationContract attribute
D. setting the AsyncPattern property to true in the OperationBehavior attribute
Answer: B
8. Which property of an AsyncResult object provides access to the data returned by the asynchronous operation?
A. Data
B. AsyncResult
C. Result
D. OperationResult
Answer: A
9. _________________ can provide a durable, reliable, transacted transport for messages.
A. MTOM
B. WCF Data Services
C. Message queues
D. Workflow Services
Answer: C
10. Which one is an asynchronous technology by default?
A. WCF Data Service
B. MSMQ
C. REST
D. AtomPub
Answer: B

Chapter 13/14
1. Which one should you use to control resource utilization of WCF Services?
A. Service throttling
B. Load balancing
C. Service Discovery
D. Data Streaming
Answer: A
2. Which technique you can employ to distribute requests across multiple servers and maintain even throughput?
A. Service throttling
B. Load balancing
C. Service Discovery
D. Data Streaming
Answer: B
2. Which one provides a standardized, interoperable, and efficient format for transmitting large blocks of binary data?
A. REST
B. Workflow
C. MTOM
D. JSON
Answer: C
3. How can you specify the minimum amount of memory that should be available before activating a service?
A. Adding minFreeMemoryPercentageToActivateService attribute of the <service> element in the service configuration
file
B. Adding minFreeMemoryPercentageToActivateService attribute of the <serviceHostingEnvironment> element in the
service configuration file
C. Adding minFreeMemory attribute of the <serviceHostingEnvironment> element in the service configuration file
D. Add FreeMemoryPercentage element to service behavior
Answer: B
4. How can you ensure a client application start receiving and processing bytes of data before the service has transmitted the
end of the message?
A. Enabling buffering behavior
B. By enabling streaming
C. By enabling buffered response
D. All of the above
Answer: B
5. Which of the following supports streaming?
A. basicHttpBinding
B. netTcpBinding
C. wsHttpBinding
D. netNamedPipeBinding
Answer: A, B, D
6. In which mode of discovery client wishes to connect a discover services can broadcast multicast message over network?
A. Ad hoc
B. Managed
C. Routing
D. None of the above
Answer: A
7. Which feature enables a client application to locate a service dynamically, based on criteria such as the contract that the
service implements?
A. Discovery
B. Announcement
C. ServiceProxy
D. Broadcasting
Answer: A
8. Which endpoint has a fixed contract, a fixed HTTP binding, and a default address as specified in the WS-Discovery
specification?
A. mexEndpoint
B. udpDiscoveryEndpoint
C. meatdataEndpoint
D. proxyEndpoint
Answer: B
9. What does the ProbeMatch message contain?
A. Security rudiments to meet to get a services
B. information about the service with which a client application wishes to communicate
C. addressing information that the client needs to connect to the service
D. All of the above
Answer: C
10. What does the Probe message contain?
A. Security rudiments to meet to get a services
B. information about the service with which a client application wishes to communicate
C. addressing information that the client needs to connect to the service
D. All of the above
Answer: A
11. In which mode of discovery a service broadcasts announcements as it starts and shuts down?
A. Ad hoc
B. Managed
C. Routing
D. None of the above
Answer: B

Chapter 15
1. Which of the following is or are the most common architectures of implementing Web Services?
A. SOAP
B. Client/Server
C. REST
D. SOA
Answer: C
2. Which one is stateless and describes resources and business objects over a network, following a structure that is very similar to
that implemented by the World Wide Web?
A. SOAP
B. Client/Server
C. REST
D. SOA
Answer: C
3. Which of the following is or are the most popular formats of returning data from REST service?
A. POX
B. JSON
C. RSS
D. Palin text
Answer: A, B [POX – Palin old XML]
4. Which statement is the most appropriate for a RESTful service?
A. It relies on the application that accesses the data sending the appropriate URL as part of the request used to access
the data
B. It relies on the application that accesses the data sending the appropriate HTTP verb as part of the request used to
access the data
C. It relies on the application that accesses the data sending the request in appropriate format
D. It relies on the application that accesses the data sending the appropriate MIME type as part of the request used to
access the data
Answer: A
5. In RESTful services which HTTP verbs are suitable for insert, update or remove resources?
A. GET
B. POST
C. PUT
D. DELETE
Answer: B, C, D [For insert POST, update-PUT and delete-DELETE common but you can use in your own combination such as PUT for
insert, post for update]
6. Which binding do you use for REST service?
A. basicHttpBinding
B. wsHttpBinding
C. webHttpBinding
D. wsContextBinding
Answer: C [For REST you must use webHttpBinding]
7. To enable Help page for REST service what should you do?
A. Create a new binding configuration and add a webHttp behavior extension element to it. Specify the behavior to the
end point
B. Create a service behavior and webHttp behavior extension and add a webHttp behavior extension element to it.
C. Create a service behavior and webHttp behavior extension and add a webHttp behavior extension element to it.
Specify the behavior to the service
D. Create an end point behavior and webHttp behavior extension and add a webHttp behavior extension element to it.
Specify the behavior to the end point
Answer: D
8. Which attribute do you use to support HTTP POST, PUT, and DELETE requests in REST services?
A. Get
B. WebGet
C. Invoke
D. WebInvoke
Answer: D
9. You are defining contracts for REST service, you have written the following code in your contract
[OperationContract]
[WebInvoke(Method = "DELETE", UriTemplate = "______________________")]
[Description("Deletes a customer")]
void DeleteCustomer(string customerID);
Which one is appropriate for the blank UriTemlate?
A. Customers/{0}
B. Customers/{id}
C. Customers/{string}
D. Customers/{customerID}
Answer: D
10. To allow authorization to create new data items in datasets in WCF data service, what should be the value of the
EntitySetRights enumeration?
A. WriteSingle
B. WriteMerge
C. WriteAppend
D. Write
Answer: C

Chapter 16/17
1. In WCF, how can a service can invoke a method in a client application?
A. Using client callback
B. Using notification
C. Using loosely coupled events
D. Using announcements
Answer: A
2. Which of the following allows a WCF service to send additional messages to the client that has a means to receive them?
A. reliable messaging
B. callback contracts
C. context binding
D. duplex channel
Answer: B, D
3. What is the difference in coding a callback contract and a service contract?
A. A callback contact has no ServiceContract attribute but a service contract must have
B. A callback contact is not define on the service end but a service contact contract is defined on the service end
C. A callback contact is always a class but a service contact is an interface
D. A callback contact has CallbackContract attribute but a service contract has ServiceContractAttribute
Answer: A
4. Which concurrency mode is suitable if the client application code is not thread-safe but the data it uses remains consistent
across calls?
A. ConcurrencyMode.Single
B. ConcurrencyMode.Multiple
C. ConcurrencyMode. Reentrant
D. ConcurrencyMode.None
Answer: D
5. Which of the following bindings can be used for WCF service with client callbacks?
A. NetTcpBinding
B. NetNamedPipeBinding
C. WS2007HttpBinding
D. WSDualHttpBinding
Answer: A, B, D [Tcp and Named pipe are bidirectional. HTTP is not so WCF provides WsDualHttpBinding]
6. Which one of the following roles in claim-based security describes the organization or entity that issues the rights to assert a
particular claim?
A. Subject
B. Identity provider
C. Relying party
D. Claim token
Answer: B
7. What is an information card in Windows CardSpace?
A. Security credential to prove who one is claiming to be
B. Authorization to resources based on an identity
C. A set of claims issued by identity providers as metadata
D. A certificate from a verified source to prove a valid owner of a resource
Answer: C
8. Why do you use self-issued card with Windows CardSpace?
A. for providing information card for organization users who accesses resources through LAN
B. for testing purposes
C. for securing a group of related service
D. All of the above
Answer: B
9. Which of the following bindings is or are suitable for implementing claim-based security?
A. webHttpBinding
B. basicHttpBinding
C. ws2007FederationHttpBinding
D. wsFederationHttpBinding
Answer: C. D

Você também pode gostar