2014 Latest Pass4sure&Lead2pass Microsoft 70-513 Dumps (91-100)

QUESTION 91
You develop a Windows Communication Foundation (WCF) service. You name the service MovieService in the Movie namespace.
The service is hosted in Microsoft Internet Information Services (IIS). You copy the assembly containing the service to the bin folder in the virtual directory path.
You need to set up the URI that is mapped to the service. What should you do?

A.    Add the following code segment to the web.config file.
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress=”./Movie” service=”Movie.MovieService” />
</serviceActivations>
</serviceHostingEnvironment>
B.    Add a Movie.svc file in the root of the virtual path with the following line.
<% @ServiceHost language=”C#” Service=”MovieService”>
C.    Add the following code segment to the web.config file.
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress=”./Movie.svc” service=”Movie.MovieService” />
</serviceActivations>
</serviceHostingEnvirornnent>
D.    Add a Movie.svc file in the root of the virtual path with the following line.
<% @ServiceHost language=”C#” Service=”MovieService.svc” %>

Answer: B

QUESTION 92
You are developing a Windows Communication Foundation (WCF) service.
You need to enable security auditing for all events. What should you do?

A.    Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel
setting to Success.
B.    Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.
C.    Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the
messageAuthenticationAuditLevel setting to SuccessAndFailure.
D.    Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation
setting to Security.

Answer: C

QUESTION 93
You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog.
The following code segment defines the service contract. (Line numbers are included for reference only.)
01  [ServiceContract()]
02  [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
03  public Class LibraryService
04  {
05     public Book GetBookByTitle(string title)
06     {
07        …
08     }
09
10     [WebGet(UriTemplate = “Book/{id}”)]
11     public Book GetBookById(string id)
12     {
13        …
14     }
15   }
Library patrons want the ability to search the catalog by title.
You need to ensure that the GetBookByTitle method is exposed as a service method.
Which code segment should you insert at line 04?

A.    [WebGet(UriTemplate = “Book/{title}”)]
B.    [WebGet(UriTemplate = “BookByTitle/{title}”)]
C.    [WebGet(UriTemplate = “Book/{titleToSearch}”)]
D.    [WebGet(UriTemplate = “{titleToSearch}”)]

Answer: B

QUESTION 94
You are creating an application using Visual Studio 2010. The application consumes a Windows Communication Foundation (WCF) service.
You are adding a service reference to the WCF service. You need to ensure that the generated proxy does not block the calling thread when executing a service method. What should you do when adding the service reference?

A.    Set the Collection type to ObservableCollection.
B.    Select the Reuse types in all referenced assemblies option.
C.    Select the Generate asynchronous operations option.
D.    Select the Always generate message contracts option.

Answer: C

QUESTION 95
You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured.
You need to ensure that the service meets the following requirements:
The service now must be exposed as an Internet application.
The service must be secured at the transport level.
Impersonation and delegation cannot be enabled.
What should you use?

A.    basicHttpBinding and HTTP
B.    basicHttpBinding and Kerberos
C.    wsHttpBinding and Kerberos
D.    wsHttpBinding and HTTPS

Answer: D

QUESTION 96
You are creating a Windows Communication Foundation (WCF) service that is implemented as follows.(Line numbers are included for reference only.)
01 [ServiceContract]
02 [ServiceBehavior(IncludeExceptionDetailsInFaults = true)]
03 public class OrderService
04 {
05     [OperationContract]
06     public void SubmitOrder(Order anOrder)
07     {
08         try
09         {
10             …
11         }
12         catch(DivideByZeroException ex)
13         {
14             …
15         }
16     }
17 }
You need to ensure that the stack trace details of the exception are not included in the error information sent to the client.
What should you do?

A.    Replace line 14 with the following line:
throw;
B.    Replace line 14 with the following line:
throw new FaultException<Order>(anOrder, ex.ToString());
C.    After line 05, add the following line:
[FaultContract(typeof(FaultException<Order>))]
Replace line 14 with the following line:
throw ex;
D.    Alter line 05, add the following line:
[FaultContract(typeof(FaultException<Order>))]
Replace line 14 with the following line:
throw new FaultException<Order>(anOrder, “Divide by zero exception”);

Answer: D

QUESTION 97
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 98
You are developing a data contract for a Windows Communication Foundation (WCF) service.
The data in the data contract must participate in round trips. Strict schema validity is not required.
You need to ensure that the contract is forward-compatible and allows new data members to be added to it.
Which interface should you implement in the data contract class?

A.    ICommunicationObject
B.    IExtension<T>
C.    IExtensibleObject<T>
D.    IExtensibleDataObject

Answer: D

QUESTION 99
A Windows Communication Foundation (WCF) application uses a data contract that has several data members.
You need the application to throw a SerializationException if any of the data members are not present when a serialized instance of the data contract is deserialized.
What should you do?

A.    Add the KnownType attribute to the data contract.
Set a default value in each of the data member declarations.
B.    Add the KnownType attribute to the data contract.
Set the Order property of each data member to unique integer value.
C.    Set the EmitDefaultValue property of each data member to false.
D.    Set the lsRequired property of each data member to true.

Answer: D

QUESTION 100
A Windows Communication Foundation (WCF) application uses the following data contract
[DataContract]
public class Person
{
[DataMember]
public string firstName;
[DataMember]
public string lastName;
[DataMember]
public int age;
[DataMember]
public int ID;
}
You need to ensure that the following XML segment is generated when the data contract is serialized.
<Person>
<firstName xsi:nil=”true”/>
<lastName xsi:nil=”true”/>
<ID>999999999<ID>
</Person>
Which code segment should you use?

A.    [DataMember]
public string firstName;
[DataMember]
public string lastName;
[DataMember(EmitDefaultValue = true)]
public int age = 0;
[DataMember(EmitDefaultvValue = true)]
public int ID = 999999999;
B.    [DataMember(EmitDefaultValue = false)]
public string firstName = null;
[DataMember(EmitDefaultValue = false)]
public string lastName = null;
[DataMember(EmitDefaultValue = true)]
public int age = -1;
[DataMember(EmitDefaultValue = false)]
public int ID = 999999999;
C.    [DataMember(EmitDefaultValue = true)]
public string firstName;
[DataMember(EmitDefaultValue = true)]
public string lastName;
[DataMember(EmitDefaultValue = false)]
public int age = -1;
[DataMember(EmitDefaultValue = false)]
public int ID = 999999999;
D.    [DataMember]
public string firstName = null;
[DataMember]
public string lastName = null;
[DataMember(EmitDefaultValue = false)]
public int age = 0;
[DataMember(EmitDefaultValue = false)]
public int ID = 999999999;

Answer: D

If you want to pass Microsoft 70-513 successfully, donot missing to read latest lead2pass Microsoft 70-513 practice exams.
If you can master all lead2pass questions you will able to pass 100% guaranteed.

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

         

Comments are closed.