You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP. You need to expose that contract over HTTP and TCP. What should you do?()A、Add a net.tcp base address to the host.B、Add an endpoint configured with a netTcpBinding.C、Add an endpoint behavior named netTcpBehavior to the existing endpoint.D、Add a binding configuration to the existing endpoint named netTcpBinding.

You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP. You need to expose that contract over HTTP and TCP. What should you do?()

  • A、Add a net.tcp base address to the host.
  • B、Add an endpoint configured with a netTcpBinding.
  • C、Add an endpoint behavior named netTcpBehavior to the existing endpoint.
  • D、Add a binding configuration to the existing endpoint named netTcpBinding.

相关考题:

You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.The Windows Service class will inherit from ServiceBase.You need to ensure that the WCF service starts when the Windows Service is restarted.What should you do in the Windows Service class?()A.B.C.D.

You are creating an application that consumes a Windows Communication Foundation (WCF) service. The service implements the IService contract. The client application contains the CallbackHandler class, which implements IServiceCallback.You need to ensure that a client proxy is created that can communicate with the service over a duplex channel.Which code segment should you use?()A.B.C.D.

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.

Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the lTimeService service interface in the TimeService class.You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?()A.B.C.D.

You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP.You need to expose that contract over HTTP and TCP. What should you do?() A. Add a net.tcp base address to the host.B. Add an endpoint configured with a netTcpBinding.C. Add an endpoint behavior named netTcpBehavior to the existing endpoint.D. Add a binding configuration to the existing endpoint named netTcpBinding.

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.

A Windows Communication Foundation (WCF) solution provides a session-based counter.The service is self-hosted. The hosting code is as follows:ServiceHost host = new ServiceHost(typeof(CounterService));NetTcpBinding binding1 = new NetTcpBinding(SecurityMode.None);host.AddServiceEndpoint(MyApplication.ICounterService, binding1, net.tcp://localhost:23456);host.Open();This service is currently exposed over TCP, but needs to be exposed to external clients over HTTP. Therefore, a new service endpoint is created with the following code:host.AddServiceEndpoint(MyApplication.ICounterService, binding2, http://localhost:12345);You need to complete the implementation and ensure that the session-based counter will perform over HTTP as it does over TCP.What should you do?()A.B.C.D.

You are developing a Windows Communication Foundation (WCF) service. The service needs to access out-of-process resources.You need to ensure that the service accesses these resources on behalf of the originating caller. What should you do?()A. Set the value of ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel to TokenlmpersonationLevel.ImpersonationB. Set the value of ServiceSecurityContext.Current.Windowsldentity.ImpersonationLevel to TokenlmpersonationLevel.DelegationC. Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBindingD. Set the PnncipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding

A Windows Communication Foundation (WCF) solution exposes the following contract over an HTTP connection.[ServiceContract]public interface IDataService{ [OperationContract] string GetData();}Existing clients are making blocking calls to GetData. Calls to GetData take five seconds to complete.You need to allow new clients to issue non-blocking calls to get the data, without breaking any existing clients. What should you do?()A.B.C.Generate a proxy class with asynchronous methods and use it for the new clientsD. Add a new endpoint to the service that uses a full-duplex binding and use it for the new clients.

A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service.You must ensure that the client application can interact with the WCF service. What should you do?()A. On the OperationContractAttribute, set the AsyncPattern property value to true.B. On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client.C. On the client, create a proxy derived from DuplexClientBaseTChannel .D. On the client, use GetCallbackChannelT .

A Windows Communication Foundation (WCF) service uses the following service contract. [ServiceContract] public interface IService{ [OperationContract] string Operation1(string s);}You need to ensure that the operation contract Operation1 responds to HTTP POST requests.Which code segment should you use?()A.B.C.D.

You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation. You implement the delete method as follows:void DeleteItems(string id);You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?()A. Add the WebInvoke(UriTemplate=/Items/{id}, Method=DELETE) attribute to the operationB. Add the HttpDelete atribute to the operationC. Replace the string parameter with a RemovedActivityAction parameterD. Replace the return type with RemovedActivityAction.

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  This application will be part of a solution that contains a Windows Communication Foundation (WCF) service project. The Web application will be used to make calls to a service identified in theWCF service project. Management is planning to host the Web application on a separate serverfrom the WCF service. They want the WCF service to perform remotely. You need to add areference to the WCF service.  What should you do?()A、You should add an assembly reference to the project.B、You should add a project reference to the project.C、You should add a Web reference to the project.D、You should add a service reference to the project.

You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner.You need to add a delete operation. You implement the delete method as follows. string void DeleteItems(string id);You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?()A、 Add the WebInvoke(UriTemplate = "/Items/{id}",Method="DELETE") attribute to the operation.B、 Add the HttpDelete attribute to the operation.C、 Replace the string parameter with a RemovedActivityAction parameter.D、 Replace the return type with RemovedActivityAction.

You are creating a Windows Communication Foundation (WCF) service that implements the following service contract.[ServiceContract]public interface IOrderProcessing { [OperationContract] void ApproveOrder(int id);}You need to ensure that only users with the Manager role can call the ApproveOrder method. What should you do?()A、In the method body, check the Rights PosessesProperty property to see if it contains ManagerB、Add a PrincipalPermission attribute to the method and set the Roles property to ManagerC、Add a SecurityPermission attribute to the method and set the SecurityAction to DemandD、In the method body, create a new instance of WindowsClaimSet. Use the FindClaims method to locate a claimType named Role with a right named Manager

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、ICommunicationObjectB、IExtensionC、IExtensibleObjectD、IExtensibleDataObject

Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders. The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay. You need to ensure that the service is configured to process multiple orders in one transaction. What should you do? ()A、Use service behavior and set the maxConcurrentCalls attribute.B、Use endpoint behavior and set the maxBatchSize attribute.C、Use endpoint behavior and set the maxPendingReceives attribute.D、Use endpoint behavior.

A Windows Communication Foundation (WCF) service listens for messages at net.tcp://www.contoso.com/MyService.It has a logical address at http://www.contoso.com/MyService. The configuration for the WCF client is as follows:The generated configuration does not provide enough information for the client to communicate with the server.You need to update the client so that it can communicate with the server. What should you do?()A、In the client configuration, change the value of the address attribute to net.tcp://www.contoso.com/MyServiceB、In the client configuration, change the value of the address attribute to net.tcp://www.contoso.com/MyService listen=http://www.contoso.com/MyService.C、After instantiating the client and before invoking any service operation, add this line of code. EndpointBehaviors.Add(new EndpointDiscoveryBehavior(){ Enabled = true });D、After instantiating the client and before invoking any service operation, add this line of code. client.Endpoint.Behaviors.Add(new ClientViaBehavior(new Uri("net.tcp://www.contoso.com/IMyService")));

You are integrating a Windows Communication Foundation (WCF) service within an enterprise-wide Service Oriented Architecture (SOA).Your service has the following service contract: [ServiceContract]public class CreditCardConfirmationService { [OperationContract] boolean ConfirmCreditCard(string ccNumber); double OrderAmount(int orderNumber);} You need to allow the code in the ConfirmCreditCard method to participate automatically in existing transactions.If there is no existing transaction, a new transaction must be created automatically. What should you do?()A、Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new TransactionScope()) block.B、Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new CommittableTransaction()) block.C、Add an [OperationBehavior(TransactionScopeRequired=true)] attribute to the ConfirmCreditCard method.D、Add an [OperationBehavior(TransactionAutoComplete=true)] attribute to the ConfirmCreditCard method.

You are creating a client application and configuring it to call a Windows Communication Foundation (WCF) service.When the application is deployed, it will be configured to send all messages to a WCF routing service. You need to ensure that the application can consume the target service after the application is deployed. What should you do?()A、In the client application, add a service reference to the router service. In the client binding configuration, specify the address of the router service.B、In the client application, add a service reference to the target service. In the client binding configuration, specify the address of the target service.C、In the client application, add a service reference to the router service. In the client binding configuration, specify the address of the target service.D、In the client application, add a service reference to the target service. In the client binding configuration, specify the address of the router service.

You are developing a Windows Communication Foundation (WCF) service. The service needs to access out-of-process resources.You need to ensure that the service accesses these resources on behalf of the originating caller. What should you do?()A、Set the value of ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel to TokenlmpersonationLevel.ImpersonationB、Set the value of ServiceSecurityContext.Current.Windowsldentity.ImpersonationLevel to TokenlmpersonationLevel.DelegationC、Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBindingD、Set the PnncipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding

You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation. You implement the delete method as follows:void DeleteItems(string id);You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?()A、Add the WebInvoke(UriTemplate="/Items/{id}", Method="DELETE") attribute to the operationB、Add the HttpDelete atribute to the operationC、Replace the string parameter with a RemovedActivityAction parameterD、Replace the return type with RemovedActivityAction.

You have an existing Windows Communication Foundation (WCF) Web service. The Web service is not responding to messages larger than 64 KB. You need to ensure that the Web service can accept messages larger than 64 KB without generating errors. What should you do?()A、Increase the value of maxReceivedMessageSize on the endpoint binding.B、Increase the value of maxRequestLength on the httpRuntime element.C、Increase the value of maxBufferSize on the endpoint binding.D、Increase the value of maxBufferPoolSize on the endpoint binding.

A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service.You must ensure that the client application can interact with the WCF service. What should you do?()A、On the OperationContractAttribute, set the AsyncPattern property value to true.B、On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client.C、On the client, create a proxy derived from DuplexClientBaseTChannel .D、On the client, use GetCallbackChannelT .

单选题You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  This application will be part of a solution that contains a Windows Communication Foundation (WCF) service project. The Web application will be used to make calls to a service identified in theWCF service project. Management is planning to host the Web application on a separate serverfrom the WCF service. They want the WCF service to perform remotely. You need to add areference to the WCF service.  What should you do?()AYou should add an assembly reference to the project.BYou should add a project reference to the project.CYou should add a Web reference to the project.DYou should add a service reference to the project.

单选题You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP. You need to expose that contract over HTTP and TCP. What should you do?()AAdd a net.tcp base address to the host.BAdd an endpoint configured with a netTcpBinding.CAdd an endpoint behavior named netTcpBehavior to the existing endpoint.DAdd a binding configuration to the existing endpoint named netTcpBinding.

单选题You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation. You implement the delete method as follows:void DeleteItems(string id);You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?()AAdd the WebInvoke(UriTemplate=/Items/{id}, Method=DELETE) attribute to the operationBAdd the HttpDelete atribute to the operationCReplace the string parameter with a RemovedActivityAction parameterDReplace the return type with RemovedActivityAction.