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 [AspNetC

题目

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 LibraryService04 {05 public Book GetBookByTitle(string title)06 {07 ...08 }0910 [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) REST service to provide access ”相关问题
  • 第1题:

    You are developing a Windows Communication Foundation (WCF) service. The service configuration file has a element defined. You need to ensure that all security audit information, trace logging, and message logging failures are recorded.Which configuration segment should you add to the element?()

    A.

    B.

    C.

    D.


    参考答案:C

  • 第2题:

    You are creating a Windows Communication Foundation (WCF) service. You need to ensure that the service is compatible with ASP.NET to make use of the session state. Which binding should you use?()

    A. NetTcpContextBinding

    B. BasicHttpContextBinding

    C. NetTcpBinding

    D. NetMsmqBinding


    参考答案:B

  • 第3题:

    You have a secured Windows Communication Foundation (WCF) service. You need to track unsuccessful attempts to access the service. What should you do?()

    A. Set the authorization Manager Type attribute of the service Authorization behavior to Message.

    B. Set the include Exception Detailsln Faults attribute of the service Debug behavior to true.

    C. Set the Mode attribute of the security configuration element to Message.

    D. Set the message Authentication AuditLevel attribute of the service Security Audit behavior to Failure.


    参考答案:D

  • 第4题:

    You are developing a Windows Communication Foundation (WCF) service. The service operation takes a customer number as the only argument and returns information about the customer. The service requires a security token in the header of the message. You need to create a message contract for the service.Which code segment should you use?()

    A.

    B.

    C.

    D.


    参考答案:D

  • 第5题:

    You have an existing Windows Communication Foundation (WCF) service. You need to ensure that other services are notified when the service is started.What should you do?()

    A.

    B.

    C.

    D.


    参考答案:D

  • 第6题:

    You are developing a data contract for a Windows Communication Foundation (WCF) service. The data in the data contract must participate in round trips. Strict schema validity is not required. You need to ensure that the contract is forward-compatible and allows new data members to be added to it. Which interface should you implement in the data contract class?()

    A.ICommunicationObject

    B.IExtension

    C.IExtensibleObject

    D.IExtensibleDataObject


    参考答案:D