You need to configure the WCF service to execute under the Windows logged-on identity of the calling applicati
A Windows Communication Foundation (WCF) service that handles corporate accounting
must be changed to comply with government regulations of auditing and accountability. You
need to configure the WCF service to execute under the Windows logged-on identity of the
calling application. What should you do?
You need to ensure that all clients calling GetMessage will retrieve the updated string if the message is upda
A Windows Communication Foundation (WCF) solution uses the following contract to share
a message across its clients. (Line numbers are included for reference only.) 01
<ServiceContract()> 02 Public Interface ITeamMessageService 03 04
<OperationContract()> 05 Function GetMessage() As String 06 07 <OperationContract()>
08 Sub PutMessage(ByVal message As String) 09 End Interface The code for the service
class is as follows. 10 Public Class TeamMessageService 11 Implements
ITeamMessageService 12 13 Dim key As Guid = Guid.NewGuid() 14 Dim message As
String = “Today s Message” 15 16 Public Function GetMessage() As String _ 17
Implements ITeamMessageService.GetMessage 18 19 Return String.Format(“Message:{0}.
Key:{1}”, message, key) 20 End Function 21 22 Public Sub PutMessage(ByVal message As
String) _ 23 Implements ITeamMessageService.PutMessage 24 25 Me.message =
message 26 End Sub 27 28 End Class The service is self-hosted. The hosting code is as
follows. 29 Dim host As ServiceHost = New ServiceHost(GetType(TeamMessageService))
30 Dim binding As BasicHttpBinding = New
BasicHttpBinding(BasicHttpSecurityMode.None) 31 host.AddServiceEndpoint(
“MyApplication.ITeamMessageService”, binding, “http://localhost:12345”) 32 host.Open()
You need to ensure that all clients calling GetMessage will retrieve the updated string if the
message is updated by any client calling PutMessage. What should you do?
What are two possible ways to achieve this goal (Each correct answer presents a complete solution?
A WCF service code is implemented as follows. (Line numbers are included for reference
only.) 01 <ServiceContract()> 02 <ServiceBehavior( 03
InstanceContextMode:=InstanceContextMode.Single)> 04 Public Class CalculatorService
05 06 <OperationContract()> 07 Public Function Calculate(ByVal op1 As Double, 08 ByVal
op As String, ByVal op2 As Double) As Double & 24 End Function 25 26 End Class You
need to decrease the response time of the service. What are two possible ways to achieve
this goal (Each correct answer presents a complete solution?Choose two.)
You need to enable logging to verity that the messages from the client are signed and encrypted
A Windows Communication Foundation (WCF) service only accepts messages that are
signed and encrypted a client application is not receiving expected responses from the
service. You need to enable logging to verity that the messages from the client are signed
and encrypted. You also need to see what each message looks like before the message
body is deserialized into a NET object what should you do?
Which behavior should you configure and apply to the service?
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?
Which configuration segment should you add to the <System.Diagnostics> element?
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 need to interpret the trace results to determine where the error occurred and what to do next
You are using tracing to diagnose run-time issues when you look at the traces for the
service in Svc Trace viewer exe, you see what is shown in the exhibit (Click the Exhibit
button) The exception trace is selected in Svc Trace reviewer exe. You need to interpret the
trace results to determine where the error occurred and what to do next. What should you
do?
You need to retrieve the debug version of the service JavaScript
An ASP.NET application hosts a RESTful Windows Communication Foundation (WCF)
service at /Services/Contoso.svc . The service provides a JavaScript resource to clients.
You have an explicit reference to the JavaScript in your page markup as follows. <script
type=”text/3avaScript” src=”/Secvices/Contoso.svc/js” /> You need to retrieve the debug
version of the service JavaScript. What should you do?
You need to create a channel factory that can send messages to the endpoint listening at net.pipe://localhost/
A Windows Communication Foundation (WCF) client configuration file contains the following
XML segment in the system.serviceModel element. <client> <endpoint address=”
net.tcp://server/ContosoService ” binding=” netTcpBinding ” contract=” Contoso. IContoso
Service ” name=” netTcp ” / > <endpoint address=” net.pipe://localhost/ContosoService “
binding=” netNamedPipeBinding ” contract=” Contoso. IContoso Service ” name=” netPipe “
/> </client> You need to create a channel factory that can send messages to the endpoint
listening at net.pipe://localhost/ContosoService. Which code segment should you use
You need to implement the error handling code for SearchMessages and create a new channel on the client only i
A Windows Communication Foundation (WCF) service implements the following contract.
(Line numbers are included for reference only.) 01 <ServiceContract()> 02 Public Interface
IDataAccessService 03 04 <OperationContract()> 05 Sub PutMessage(ByVal message As
String) 06 07 <OperationContract()> 08 <FaultContract(GetType(TimeoutFaultException))>
09 <FaultContract(GetType(FaultException))> 10 Function SearchMessages(ByVal search
As String) As String () 11 12 End Interface The implementation of the SearchMessages
method throws TimeoutFaultException exceptions for database timeouts. The
implementation of the SearchMessages method also throws an Exception for any other
issue it encounters while processing the request. These exceptions are received on the
client side as generic FaultException exceptions. You need to implement the error handling
code for SearchMessages and create a new channel on the client only if the channel faults.
What should you do?