Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 - 070-513무료 덤프문제 풀어보기
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?
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?
정답: B
A Windows Communication Foundation (WCF) service listens for messages at net
tcpilwwwcontoso.comMMyService.
It has a logical address at http/Iwwwcontosocorn)MyService
The configuration for the WCF client is as follows
<endpoint addressrhTttpllwwwcontosocom/MyService"
bindinge"netTc pBinding"
bindingConfiguraton-NetTc pBinding_lMyService
contract="ServiceReference 1. IMyServce'
name='NetTcpBinding_lllyService"/>v
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
tcpilwwwcontoso.comMMyService.
It has a logical address at http/Iwwwcontosocorn)MyService
The configuration for the WCF client is as follows
<endpoint addressrhTttpllwwwcontosocom/MyService"
bindinge"netTc pBinding"
bindingConfiguraton-NetTc pBinding_lMyService
contract="ServiceReference 1. IMyServce'
name='NetTcpBinding_lllyService"/>v
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
정답: C
A Windows Communication Foixdation (WCF) solution uses the following contracts (Line numbers are included for reference only)
01 eServiceContract(Callback contract: GetType(lNameService))> 02Putlic Interface I(IeetingService 03 04 <OperationContractO> 05Function GetMessage() As Stnng 06 07End Interface 08 09 <ServiceContractO> 1 OPublic Interface INameService 11 12 <OperationContractO> 1 3Function GetName() As String 14 15 End Interface
The code that implements the KleetingService interface is as follows.
20Public Class GretingService 21Impements lGreaingService 22 23Public Function GetMessage0As String
24lmpements IGredingService. GetMessage
25
26Dim clientChann As INameService =
27OperationContet. Current.
28GetCallbackChamel(Of INameService)()
29Dim clientName As String = clientChannelGetName()
30 Retumn String Format("Hello {O)", clientName)
31
32End Function
33hnd Class
The service is self-hosted The hosting code is as follows.
35Dim host As SeniceHost =
36New ServiceHost(GetType(GrstingService))?
37Dim binding As NetTcpBinding =
38New NetTcpBinding(Sec urityMode. None)
39hostAddServiceEndpoint('Myapplication lGreetingService".
4Obincng, net.tcp:Ilocalhost: 12345W)
41 HotOpen()l
The code that implements the INameService interface is as follows.
42Class NameService
43lmpements INameService
44
45Dim name As String
46
47Public Sub NameService(ByV name As String)
48Me.reme = name
49End Sub
50
51 Public Function GetName() As String
52lmpements INameService. GeName
53
54Reti.rn name
55End Function
56End Class Currently, this code fails at runtime, and an Invalid Operation Exception is thrown at mne 25.
You need to correct the code so that the call from the service back to the client complets successfully
What e two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
01 eServiceContract(Callback contract: GetType(lNameService))> 02Putlic Interface I(IeetingService 03 04 <OperationContractO> 05Function GetMessage() As Stnng 06 07End Interface 08 09 <ServiceContractO> 1 OPublic Interface INameService 11 12 <OperationContractO> 1 3Function GetName() As String 14 15 End Interface
The code that implements the KleetingService interface is as follows.
20Public Class GretingService 21Impements lGreaingService 22 23Public Function GetMessage0As String
24lmpements IGredingService. GetMessage
25
26Dim clientChann As INameService =
27OperationContet. Current.
28GetCallbackChamel(Of INameService)()
29Dim clientName As String = clientChannelGetName()
30 Retumn String Format("Hello {O)", clientName)
31
32End Function
33hnd Class
The service is self-hosted The hosting code is as follows.
35Dim host As SeniceHost =
36New ServiceHost(GetType(GrstingService))?
37Dim binding As NetTcpBinding =
38New NetTcpBinding(Sec urityMode. None)
39hostAddServiceEndpoint('Myapplication lGreetingService".
4Obincng, net.tcp:Ilocalhost: 12345W)
41 HotOpen()l
The code that implements the INameService interface is as follows.
42Class NameService
43lmpements INameService
44
45Dim name As String
46
47Public Sub NameService(ByV name As String)
48Me.reme = name
49End Sub
50
51 Public Function GetName() As String
52lmpements INameService. GeName
53
54Reti.rn name
55End Function
56End Class Currently, this code fails at runtime, and an Invalid Operation Exception is thrown at mne 25.
You need to correct the code so that the call from the service back to the client complets successfully
What e two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
정답: C,D
You are developing a Windows Communication Foundation (WCF) service that must be
discoverable.
You need to ensure that the ServiceHost instance supports multiple discovery versions.
What should you do?
discoverable.
You need to ensure that the ServiceHost instance supports multiple discovery versions.
What should you do?
정답: A
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
<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
정답: A
You are developing a Windows Communication Foundation (WCF) service. One of the parameters used with the service operations is a security token. The security token is not sensitive. The monitoring software tracks security tokens and can read tokens in clear text only.
The company security policy requires that you validate all clear text data passed over the corporate network.
You need to ensure that the service verifies that the security token is not changed during transit.
What should you do?
The company security policy requires that you validate all clear text data passed over the corporate network.
You need to ensure that the service verifies that the security token is not changed during transit.
What should you do?
정답: B
You have a Windows Communication Foundation (WCF) service.
The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?
The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?
정답: A
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?
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 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?
You need to ensure that the Web service can accept messages larger than 64 KB without generating errors.
What should you do?
정답: C