Abreast of the times 70-503: Pass4sure real training materials from 31 to 45

70-503 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-503
Exam name: TS: Microsoft .NET Framework 3.5 - Windows Communication Foundation
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-503 Exam pdf Collection

Question No. 31

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

You need to insert an additional header in a response message. 

What should you do? 

A. Implement the BeforeSendRequest method of the IClientMessagelnspector interface. 

B. Implement the BeforeSendReply method of the IDispatchMessagelnspector interface. 

C. Implement the AfterCall method of the IParameterlnspector interface. 

D. Implement the AfterReceiveRequest method of the IDispatchMessagelnspector interface. 

Answer:


Question No. 32

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service will be hosted in a managed Console application. 

You want to add endpoints to the service. 

You need to ensure that all endpoints use the same base address. 

Which code fragment should you use? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Question No. 33

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


The service must meet the following requirements: 

You need to set the isolation level for the service. 

Which line of code should you insert at line 04? 

A. <ServiceBehavior( _ TransactionIsolationLevel:=IsolationLevel.Snapshot)> _ 

B. <ServiceBehavior( _ TransactionIsolationLevel:=IsolationLevel.Chaos)> _ 

C. <ServiceBehavior( _ TransactionIsolationLevel:=IsolationLevel.Serializable)> _ 

D. <ServiceBehavior( _ TransactionIsolationLevel:=IsolationLevel.Unspecified)> _ 

Answer:


Question No. 34

You are creating 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.) 


If the existing operation contract is unable to process a request made to the service, a generic operation contract must attempt to process the request. 

You need to create the generic operation contract. 

Which code segment should you insert at line 07? 

A. <OperationContract(Action:="*")> _ 

Sub ProcessOthers(ByVal msg As Message) 

B. <OperationContract(Action:="*")> _ Sub ProcessOthers() 

C. <OperationContract(Action:="Default")> _ Sub ProcessOthers(ByVal msg As Message) 

D. <OperationContract(Action:="Default")> _ Sub ProcessOthers() 

Answer:


Question No. 35

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

You need to ensure that you can customize the behavior of the ClientRuntime class and the DispatchRuntime class. You must achieve this goal without altering the behavior of the service. 

What should you do? 

A. Implement the IEndpointBehavior interface to create an Endpoint behavior. 

B. Implement the IOperationBehavior interface to create an Operation behavior. 

C. Implement the IServiceBehavior interface to create a Service behavior. 

D. Implement the IContractBehavior interface to create a Contract behavior. 

Answer:


Question No. 36

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully created two interfaces: IMyService and IMyServiceClient. 

You need to ensure that the service is able to call methods from the client application by using the IMyServiceClient interface. 

Which code segment should you use? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Question No. 37

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

You add the following code segment to a configuration file. (Line numbers are included for reference only) 

01 <configuration> 02 <system.serviceModel> 

04 </system.serviceModel> 

05 </configuration 

You need to enable the performance counters to monitor the ServiceModelOperation object of the service. 

You also need to ensure that the performance counters are disabled for all other services. 

What should you do? 

A. Add the following code fragment at line 03 in the machine.config file. <diagnosticsperformanceCounters="ServiceOnly" /> 

B. Add the following code fragment at line 03 in the app.config file. <diagnosticsperformanceCounters="All" /> 

C. Add the following code fragment at line 03 in the app.config file. <diagnosticsperfocmanceCounters="ServiceOnly" /> 

D. Add the following code fragment at line 03 in the machine.config file. <diagnosticsperfocmanceCounters="All" /> 

Answer:


Question No. 38

What actions should you take to inspect messages on server? (choose 3) 

A. Implemement IEndpointBehavior 

B. Implement IOperationBehavior 

C. Implement IClientMessageInspector 

D. Implement IDispatchMessageInspector 

E. Insert behavior before IClientObject.Open 

F. Insert behavior before ICommonObject.Open 

Answer: ABD 


Question No. 39

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service will be hosted in a Windows Service environment. 

You need to create a Windows Service class that instantiates a service host. 

Which code segment should you use? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Question No. 40

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

You add the following code segment to a service contract. 

[ServiceContract] 

interface IDocumentService 

[OperationContract] 

int DeleteDocument(int id); 

The DeleteDocument method in the service contract takes a long time to execute. 

The client application stops responding until the method finishes execution. 

You write the following code segment to create an instance of a service proxy in the client application. 

(Line numbers are included for reference only.) 

01 static void Main() 02 { 

03 DocumentServiceClient client= new DocumentServiceClient(); 

05 } 

06 static void ProcessDeleteDocument(IAsyncResult result) 

07 { 

06 ... 

09 } 

You need to ensure that the service methods are called asynchronously. 

What should you do? 

A. Insert the following code segment at line 04: 

client.BeginDeleteDocument(20, ProcessDeleteDocument, client); 

Insert the following code segment at line 06: 

int count=(result.AsyncState as Documentserviceclient).EndDeleteDocument(null); 

B. Insert the following code segment at line 04: 

client.BeginDeleteDocument(20, ProcessDeleteDocument, client); 

Insert the following code segment at line 06: 

result.AsyncWaitHandle.WaitOne(); 

int count=(result as Documentserviceclient).EndDeleteDocument(result) 

C. Insert the following code segment at line 04: 

client.BeginDeleteDocument(20, ProcessDeleteDocument, client); 

Insert the following code segment at line 06: 

int count=(result.AsyncState as Documentserviceclient).EndDeleteDocument(result); 

D. Insert the following code segment at line 04: 

IAsyncresult result = client.BeginDeleteDocument(20, ProcessDeleteDocument, client); 

int count=client.EndDeleteDocument(result); 

Insert the following code segment at line 06: 

result.AsyncWaitHandle.WaitOne(); 

Answer:


Question No. 41

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You create the following service contract. 

[ServiceContract] 

public interface IMath 

[OperationContract] 

int Add(int num1, int num2); 

You need to add an operation contract to perform the Add operation asynchronously. Which operation contract should you use? 

A. [OperationContract(AsyncPattern=true)]IAsyncResult BeginAdd(int num1, int num2);int EndAdd (IAsyncResult res); 

B. [OperationContract]int BeginAdd(int num1, int num2, AsyncCallback cb, object state);IAsyncResult EndAdd (); 

C. [OperationContract]IAsyncResult BeginAdd(int num1, int num2);[OperationContract]int EndAdd (IAsyncResult res); 

D. [OperationContract(AsyncPattern=true)]IAsyncResult BeginAdd(int num1, int num2, 

AsyncCallback cb, 

object state);int EndAdd(IAsyncResult res); 

Answer:


Question No. 42

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

You need to insert an additional header in a response message. 

What should you do? 

A. Implement the BeforeSendRequest method of the IClientMessagelnspector interface. 

B. Implement the BeforeSendReply method of the IDispatchMessagelnspector interface. 

C. Implement the AfterCall method of the IParameterlnspector interface. 

D. Implement the AfterReceiveRequest method of the IDispatchMessagelnspector interface. 

Answer:


Question No. 43

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment to define the service. (Line numbers are included for reference only.) 


You need to set the ServiceContract attribute for the transaction behavior of the service. Which code segment should you insert at line 01? 

A. <ServiceContract(SessionMode:=SessionMode.Required)> _ 

B. <ServiceContract(SessionMode:=SessionMode.Allowed)> _ 

C. <ServiceContract(SessionMode:=SessionMode.Allowed, _ ProtectionLevel:=ProtectionLevel.EncryptAndSign)> _ 

D. <ServiceContract(SessionMode:=SessionMode.NotAllowed, _ ProtectionLevel:=ProtectionLevel.EncryptAndSign)> _ 

Answer:


Question No. 44

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The application processes sales order documents. The application contains a component that retrieves the sales order documents from a FTP server and stores the data in a Microsoft SQL Server database. You need to ensure that the component meets the following requirements: 

Periodically polls the FTP server to check for new order documents Executes without dependencies on other software components Executes without user interaction Executes by using a specific security context Allows system administrators to change the security context by retaining the same component code. 

What should you do? 

A. Develop the component as a Web service. 

B. Develop the component as a Windows service. 

C. Develop the component as a Windows application. 

D. Develop the component as a Windows Communication Foundation service. 

Answer:


Question No. 45

You are creating a Windows Communication Foundation (WCF) client application by using Microsoft .NET Framework 3.5. You write the following binding configuration. (Line numbers are included for reference only.) 


You need to ensure that the client application can receive string values that contain a maximum of 5,000 characters. 

Which configuration settings should you insert at line 04? 

A. <readerQuotas maxStringContentLength="40000" /> 

B. <readerQuotas maxStringContentLength="10000" /> 

C. <readerQuotas maxStringContentLength="20000" /> 

D. <readerQuotas maxStringContentLength="5000" /> 

Answer: