最新的Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 - 70-513免費考試真題

You are creating a Windows Communication Foundation (WCF) service that is implemented as follows.
(Line numbers are included for reference only.)
01|ServiceContract]
02[ServiceBehavior (includeExceptionDetailslnFaults = true) 1
03putiic class OrderService
04{
05[Operation Contract]
06putiic void Submit Order (Order an Order)
07{
O8try
09{
10...
11)
12catch (DivideByZeroExcepton ex)
13{
15)
16)
17)
You need to ensure that the stack trace details of the exception are not included in the error information sent to the client.
What should you do?

正確答案: D
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
You are configuring services to be discoverable. The services must be discoverable without relying on a central server. Client applications that consume the services are on a network segment that is separate from the network segment that the services are located on.
A firewall blocks all TCP ports between the two network segments, but allows other protocols to pass through.
You need to ensure that the client applications can discover the services.
What should you do?

正確答案: D
You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. The service contract is defined as follows. (Line numbers are included for reference only.)

The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client application's transaction if one is available. Otherwise it must use its own transaction.
You need to ensure that the service operation is always executed within a transaction.
What should you do?

正確答案: D
You develop a Windows Communication Foundation (WCF) service that is hosted by using
Windows Activation Services (WAS).
You need to configure the service to accept requests that use the TCP/IP protocol.
What should you do? (Each correct answer presents part of the solution. Choose two.)

正確答案: B,D
說明:(僅 Fast2test 成員可見)
You want to debug the Windows Communication Foundation (WCF) client and server interaction through message and application tracing.
You need to correlate traces generated on the client and the server.
Which XML segment should you add to the system. diagnostics configuration element in the client and server application configuration file?

正確答案: C
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?

正確答案: A
The endpoint of a Windows Communication Foundation (WCF) service uses basicHttpBinding for its binding. Your company's policies have changed to require that messages not be sent in clear text.
You must ensure that all messages are encrypted when traveling across the network.
What should you do?

正確答案: C
A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the
MyApplication namespace.
The service is implemented in a class named DataAccessService, which implements the
IDataAccess interface and also is defined in the MyApplication namespace.
The hosting code is as follows. (Line numbers are included for reference only.)

You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.
Which line of code should you insert at line 04?

正確答案: A
A Windows Communication Foundation (WCF) service sends notifications when the service is started and stopped.
You need to implement a client that logs these notifications.
Which class should you use?

正確答案: C
A Windows Communication Foundation (WCF) service exposes two operations: OpA and OpB OpA needs to execute under the client's identity, and OpB needs to execute under the service's identity.
You need to configure the service to run the operations under the correct identity
What should you do?

正確答案: C
You are developing a Windows Communication Foundation (WCF) service that contains the following operation contract.
[OperationContract]
CustomerNames GetCustomerNames();
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?

正確答案: E

聯系我們

如果您有任何問題,請留下您的電子郵件地址,我們將在12小時內回复電子郵件給您。

我們的工作時間:( GMT 0:00-15:00 )
週一至週六

技術支持: 立即聯繫 

English 日本語 Deutsch 한국어