MICROSOFT NEWS: 70-513 Exam Questions has been Updated Today! Get Latest 70-513 VCE and 70-513 PDF Instantly! Welcome to Download the Newest Braindump2go 70-513 VCE&70-513 PDF Dumps: http://www.braindump2go.com/70-513.html (341 Q&As)
We never believe in second chances and Braindump2go brings you the best 70-513 Exam Preparation Materials which will make you pass in the first attempt.We guarantee all questions and answers in our 70-513 Dumps are the latest released,we check all exam dumps questions from time to time according to Microsoft Official Center, in order to guarantee you can read the latest questions!
Exam Code: 70-513
Exam Name: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Corresponding Certifications: MCPD, MCPD: Web Developer 4, MCPD: Windows Developer 4, MCTS, MCTS: Microsoft .NET Framework 4, Service Communication Applications
70-513 Dumps PDF,70-513 eBook,70-513 VCE,70-513 PDF,70-513 Latest Dumps,70-513 Certification,70-513 Training Kit PDF,70-513 Braindump,70-513 Exam Dumps,70-513 Exam Book,70-513 Exam PDF,70-513 Exam Book,70-513 Exam Preparation,70-513 Dumps VCE,70-513 Practice Test,70-513 Pracrice Exam,70-513 Preparation Book
QUESTION 61
You are creating a Windows Communication Foundation (WCF) service.
You do not want to expose the internal implementation at the service layer.
You need to expose the following class as a service named Arithmetic with an operation named Sum:
public class Calculator
{
public int Add(int x, int y)
{
}
}
Which code segment should you use?
A. [ServiceContract(Namespace=”Arithmetic”)]
public class Calculator
{
[Operation Contract(Action=”Sum”)]
public int Add(int x, int y)
{}
}
B. [ServiceContract(ConfigurationName=”Arithmetic”)]
public class Calculator
{
[Operation Contract(Action=”Sum”)]
public int Add(int x, int y)
{}
}
C. [ServiceContract(Name=”Arithmetic”)]
public class Calculator
{
[OperationContract(Name=”Sum”)]
public int Add(int x, int y)
{}
}
D. [ServiceContract(Name=”Arithmetic”)]
public class Calculator
{
[OperationContract(ReplyAction=”Sum”)]
public int Add(int x, int y)
{}
}
Answer: C
QUESTION 62
You develop a Windows Communication Foundation (WCF) service.
Many client applications will consume the service.
You have the following requirements:
– You must enable client sessions on the service.
– The service must support multi-threaded operations.
– If a client application uses sessions, the lifetime of the service instance must be scoped to the lifetime of the session.
– If a client application does not use sessions, the lifetime of the service must be scoped to the lifetime of a method cal
You need to configure the service.
What should you do? (Each correct answer presents part of the solution. Choose three.)
A. In the ServiceContract attribute, set the value of the InstanceContextMode property to
InstanceContextMode.PerSession.
B. In the ServiceContract attribute, set the value of the SessionMode property to
SessionMode.Allowed.
C. In the ServiceBehavior attribute, set the value of the InstanceContextMode property to
InstanceContextMode. PerSession.
D. In the ServiceContract attribute, set the value of the ConcurrencyMode property to
ConcurrencyMode.Multiple
E. In the ServiceBehavior attribute, set the value of the ConcurrencyMode property to
ConcurrencyMode.Multiple
F. In the ServiceBehavior attribute, set the value of the SessionMode property to
SessionMode.Allowed.
Answer: BCE
Explanation:
B (not F): Service ContractAttribute.SessionMode Property
Gets or sets whether sessions are allowed, not allowed or required.
C (not A):
– ServiceBehaviorAttribute Class
ecifies the internal execution behavior of a service contract implementation.
– ServiceBehaviorAttribute.InstanceContextMode Property
Gets or sets the value that indicates when new service objects are created.
One of the InstanceContextMode values; the default value is PerSession.
E (not D): ServiceBehaviorAttribute.ConcurrencyMode Property
Gets or sets whether a service supports one thread, multiple threads, or reentrant calls.
Note:
Example:
[ServiceContract(
Namespace=”http://microsoft.wcf.documentation”,
SessionMode=SessionMode.Required
)]
[ServiceBehavior(
ConcurrencyMode=ConcurrencyMode.Single,
InstanceContextMode=InstanceContextMode.PerSession,
ReleaseServiceInstanceOnTransactionComplete=true
)]
QUESTION 63
You are developing a Windows Communication Foundation (WCF) service that contains the following service contract.
You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object.
What should you do?
A. Add the following KnownType attribute to the Employee class and to the Customer class.
[KnownType(GetType(Person))]
B. Implement the IExtensibleDataObject interface in the Person class.
C. Implement the IExtension(ofType(T)) interface in the Person class.
D. Add the following KnownType attributes to the Person class.
[KnownType(GetType(Employee))]
[KnownType(GetType(Customer))]
Answer: D
QUESTION 64
A Windows Communication Foundation (WCF) solution uses the following contracts. (Line numbers are included for reference only.)
01 [ServiceContract(CallbackContract=typeof(INameService))]
02 public interface IGreetingService
03 {
04 [OperationContract]
05 string GetMessage();
06 }
07
08 [ServiceContract]
09 public interface INameService
10 {
11 [OperationContract]
12 string GetName();
13 }
When the client calls GetMessage on the service interface, the service calls GetName on the client callback.
In the client, the class NameService implements the callback contract.
The client channel is created as follows:
22 InstanceContext callbackContext =
new InstanceContext(new NameService(“client”));
23 …
24 …
25 DuplexChannelFactory<IGreetingService> factory =
new DuplexChannelFactory<IGreetingService>(
typeof(NameService), binding, address);
26 IGreetingService greetingService = factory.CreateChannel();
You need to ensure that the service callback is processed by the instance of NameService.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Change line 25 to the following code segment:
DuplexChannelFactory<IGreetingService> factory =
new DuplexChannelFactory<IGreetingService>
(callbackContext, binding, address);
B. Change line 26 to the following code segment:
IGreetingService greetingServicefactory =
CreateChannel(callbackContext);
C. Add the following code segment after line 26:
callbackContext.IncomingChannels.
Add((IDuplexChannel)greetingService);
D. Add the following code segment after line 26:
callbackContext.OutgoingChannels.
Add((IDuplexChannel)greetingService);
Answer: AB
QUESTION 65
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?
A. This issue occurred in the ServiceHost during ServiceHost.Open().
Enable WMI by adding the following configuration to the system.serviceModel configuration
section in the application configuration file
<diagnostics wmiProviderEnabled=”true”/>
Restart the application and inspect the endpoints visible through WMI.
B. This issue occurred in the ServiceHost during ServiceHost.Open().
Compare the security settings for any endpoints that use an MSMQ transport to the security
configuration of the MSMQ queue used by the endpoint.
C. This issue occurred at the ServiceHost when receiving a message.
Compare the security configurations on the client and server to make sure that they are
compatible.
D. This issue occurred at the ServiceHost when accepting an initial set of messages from
MSMQ.
Log all messages sent between the client and the sever.
Answer: B
QUESTION 66
You are creating an ASP.NET web application that hosts several Windows Communication Foundation (WCF) services.
The services have ASP.NET Compatibility Mode enabled.
Users authenticate with the Web application by using a cookie-based ASP.NET Forms Authentication model.
You add a service file named Authentication.svc that contains the following code segment:
<%@ ServiceHost Service=”System.Web.ApplicationServices.AuthenticationService” Factory=”System.Web.ApplicationServices.ApplicationServicesHostFactory” %>
You need to ensure that users can access the WCF services without having to re-authenticate.
Which two configuration settings should you add? (Each is part of a complete solution. Choose two.)
A. In the system web. Extensions scripting/webServices/authenticationService element, set
the enabled attribute to true.
B. In the system web. Extensions scripting/webServices/profileService element, set the
enabled attribute to true.
C. Add a service endpoint with basicHttpBinding for the contract
System.Web.ApplicationServices.AuthenticationService.
D. Add a custom service behavior named AuthenticationService Type Behaviors with a
service AuthenticationManager element that has service AuthenticationManagerType set to
System.Web.Security.SQL Membership Provider
Answer: AC
QUESTION 67
You are developing a Windows Communication Foundation (WCF) service.
You must record all available information for the first 1,000 messages processed, even if they are malformed.
You need to configure the message logging section of the configuration file.
Which configuration segment should you use?
A. <messageLogging logEntireMessage=”true”
logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″/>
B. <messageLogging logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″/>
C. <messageLogging logEntireMessage=”false”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”1000″/>
D. <messageLogging logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”1000″/>
Answer: A
QUESTION 68
You are consuming a Windows Communication Foundation (WCF) service.
The service interface is defined as follows:
[DataContract(Namespace = ”]
public class Item
{
}
[ServiceContract(Namespace = ”)]
public interface Catalog
{
[OperationContract]
[WebInvoke(Method=”POST”, UriTemplate=”{Item}”)]
Item UpdateItem(Item item);
}
The client application receives a WebResponse named response with the response from the service.
You need to deserialize this response into a strongly typed object representing the return value of the method.
Which code segment should you use?
A. DataContractSerializer s = new DataContractSerializer(typeof(Item));
Item item = s.ReadObject(response.GetResponseStream()) as Item;
B. BinaryFormatter f = new BinaryFormatter();
Item item = f.Deserialize(response.GetResponseStream() as Item;
C. XmlDictionaryReader r = JsonReaderWriterFactory.CreateJsonReader(
response.GetResponseStream(),
XmlDictionaryReaderQuotas.Max);
DataContractSerializer s = new DataContractSerializer(typeof(Item));
Item item = s.ReadObject(r) as Item;
D. DataContractJsonSerializer s = new DataContractJsonSerializer
(typeof(Item));
Item item = s.ReadObject(response.GetResponseStream()) as Item;
Answer: A
QUESTION 69
You are developing a Windows Communication Foundation (WCF) service that contains the following operation contract.
[OperationContract]
CustomerNames GetCustomerNames();
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. [MessageContract(IsWrapped = false)]
public class CustomerNames
{
[MessageBodyMember]
public string[] Names;
}
B. [MessageContract(WrapperName = “”)]
public class CustomerNames
{
[MessageBodyMember]
public string[] Names;
}
C. [DataContract]
public class CustomerNames
{
[DataMember]
public string[] Names;
}
D. [DataContract]
public class CustomerNames
{
[DataMember(IsRequired = false)]
public string[] Names;
}
Answer: A
QUESTION 70
You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms application.
The ServiceHost instance is created in the Form constructor.
You need to ensure that the service is not blocked while the UI thread is busy.
What should you do?
A. Decorate the service implementation class with the following line of code
[ServiceBehavior(UseSyncronizationContext = false)]
B. Decorate the service implementation class with the following line of code
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
C. Call the Invoke method of the form and supply a delegate.
D. Call the BeginInvoke method of the form and supply a delegate.
Answer: A
Braindump2go New Published Exam Dumps: Microsoft 70-513 Practice Tests Questions, 341 Latest Questions and Answers from Official Exam Centre Guarantee You a 100% Pass! Free Download Instantly!
FREE DOWNLOAD: NEW UPDATED 70-513 PDF Dumps & 70-513 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-513.html (341 Q&A)