web analytics
Skip to content

[Pass Ensure VCE Dumps] Download Free 70-513 Study Guide With VCE Dumps Collection (81-100)

New 70-513 Exam Questions Updated Today! PassLeader just released the latest Microsoft 70-513 pdf and vce exam dumps(Now Total 341q) with all new exam questions, which will help you 100% passing the newest 70-513 exam. This new questions are exactly the same as real test’s. Now visit passleader.com to get the newest 341q 70-513 pdf or vce exam dumps with 10% discount and FREE VCE TEST SOFTWARE!

keywords: 70-513 exam,341q 70-513 exam dumps,341q 70-513 exam questions,70-513 pdf dumps,70-513 practice test,70-513 vce dumps,70-513 study guide,70-513 braindumps,TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 Exam

QUESTION 81
You are modifying a Windows Communication Foundation (WCF) service that issues security tokens. The service is accessible through the named pipe protocol. No endpoints are added in the service code. The configuration file for the service is as follows. (Line numbers are included for reference only.) You need to ensure that new and existing client applications can access the service through HTTP and named pipes. What should you do?

A.    Insert the following at line 05:
<endPoint address=”http://www.contoso.com”
binding=”wsHttpBinding”
contract=”Contoso.TokenService” />
B.    Insert the following at line 05:
<endPoint address=”http://www.contoso.com”
binding=”basicHttpBinding”
contract=”Contoso.TokenService” />
C.    Insert the followin at line 08:
<add baseAddress=”http://www.contoso.com” />
D.    Insert the followin at line 08:
<add baseAddress=”http://www.contoso.com:8080″ />

Answer: C

QUESTION 82
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     void PutMessage(string message);
06     …
07     [OperationContract]
08     [FaultContract(typeof(TimeoutFaultException))]
09     [FaultContract(typeof(FaultException))]
10     string SearchMessages(string search);
11 }
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?

A.    Catch and handle both TimeoutFaultException and FaultException.
B.    Catch both TimeoutFaultException and FaultException. Create a new channel in both cases.
C.    Catch and handle TimeoutFaultException. Catch FaultException and create a new channel.
D.    Catch and handle FaultException. Catch TimeoutFaultException and create a new channel.

Answer: C

QUESTION 83
You are developing a Windows Communication Foundation (WCF) service. Client applications require reliable sessions to access the service. Users report that they receive ServerTooBusyException errors when their client application tries to establish a session. You need to ensure that the service can handle a minimum of 30 client connection requests. Which ReliableSessionBindingElement property should you configure?

A.    MaxRetryCount
B.    MaxTransferWindowSize
C.    MaxPendingChannels
D.    InactivityTimeout

Answer: C

QUESTION 84
You are creating a Windows Communication Foundation (WCF) service that responds using plain-old XML (POX). You have the following requirements:
– You must enable the /catalog.svc IItems operation to respond using the POX, JSON, or ATOM formats.
– You also must ensure that the same URL is used regardless of the result type.
– You must determine the response format by using the Accepts HTTP header.
What should you do?

A.    Implement the IChannelInitializer interface in the service class.
B.    Implement the System.Runtime.Serialization.IFormatterConverter interface in the service class.
C.    Set the BodyStyle parameter of the WebGet attribute on the operation to WebMessageBodyStyle.WrappedResponse.
D.    Set the retum type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format.

Answer: D

QUESTION 85
You are developing a Windows Communication Foundation (WCF) service. One of the service operations contains the following code:
private static int counter = 0;
[OperationContract]
public void IncrementCount()
[
counter++;
}
You need to set a service behavior that prevents two or more threads from incrementing the counter variable at the same time. Which code segment should you use to set the service behavior?

A.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
B.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]
C.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Hultiple)]
D.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Reentrant)]

Answer: A

QUESTION 86
You develop a Windows Communication Foundation (WCF) service that employees use to access bonus information. You define the following service contract. (Line numbers are included for reference only.)
01 [ServiceContract(SessionMode = SessionMode.Required)]
02 public interface IFinancialService
03 {
04   [OperationContract]
05   string Login(int employeeID, string passwordHash);
06
07   [OperationContract]
08   double GetBonus(int month);
09
10   [OperationContract(IsTerminating = true)]
11   void Logout();
12 }
Client application can invoke methods without logging in. You need to ensure that the client applications invoke Login before invoking any other method. You also need to ensure that client applications cannot consume the service after invoking Logout. Which two action should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Replace line 04 with the following code.
[OperationContract(IsInitiating = false)]
B.    Replace line 04 with the following code.
[OperationContract(IsInitiating = true, IsTerminating = true)]
C.    Replace line 07 with the following code.
[OperationContract(IsInitiating = false)]
D.    Replace line 10 with the following code.
[OperationContract(IsInitiating = false, IsTerminating = true)]

Answer: CD

QUESTION 87
Drag and Drop Question
You have a client application that consumes a Windows Communication Foundation (WCF) service. The service contains a class named RegistrationService. The RegistrationService class contains two methods named SubmitRegistration and GetRegistrations. The service has the following requirements:
– The client application must call the SubmitRegistration method synchronously.
– The client application must call the GetRegistrations method asynchronously.
You need to complete the client-side code to call the WCF service. Which six code segments should you use in sequence? (To answer, move the appropriate six code segments from the list of code segments to the answer area and arrange them in the correct order.)

Answer:

QUESTION 88
You are creating a Windows Communication Foundation (WCF) service based on WSHttpBinding. New audit requirements dictate that callers must be authenticated on every call to ensure that their credentials have not been revoked. You need to ensure that the service will not cache the security request token. What should you do?

A.    Apply a ServiceBehavior attribute to the service implementation class with the InstanceContextMode property set to Single.
B.    In the message security configuration, change clientCredentialType from IssuedToken to UserName.
C.    In the message security configuration, set establishSecurityContext to false.
D.    At the end of every operation, call the SessionStateUtility.RaiseSessionEnd method.

Answer: C

QUESTION 89
You develop a Windows Communication Foundation (WCF) service to generate reports. Client applications call the service to initiate report generation but do not wait for the reports to be generated. The service does not provide any status to the client applications. The service class is defined as follows. (Line numbers are included for reference only.) You need to ensure that client applications can initiate reports without waiting for status. Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)

A.    Insert the following code at line 04.
[OperationContract(IsOneWay=true)]
B.    Insert the following code at line 04.
[OperationContract(AsyncPattern=false)]
C.    At line 05, change the GenerateReports method from private to public.
D.    Remove line 08. At line 05, change the return type of GenerateReports method to void.

Answer: AD

QUESTION 90
You are developing a Windows Communication Foundation (WCF) service. The following code defines and implements the service. (Line numbers are included for reference only.) You need to ensure that two identical copies of the received message are created in the service. Which code segment should you insert at line 12?

A.    Message msgCopy = message.CreateBufferedCopy(8192) as Message;
Message returnMsg = message.CreateBufferedCopy(8192) as Message;
B.    MessageBuffer buffer = message.CreateBufferedCopy(8192);
Message msgCopy = buffer.CreateMessage();
Message returnMsg = buffer.CreateMessage();
C.    MessageBuffer buffer = message.CreateBufferedCopy(8192);
Message msgCopy = buffer.CreateMessage();
Message returnMsg = msgCopy;
D.    Message msgCopy = message;
Message returnMsg = message;

Answer: B


http://www.passleader.com/70-513.html

QUESTION 91
You are modifying a Windows Communication Foundation (WCF) service that provides access to report generation system. The following code segment is part of your service contract. (Line numbers are included for reference only.) Client applications are blocked while the service processes reports. You need to ensure that the service methods are asynchronous. What should you do?

A.    Insert the following code at line 04.
[OperationContract]
Insert the following code at line 07.
[OperationConcracc(AsyncPactern = true)]
B.    Insert the following code at line 04.
[OperationConcracc(AayncPaccern = true)]
C.    Insert the following code at line 04.
[OperotionConcroct(AsyncPactern = false)
Insert the following code at line 07.
[OperacionConcracc(AsyncPactern = true)]
D.    Insert the following code at line 04.
[OperationContract (AsyncPattern = false)]

Answer: B

QUESTION 92
You are developing a Windows Communication Foundation (WCF) service that contains the following code segment:
[ServiceContract]
public interface ICustomerService
{

}
public class CustomerService : ICustomerService
{

}
The service is self-hosted in a console application. Older client applications access the service at http://contoso.com:8080/CustomerService/V1. Newer client applications access the service at http://contoso.com:8080/CustomerService/V2. You need to ensure that any client application can access the service at either address. Which code segment should you use?

A.    Uri serviceAddress1 = new Uri(“http://contoso.com:8080/CustomerService/V1”);
Uri serviceAddress2 = new Uri(“http://contoso.com:8080/CustomerService/V2”);
ServiceHost host = new ServiceHost(typeof(ICustomerService), new Uri[]{ serviceAddress1, serviceAddress2 });
B.    Uri serviceAddress1 = new Uri(“http://contoso.com:8080/CustomerService/V1”);
Uri serviceAddress2 = new Uri(“http://contoso.com:8080/CustomerService/V2”);
ServiceHost host = new ServiceHost(typeof(CustomerService), new Uri[]{ serviceAddress1, serviceAddress2 });
C.    Uri serviceAddress = new Uri(“http://contoso.com:8080/”);
ServiceHost host = new ServiceHost(typeof(CustomerService), new Uri[]{ serviceAddress });
host.AddServiceEndpoint(typeof(ICustomerService), new BasicHttpBinding(), “CustomerService/V1”);
host.AddServiceEndpoint(typeof(ICustomerService), new BasicHttpBinding(), “CustomerService/V2”);
D.    Uri serviceAddress = new Uri(“http://contoso.com:8080/”);
ServiceHost host = new ServiceHost(typeof(ICustomerService), new Uri[] { serviceAddress });
host.AddServiceEndpoint(typeof(CustomerService), new BasicHttpBinding(), “CustomerService/V1”);
host.AddServiceEndpoint(typeof(CustomerService), new BasicHttpBinding(), “CustomerService/V2”);

Answer: C

QUESTION 93
You have a secured Windows Communication Foundation (WCF) service. You need to track unsuccessful attempts to access the service. What should you do?

A.    Set the authorizationManagerType attribute of the serviceAuthorization behavior to Message
B.    Set the includeExceptionDetailslnFaults attribute of the serviceDebug behavior to true
C.    Set the Mode attribute of the security configuration element to Message
D.    Set the messageAuthenticationAuditLevel attribute of the serviceSecurityAudit behavior to Failure

Answer: D

QUESTION 94
A Windows Communication Foundation (WCF) service is deployed with netTcpBinding. This service uses a duplex message exchange pattern. You are developing the next version of the WCF service. You discover that your company’s hardware load balancer performs correctly only for WCF services that use HTTP. You need to ensure that your service works with the load balancer. What should you do?

A.    Use basicHttpBinding.
B.    Create a custom binding that has the compositeDuplex, textMessageEncoding, and namedPipeTransport binding elements in this order.
C.    Create a custom binding that has the compositeDuplex, textMessageEncoding, and wsHttpTransport binding elements in this order.
D.    Use wsHttpBinding.

Answer: C

QUESTION 95
You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF). The client configuration is as follow.
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name=”SocialConfig”>
<security mode=”TransportCredentialOnly”>
<transport clientCredentialType=”Basic” realm=”Social API” />
</security>
</binding>
</webHttpBinding>
</bindings>
<client>
<endpoint address=”http://contoso.com” binding=”webHttpBinding”
bindingConfiguration=”SocialConfig”
contract=”ISocialStatus” name=”SocialClient” />
</client>
</system.serviceModel>
The service contract is defined as follows.
[ServiceContract]
public interface ISocialStatus
{
[OperationContract]
[WebInvoke(UriTemplate = “/statuses/update.xml?status={text}”)]
void UpdateStatus(string text);
}
Which code segment should you use to update the social status?

A.    using (WebChannelFactory<ISocialStatus> factory = new WebChannelFactory<ISocialStatus>(“SocialClient”))
{
factory.Credentials.UserName.UserName = user.Name;
factory.Credentials.UserName.Password = user.Password;
ISocialStatus socialChannel = factory.CreateChannel();
socialChannel.UpdateStatus(newStatus);
}
B.    using (ChannelFactory<ISocialStatus> factory = new WebChannelFactory<ISocialStatus>(typeof(ISocialStatus)))
{
factory.Credentials.UserName.UserName = user.Name;
factory.Credentials.UserName.Password = user.Password;
ISocialStatus socialChannel = factory.CreateChannel();
socialChannel.UpdateStatus(newStatus);
}
C.    using (ChannelFactory<ISocialStatus> factory = new ChannelFactory<ISocialStatus>(“POST”))
{
factory.Credentials.Windows.ClientCredential.UserName = user.Name;
factory.Credentials.Windows.ClientCredential.SecurePassword.
SetAt(0, Convert.ToChar(user.Password));
ISocialStatus socialChannel = factory.CreateChannel();
socialChannel.UpdateStatus(newStatus);
}
D.    using (WebChannelFactory<ISocialStatus> factory = new WebChannelFactory<ISocialStatus>(typeof(ISocialClient)))
{
factory.Credentials.Windows.ClientCredential.UserName = user.Name;
factory.Credentials.Windows.ClientCredential.SecurePassword.
SetAt(0, Convert.ToChar(user.Password));
ISocialStatus socialChannel = factory.CreateChannel();
socialChannel.UpdateStatus(newStatus);
}

Answer: A

QUESTION 96
You are modifying an existing Windows Communication Foundation (WCF) service that is defined as follows. SubmitOrder makes a call to another service. The ProcessMessage method does not perform as expected under a heavy load. You need to enable processing of multiple messages. New messages must only be processed when the ProcessMessage method is not processing requests, or when it is waiting for calls to SubmitOrder to return. Which attribute should you apply to the MessageProcessor class?

A.    CallbackBehavior ( ConcurrencyMode = ConcurrencyMode.Reentrant )
B.    CallbackBehavior ( ConcurrencyMode = ConcurrencyMode.Multiple )
C.    ServiceBehavior ( ConcurrencyMode = ConcurrencyMode.Reentrant )
D.    ServiceBehavior ( ConcurrencyMode = ConcurrencyMode.Multiple )

Answer: C

QUESTION 97
A WCF service code is implemented as follows. (Line numbers are included for reference only.)
01 [ServiceContract]
02 [ServiceBehavior(InstanceContextMode =
03 InstanceConcextMode.Single)]
04 public class CalculatorService
05 {
06 [OperacionContract]
07 public double Calculate(double opl, string op, double op2)
08 {

24 }
25 }
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.)

A.    Change the service behavior to the following:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple) ]
B.    Change the service behavior to the following:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall) ]
C.    Require the clients use threads, the Parallel Task Library, or other mechanism to issue service calls in parallel.
D.    Require the clients to use async operations when calling the service.

Answer: AB

QUESTION 98
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”);
03 …
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.    var channelFactory = new ChannelFactory<ITaxService>();
B.    var channelFactory = new ChannelFactory<ITaxService>(myBinding);
C.    var channelFactory = new ChannelFactory<ITaxService>(myBinding, myEndpointAddress);
D.    var channelFactory = new ChannelFactory<ITaxService>(“http://contoso.com/TaxService.svc”);

Answer: C

QUESTION 99
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?

A.    In the service configuration diagnostics section, set the value of the performancCounters property to All.
B.    Enable the Windows Management Instrumentation (WMI) provider.
C.    In the service configuration diagnostics section, set the value of the performanceCounters property to ServiceOnly.
D.    Enable message logging for the endpoint.

Answer: A

QUESTION 100
You are creating a Windows Communication Foundation (WCF) service. You need to ensure that the service is compatible with ASP.NET to make use of the session state. Which binding should you use?

A.    NetTcpContextBinding
B.    BasicHttpContextBinding
C.    NetTcpBinding
D.    NetMsmqBinding

Answer: B


http://www.passleader.com/70-513.html

Comments are closed, but trackbacks and pingbacks are open.