70-503(CSharp) forum(76 to 90) for IT learners: Apr 2016 Edition

Exam Code: 70-503(CSharp) (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: MS.NET Frmwrk 3.5, Wndws Commun Fndtion App Dev
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-503(CSharp) Exam.

2016 Apr 70-503(CSharp) Study Guide Questions:

Q76. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You write the following code segment. (Line numbers are included for reference only.)

01 [ServiceContract(SessionMode=SessionMode.Required)]

02 public interface IOrderManager

03 {

04

05 void CloseOrder();

06 }

You need to decorate the operation as the method that closes the current session.

Which code segment should you insert at line 04?

A. [OperationContract(IsInitiating=false)]

B. [OperationContract(IsTerminating=true)]

C. [OperationContract][OperationBehavior(ReleaseInstanceMode= ReleaseInstanceMode.AfterCall)]

D. [OperationContract(IsTerminating=false)][OperationBehavior(ReleaseInstanceMode=

ReleaseInstanceMode.AfterCall)]

Answer: B


Q77. You are creating an application in Windows Communication Foundation (WCF) by using Microsoft.NET Framework 3.5.

You need to ensure that the client application communicates with the service by using a duplex contract.

Which five actions should you perform? (To answer, move the five appropriate actions from the list of actions to the answer area, and arrange them in the correct order.)


Answer: 


Q78. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You write the following code segment.

01 [ServiceContract]

02 public interface IMyService

03 {

04 [OperationContract]

05 void MyMethod();

06 }

07

08 public class ServiceImpl:IMyService

09 {

10 [OperationBehavior(TransactionScopeRequired=true)]

11 public void MyMethod() { }

12 }

You need to ensure that concurrent calls are allowed on the service instance. Which code segment should you insert at line 07?

A. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple,

ReleaseServiceInstanceOnTransactionComplete=true)]

B. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple,

ReleaseServiceInstanceOnTransactionComplete=false)]

C. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant,

ReleaseServiceInstanceOnTransactionComplete=true)]

D. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant,

ReleaseServiceInstanceOnTransactionComplete=false)]

Answer: B


Q79. You create a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5. The WCF service accepts service requests from different partner applications.

One of the partner applications occasionally receives faults. You need to identify why the service is generating faults. You must accomplish this goal without interrupting the service. What should you do?

A. Run SvcTraceViewer.exe /register on the WCF server.

B. Connect remotely to the WCF service by using a debugger. Place breakpoints in the exception handling code segment.

C. Configure the Service Tracing options in the application configuration file. Analyze the trace results by using the SvcTraceViewer.exe program.

D. Add the following code segment to the application configuration file. <system.diagnostics> <switches> <add name="WcfFaultTrace" value="Error" /> </ switches></system.diagnostics>

Answer: C


Q80. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You find that the service starts even though the endpoints have not been configured correctly. You need to create a custom service behavior that throws an exception if the list of endpoints that are configured is not complete. Which code segment should you use?

A. Class CustomBehavior Implements IServiceBehavior Public Sub Validate(ByVal

serviceDescription _ As

ServiceDescription, _ ByVal serviceHostBase As ServiceHostBase) _ Implements

IServiceBehavior.Validate

'Validates list of endpoints MyValidationMethod() End SubEnd Class

B. Class CustomBehavior Implements IEndpointBehavior Public Sub Validate(ByVal endpoint As

ServiceEndpoint) _ Implements IEndpointBehavior.Validate 'Validates list of endpoints

MyValidationMethod() End SubEnd Class

C. Class CustomBehavior Implements IContractBehavior Public Sub Validate(ByVal

contractDescription _

As ContractDescription, _ ByVal endpoint As ServiceEndpoint) _ Implements

IContractBehavior.Validate

'Validates list of endpoints MyValidationMethod() End SubEnd Class

D. Class CustomBehavior Implements IOperationBehavior Public Sub Validate(ByVal

operationDescription

As _ OperationDescription) _ Implements IOperationBehavior.Validate 'Validates list of

endpoints

MyValidationMethod() End SubEnd Class

Answer: A


70-503(CSharp) practice exam

Abreast of the times 70-503(CSharp) test engine:

Q81. You create a service by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation to create the service. You use the WSHttpBinding binding to prevent tampering of the data. Users report that the data is unreadable. You need to troubleshoot the problem by logging the incoming messages. Which code fragment should you use?

A. <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true"

logMessagesAtTransportLevel="true"/> </diagnostics></system.serviceModel>

B. <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true"

logMessagesAtServiceLevel="true"/> </diagnostics></system.serviceModel>

C. <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true"

logMalformedMessages="true"/> </diagnostics></system.serviceModel>

D. <system.serviceModel> <diagnostics> <messageLogging logMessagesAtServiceLevel="true"

logMessagesAtTransportLevel="true"/> </diagnostics></system.serviceModel>

Answer: B


Q82. You create a service by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation to create the service.

You use the WSHttpBinding binding to prevent tampering of the data. Users report that the data is unreadable.

You need to troubleshoot the problem by logging the incoming messages.

Which code fragment should you use?

A. <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true"

logMessagesAtTransportLevel="true"/> </diagnostics></system.serviceModel>

B. <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true"

logMessagesAtServiceLevel="true"/> </diagnostics></system.serviceModel>

C. <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true"

logMalformedMessages="true"/> </diagnostics></system.serviceModel>

D. <system.serviceModel> <diagnostics> <messageLogging logMessagesAtServiceLevel="true"

logMessagesAtTransportLevel="true"/> </diagnostics></system.serviceModel>

Answer: B


Q83. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You write the following code fragment for the configuration setting. (Line numbers are included for reference only.)

01 <wsHttpBinding>

02 <binding name="simple">

03

04 </binding>

05 </wsHttpBinding>

You need to ensure that the service uses transport security and allows access to anonymous client applications.

Which code fragment should you insert at line 03?

A. <security mode="Transport" > <transport clientCredentialType="Basic" /></security>

B. <security mode="Transport" > <message clientCredentialType="None"/></security>

C. <security mode="Transport" > <message clientCredentialType="Certificate"/></security>

D. <security mode="Transport" > <transport clientCredentialType="None" /></security>

Answer: D


Q84. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You need to host the service in a medium trust environment on a Web server.

Which two bindings should you use? (Each correct answer presents a complete solution. Choose two.)

A. NetMsmqBinding

B. BasicHttpBinding

C. WSDualHttpBinding

D. NetTcpBinding

E. WebHttpBinding

Answer: BE


Q85. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You create the following service contract.

<ServiceContract()> _

Public Interface IMyService

<OperationContract()> _

Sub DoSomething()

End Interface

The service will not use any external resources.

You need to ensure that the calls to the DoSomething operation are thread-safe.

What are the two possible service implementations that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A. <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple, _

InstanceContextMode:=InstanceContextMode.Single)> _ Public Class ServiceImpl Implements

IMyService

Public Sub DoSomething() _ Implements IMyService.DoSomething End SubEnd Class

B. <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Single, _

InstanceContextMode:=InstanceContextMode.Single)> _ Public Class ServiceImpl

Implements IMyService

Public Sub DoSomething() _ mplements IMyService.DoSomething End SubEnd Class

C. <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple, _

InstanceContextMode:=InstanceContextMode.PerSession)> _ Public Class ServiceImpl

Implements

IMyService Public Sub DoSomething() _ Implements IMyService.DoSomething End SubEnd

Class

D. <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple, _

InstanceContextMode:=InstanceContextMode.PerCall)> _ Public Class ServiceImplD

Implements IMyService

Public Sub DoSomething() _ Implements IMyService.DoSomething End SubEnd Class

Answer: BD


70-503(CSharp) actual exam

Real 70-503(CSharp) braindumps:

Q86. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

The service contains the following binding configuration in the configuration file. (Line numbers are included for reference only.)

01 <wsHttpBinding>

02 <binding name="ssl">

03

4 </binding>

05 </wsHttpBinding>

You need to ensure that the following requirements are met:

The service must use transport-level security (SSL via HTTPS).

The service must use message-level security to authenticate client applications by using user name and password. Which configuration setting should you insert at line 03?

A. <security mode="Message"> <message clientCredentialType="UserName"/></security>

B. <security mode="TransportWithMessageCredential"> <message

clientCredentialType="UserName"/></security>

C. <security mode="Transport"> <transport clientCredentialType="Windows"/> <message

clientCredentialType="UserName"/></security>

D. <security mode="Message" > <transport clientCredentialType="Windows" /> <message

clientCredentialType="UserName" /></security>

Answer: B


Q87. You are creating a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5. You configure a binding to enable streaming. You need to ensure that the client application is able to stream large XML files to the WCF service. Which operation contract should you create?

A. [OperationContract]void UploadFile(Stream xmlData);

B. [OperationContract]void UploadFile(XmlWriter xmlData);

C. [OperationContract]void UploadFile(StreamWriter xmlData);

D. [OperationContract]void UploadFile(byte[] xmlData);

Answer: A


Q88. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You need to programmatically add the following endpoint definition to the service.

http://localhost:8000/ExamService/service Which code segment should you use?

A. String baseAddress="http: //localhost:8000/ExamService";BasicHttpBinding binding1=new

BasicHttpBinding();using(ServiceHost host=new ServiceHost(typeof(ExamService))){

host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);}

B. String baseAddress="http: //localhost:8000/ExamService/service";BasicHttpBinding

binding1=new

BasicHttpBinding();using(ServiceHost host=new ServiceHost(typeof(ExamService))){

host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);}

C. String baseAddress="http: //localhost:8000/ExamService";WsHttpBinding binding1=new

WsHttpBinding();using(ServiceHost host=new ServiceHost(typeof(ExamService))){

host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);}

D. String baseAddress="net.tcp: //localhost:8000/ExamService/service";NetTcpBinding

binding1=new

NetTcpBinding();using(ServiceHost host=new ServiceHost(typeof(ExamService))){

host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);}

Answer: B


Q89. You are creating a Windows Communication Foundation (WCF) client application by using Microsoft .NET Framework 3.5.

The WCF service transfers data to the client applications by using the streaming transfer mode.

You need to create an endpoint that supports the streaming transfer mode.

Which binding should you use?

A. wsHttpBinding

B. basicHttpBinding

C. webHttpBinding

D. wsFederationHttpBinding

Answer: B


Q90. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment.

[ServiceContract(CallbackContract=typeof(IMyServiceCallback))]

public interface IMyService

{

[OperationContract]

void MyMethod();

}

[ServiceContract]

public interface IMyServiceCallback

{

[OperationContract]

void CallbackMethod();

}

The implementation of the MyMethod operation must call back the CallbackMethod operation.

You need to ensure that the service meets the following requirements:

The CallbackMethod operation is able to call the service.

The service instance is thread-safe.

Which service implementation should you use?

A. [ServiceBehavior]public class ServiceImpl : IMyService{ public void MyMethod() {

IMyServiceCallback cb=

OperationContext.Current.GetCallbackChannel<IMyServiceCallback>();

cb.CallbackMethod(); }}

B. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single)]public class ServiceImpl :

IMyService{

public void MyMethod() { IMyServiceCallback cb=

OperationContext.Current.GetCallbackChannel<IMyServiceCallback>(); cb.CallbackMethod();

}}

C. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple)]public class ServiceImpl :

IMyService{

public void MyMethod() { IMyServiceCallback cb=

OperationContext.Current.GetCallbackChannel<IMyServiceCallback>(); cb.CallbackMethod();

}}

D. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant)]public class ServiceImpl :

IMyService{ public void MyMethod() { IMyServiceCallback cb=

OperationContext.Current.GetCallbackChannel<IMyServiceCallback>(); cb.CallbackMethod();

}}

Answer: D