70-513 無料問題集「Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4」

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.)

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 Windows Communication Foundation (WCF) service interacts with the database of a workflow engine. Data access authorization is managed by the database, which raises security exceptions if a user is unauthorized to access it.
You need to ensure that the application transmits the exceptions raised by the database to the client that is calling the service.
Which behavior should you configure and apply to the service?

You are modifying an existing Windows Communication Foundation (WCF) service that is defined as follows.

SubmitOrder makes a call to another service. The ProcessMessage method does not perform as expected under a heavy load.
You need to enable processing of multiple messages. New messages must only be processed when the ProcessMessage method is not processing requests, or when it is waiting for calls to SubmitOrder to return.
Which attribute should you apply to the MessageProcessor class?

You are moving a Windows Communication Foundation (WCF) service into production. You need to be able to monitor the health of the service.
You only want to enable all performance counter instances exposed by the ServiceModelService 4.0.0.0 counter group.
Which element should you add to the system.serviceModel section in the application configuration file?

You are developing a client application that uses the following code to consume a Windows Communication Foundation (WCF) service. (Line numbers are included for reference only.)
01 BasicHttpBinding myBinding = new BasicHttpBinding(); 02 EndpointAddress myEndpointAddress = new EndpointAddress( "http://contoso.com/TaxService.svc");
04 ITaxService client = channelFactory.CreateChannel();
05 string data = client.GetData(1);
You need to consume the service.
Which code segment should you insert at line 03?

A Windows Communication Foundation (WCF) solution exposes the following service over a TCP binding. (Line numbers are included for reference only.)
01 [ServiceContract]
02 [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
03 public class DataAccessService
04 {
05 [OperationContract]
06 public void PutMessage(string message)
07 {
08 MessageDatabase.PutMessage(message);
09 }
10 [OperationContract]
11 public string[] SearchMessages(string search)
12 {
13 return MessageDatabase.SearchMessages(search);
14 }
15 }
MessageDatabase supports a limited number of concurrent executions of its methods.
You need to change the service to allow up to the maximum number of executions of the methods of MessageDatabase. This should be implemented without preventing customers from connecting to the service.
What should you do?

You are developing a Windows Communication Foundation (WCF) service. You enable message logging, trace listeners, activity propagation, and tracing on the trace sources.
You have the following code segment in the client application. (Line numbers are included for reference only.)

You encounter errors when your client application consumes the service.
You need to ensure that your client application can correlate tracing information with the
service.
Which code segment should you add at line 04?

You are developing a Windows Communication Foundation (WCF) service that contains the following operation contract.
<OperationContract()>
Function GetCustomerNames() As CustomerNames
The operation returns customer names.
You need to develop a definition for the operation contract that produces XML with the following structure.

Which code segment should you use

You are developing a Windows Communication Foundation (WCF) service. The service configuration file has a <System.Diagnostics> 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 <System.Diagnostics> element?

You are developing a Windows Communication Foundation (WCF) service to provide shopping cart support. ASP.NET compatibility mode is not enabled.
The shopping cart information must be retained across user visits to the store until the user explicitly empties the cart or submits the cart contents to order.
You need to implement the service as a DurableService.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

正解:A、B 解答を投票する
DRAG DROP
You use Visual Studio to develop a Windows Communication Foundation (WCF) service. The service is not hosted.
You cannot use the WcfTestClient.exe tool to test the service.
You need to test the service from a separate Visual Studio solution that contains a simple console application.
Which four actions should you perform in sequence? (To answer, move the appropriate four actions from the list of actions to the answer area and arrange them in the correct order.)
正解:
You are developing a client application that consumes a Windows Communication
Foundation (WCF) service. The operation contract is as follows.
<OperationContract()>
<FaultContract(GetType(SalesFault))>
Function GetSales(ByVal saieId As String) As String
The service configuration file contains the following line in the serviceBehaviors section.
<behovior>
oerviceDebug includeExceptionDetoilInFaults-"True'V>
</behavior>
A divide-by-zero exception is not being handled by the service.
You need to ensure that the exception is caught in the client application.
Which type of exception should the client catch?

You are developing a client that sends several types of SOAP messages to a Windows Communication Foundation (WCF) service method named PostData.
PostData is currently defined as follows.
[OperationContract]
void PostData(Order data);
You need to modify PostData so that it can receive any SOAP message.
Which code segment should you use?

A Windows Communication Foundation (WCF) solution provides a session-based counter.
The service is self-hosted. The hosting code is as follows.
Dim host As ServiceHost = New ServiceHost(GetType(CounterService))
Dim bnding As NetTcpBinding =
New NetTcpBinding(SecurityMode.None)
host.AddServiceEndpoint("MyApplication. ICounterService",
binding, "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. lCounterService",
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 Windows Communication Formation (WCF) client and service share the following service contract interface
<ServiceContractO>
Public Interface IContosoService <OperationContractO>
Sub SasePerson(BWal person As Person) End Interface They also use the following
binding.
Dim binding As NetTcpBinding = New NetTcpBinding With {TransactionFlow = True) The
client cals the service with the (following code using (mransactionScope ts = new
TransactionScope(TransactionScopeOption
Required))
{
IContosoService client = factoryCreateChannelO;
client SavePerson(person);
Consde. WriteLine(
Transaction. CurreriTransactioninformation
DistnbutedldentifierX
ts CorrpleteO;
)
The service has the following impementation for SavePerson
Public Sub SavePerson(ByVal person As Perwn) - implements IContosoService
SavePerson person Save()
ConsdeWriteLine(Transaction .Current Transactionlnformaiona
Distributedldentifier)
End Sit
The distributed identifiers do not match on the client and the server.
You need to ensure that the client and server enlist in the same distributed transaction
What should you do?

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?

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 Windows Communication Foundation (WCF) service uses the following service contract.
[ServiceContract]
public interface IService
{
[OperationContract]
string Operation 1 (string s);
}
You need to ensure that the operation contract Operationi responds to HTTP POST requests.
Which code segment should you use?

A Windows Communication Foundation (WCF) application exposes a service as a SOAP endpoint for consumption by cross-platform clients. During integration testing, you find that one of the clients is not generating the correct messages to the WCF application.
In order to debug the issue and fix the communication, you need to configure the service to log messages received from the client.
What should you do?

A Windows Communication Foundation (WCF) service is self-hosted in a console application.
The service implements the ITimeService 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?

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡