black

MCTS(70-513)

登录

单项选择题

You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.)
01 [ServiceContract()]
02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
03 public Class LibraryService
04 {
05 public Book GetBookByTitle(string title)
06 {
07 ...
08 }
09
10 [WebGet(UriTemplate = "Book/{id}")]
11 public Book GetBookById(string id)
12 {
13 ...
14 }
15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()

A. [WebGet(UriTemplate = "Book/{title}")]
B. [WebGet(UriTemplate = "BookByTitle/{title}")]
C. [WebGet(UriTemplate = "Book/{titleToSearch}")]
D. [WebGet(UriTemplate = "{titleToSearch}")]

相关考题

单项选择题 You are developing a Windows Communication Foundation (WCF) service. You need to enable security auditing for all events. What should you do?()

单项选择题 You develop a Windows Communication Foundation (WCF) service. You name the service MovieService in the Movie namespace. The service is hosted in Microsoft Internet Information Services (IIS). You copy the assembly containing the service to the bin folder in the virtual directory path.You need to set up the URI that is mapped to the service. What should you do?()

单项选择题 You are developing a Windows Communication Foundation (WCF) service. The following code defines and implements the service. (Line numbers are included for reference only.) 01 [ServiceContract(SessionMode = SessionMode.Allowed)] 02 public interface ICatchAll 03 { 04 [OperationContract(IsOneWay = false, Action = "*", ReplyAction = "*")] 05 Message ProcessMessage(Message message); 06 } 07 08 public class CatchAllService : ICatchAll 09 { 10 public Message ProcessMessage(Message message) 11 { 12 13 ... 14 return returnMsg; 15 } 16 }You need to ensure that two identical copies of the received message are created in the service. Which code segment should you insert at line 12?()

All Rights Reserved 版权所有©考试题库网(kstiku.com)

备案号:湘ICP备14005140号-3

经营许可证号:湘B2-20140064