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)
2015 Timesaving Comprehensive Guides For Microsoft 70-513 Exam: Using Latst Released Braindump2go 70-513 Practice Tests Questions, Quickly Pass 70-513 Exam 100%! Following Questions and Answers are all the New Published By Microsoft Official Exam Center!
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 321
A Windows Communication Foundation (WCF) service uses the following service contract.
[ServiceContract]
public interface IService
{
[OperationContract]
string Operation1(string s);
}
You need to ensure that the operation contract Operation1 responds to HTTP POST requests.
Which code segment should you use?
A. [OperationContract]
[WebInvoke(Method=”POST”)]
string Operation1(string s);
B. [OperationContract]
[WebGet(UriTemplate=”POST”)]
string Operation1(string s);
C. [OperationContract(ReplyAction=”POST”)]
string Operation1(string s);
D. [OperationContract(Action=”POST”)]
string Operation1(string s);
Answer: A
QUESTION 322
A Windows Communication Foundation (WCF) service exposes two operations: OpA and OpB OpA needs to execute under the client’s identity, and OpB needs to execute under the service’s identity.
You need to configure the service to run the operations under the correct identity
What should you do?
A. Set the ImpersonateCallerForAllOperations property of the service’s
ServiceAuthorizationBehavior to true.
Apply an OperationBehavior attribute to OpA and set the Impersonation property to
ImpersonationOption Required
Apply an OperationBehavior attribute to OpB and set the Impersonation property to
ImpersonationOptionAulowed.
B. Set the ImpersonateCallerForAllOperations property of the service’s
ServiceAuthorizationBehavior to true.
Apply an OperationBehavior attribute to OpA and set the Impersonation property to
ImpersonationOption.Allowed
Apply an OperationBehavior attribute to OpB and set the Impersonation property to
ImpersonationOption
NotAllowed
C. Set the ImpersonateCallerForAllOperations property of the service’s
ServiceAuthorizationBehavior to false.
Apply an OperationBehavior attribute to OpA and set the Impersonation property to
ImpersonationOptionAllowed.
Apply an OperationBehavior attribute to OpB and set the Impersonation property to
ImpersonationOptionNotAllowed
D. Set the ImpersonateCallerForAllOperations property of the service’s
ServiceAuthorizationBehavior to false.
Apply an OperationBehavior attribute to OpA and set the Impersonation property to
lmpersonationOption.Required.
Apply an OperationBehavior attribute to OpB and set the Impersonation property to
ImpersonationOption.Allowed.
Answer: D
QUESTION 323
You are creating a Windows Communication Foundation (WCF) service that accepts claims based tokens.
You need to ensure that the service can use claims from trading partners even though there are variations on naming for the same elements.
Which two actions should you perform? (Each correct answer presents part of the solution Choose two.)
A. Register a custom Service Authorization Manager that implements Check Access
In this method, use System. Convert. Change Type to transform the incoming claim set to a
Windows Claim Set type.
B. Apply a Principal Permission attribute on the operation with the required claims listed in the
Roles property.
C. Within the operation, verify the presence of the required claims in the current Authorization
Context
D. Register an Authorization Policy that maps external claims to an internal Claim Set.
Answer: CD
QUESTION 324
You are using Windows Communication Foundation (WCF) to create a service.
You need to implement a custom message-level security binding element.
Which binding element should you use?
A. TransportSecurityBindingElement
B. HttpsTransportBindingElement
C. SslStreamSecuntyBindingElement
D. WindowsStreamSecurityBindingElement
Answer: A
QUESTION 325
The following is an example of a SOAP envelope.
<s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope”>
<s:Header>
<h:StoreId xmlns:h=”http://www.contoso.com”>6495</h:StoreId>
</s:Header>
<s:Body>
<CheckStockRequest xmlns=”http://www.contoso.com”>
<ItemId>2469<ItemId>
</CheckStockRequest>
</s: Body>
</s:Envelope>
You need to create a message contract that generates the SOAP envelope.
Which code segment should you use?
A. [MessageContract(WrapperName=”http://www.contoso.com”)]
public class CheckStockRequest
{
[MessageHeader(Namespace=”http://www.contoso.com”)]
public int StoreId { get; set; }
[MessageBodyMember(Namespace=”http://www.contoso.com”)]
public int ItemId { get; set; }
}
B. [MessageContract(WrapperNamespace=”http://www.contoso.com”)]
public class CheckStockRequest
{
[MessageHeader(Namespace=”http://www.contoso.com”)]
public int StoreId { get; set; }
[MessageBodyMember(Namespace=”http://www contoso.com”)]
public int ItemId { get; set; }
}
C. [MessageContract(WrapperNamespace=”http://www.contoso.com”)]
public class CheckStockRequest
{
[MessageHeader(Namespace=”http://www.contoso.com”)]
public int StoreId { get; set; }
public int ItemId { get; set; }
}
D. [MessageContract(WrapperNamespace=”http://www.contoso.com”)]
public class CheckStockRequest
{
[MessageHeader(Namespace=”http://www.contoso.com”)]
public int StoreId { get; set; }
[MessageBodyMember]
public int ItemId { get; set; }
}
Answer: B
QUESTION 326
A Windows Communication Foundation (WCF) service is hosted in Microsoft Internet Information Services (IIS).
You are preparing the configuration file for production deployment.
You need to set up tracing so that an administrator can adjust the System.ServiceModel trace level without causing the ASP.NET host application domain to restart.
You need to ensure that tracing is turned off by default.
What should you do?
A. Add the following element to the system.serviceModel configuration section:
<diagnostics wmiProviderEnabled=”true” />
Add the following element to the system.diagnostics configuration section:
<sources>
<source name=”System.ServiceModel” switchValue=”Off”>
<listeners>
<add initializeData=”app_tracelog.svclog”
type=”System.Diagnostics.XmlWriterTraceListener”
name=”ServiceModelTraceListener”
traceOutputOptions=”Timestamp”/>
</listeners>
</source>
</sources>
B. Add the following element to the system.serviceModel configuration section:
<diagnostics etwProviderId=”{7799e76e-0f8b-407a-a616-3f91ba6072b9}”>
Add the following element to the system.diagnostics configuration section:
<sources>
<source name=”System.ServiceModel” switchValue=”Off”>
<listeners>
<add initializeData=”app_tracelog.svclog”
type=”System.Diagnostics.XmlWriterTraceListener”
name=”ServiceModelTraceListener”
traceOutputOptions=”Timestamp”/>
</listeners>
</source>
</sources>
C. Add the following element to the system.serviceModel configuration section:
<serviceBehaviors>
<behavior>
<serviceDebug/>
</behavior>
</serviceBehaviors>
Add the following element to the system.diagnostics configuration section:
<sources>
<source name=”System.ServiceModel” switchValue=”ActivityTracing”>
<listeners>
<add initializeData=”app_tracelog.svclog”
type=”System.Diagnostics.XmlWriterTraceListener”
name=”ServiceModelTraceListener”
traceOutputOptions=”Timestamp”/>
</listeners>
</source>
</sources>
D. Add the following element to the system.serviceModel configuration section:
<serviceBehaviors>
<behavior>
<serviceDebug/>
</behavior>
</serviceBehaviors>
Add the following element to the system.diagnostics configuration section:
<sources>
<source name=”System.ServiceModel” switchValue=”Off”>
<listeners>
<add initializeData=”app_tracelog.svclog”
type=”System.Diagnostics.XmlWriterTraceListener”
name=”ServiceModelTraceListener”
traceOutputOptions=”Timestamp”/>
</listeners>
</source>
</sources>
Answer: A
QUESTION 327
A Windows Communication Foundation (WCF) service implements the following contract.
[ServiceContract]
public interface IHelloService
{
[OperationContract(WebGet(UriTemplate=”hello?name={name}”))]
string SayHello(string name);
}
The implementation is as follows:
public class HelloService: IHelloService
{
public string SayHello(string name)
{
return “Hello ” + name;
}
}
The service is self-hosted, and the hosting code is as follows:
WebServiceHost svcHost = CreateHost();
svcHost.Open();
Console.ReadLine();
svcHost.Close();
You need to implement CreateHost so that the service has a single endpoint hosted at http://localhost:8000/HelloService.
Which code segment should you use?
A. WebServiceHost svcHost = new WebServiceHost(typeof(HelloService));
svcHost.AddServiceEndpoint(typeof(IHelloService),
new WebHttpBinding(WebHttpSecurityMode.None),
“http://localhost:8000/HelloService”);
return svcHost;
B. Uri baseAddress = new Uri(“http://localhost:8000″);
WebServiceHost svcHost = new WebServiceHost(typeof(HelloService),
baseAddress);
svcHost.AddServiceEndpoint(typeof(IHelloService),
new WebHttpBinding(WebHttpSecurityMode.None),
“HelloService”);
return svcHost;
C. WebServiceHost svcHost = new WebServiceHost(new HelloService());
svcHost.AddServiceEndpoint(typeof(IHelloService),
new WebHttpBinding(WebHttpSecurityMode.None),
“http://localhost:8000/HelloService”);
retumn svcHost
D. Uri baseAddress = new Uri(“http://localhost:8000/”);
WebServiceHost svcHost = new WebServiceHost(new HelloService(),
baseAddress);
svcHost.AddServiceEndpoint(typeof(IHelloService),
new WebHttpBinding(WebHttpSecurityMode.None),
“HelloService”);
retumn svcHost;
Answer: A
QUESTION 328
A Windows Communication Foundation (WCF) solution exposes the following contract over an HTTP connection.
[ServiceContract]
public interface IDataService
{
[OperationContract]
string GetData();
}
Existing clients are making blocking calls to GetData. Calls to GetData take five seconds to complete.
You need to allow new clients to issue non-blocking calls to get the data, without breaking any existing clients.
What should you do?
A. Replace the service interface with the following interface and implement the new methods.
[ServiceContract]
public interface IDoSomething
{
[OperationContract]
string DoLongOperation();
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginDoLongOperation();
[OperationContract(AsyncPattern = true)]
string EndDoLongOperation(IAsyncResult result);
}
B. Replace the service interface with the following interface and implement the new methods.
[ServiceContract]
public interface IDoSomething
{
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginDoLongOperation();
[OperationContract(AsyncPattern = true)]
string EndDoLongOperation(IAsyncResult result);
}
C. Generate a proxy class with asynchronous methods and use it for the new clients.
D. Add a new endpoint to the service that uses a full-duplex binding and use it for the new
clients.
Answer: C
QUESTION 329
You are consuming a Windows Communication Foundation (WCF) service in an ASP. NET Web application.
The service interface is defined as follows:
[ServiceContract]
public interface ICatalog
{
[OperationContract]
[WebGet(UriTemplate=”/Catalog/Items/{id}”, ResponseFormat=WebMessageFormat.Json)]
string RetrieveItemDescription(int id);
}
The service is hosted at Catalogsvc.
You need to call the service using jQuery to retrieve the description of an item as indicated by a variable named itemId.
Which code segment should you use?
A. $get(String.format(“/Catalogsvc/Catalog/Items/id{0}”, itemId) null,
function (data) {
…
}, javascript”);
B. $get(String.format(“/Catalogsvc/Catalog/Items/{0}”, itemId), null,
function (data) {
…
}, “json”);
C. $get(String.format(“/Catalogsvc/Catalog/Items/{0}”, itemld), null,
function (data) {
…
}, “xml”);
D. $get(String.format(“/Catalogsvc/Catalog/Items/id{0}”, itemld), null,
function (data) {
…
}, “json”);
Answer: B
QUESTION 330
You works as Windows Application Developer for Lead2pass.com.
The company uses Visual Studio .NET Framework 4.0 as its application development platform. You has been given a task to create a WCF Service based on Framework 4.0.
You is required to add the following code segment: (Line numbers are included for reference only.)
01 [ServiceContract(SessionMode=SessionMode.Required)]
02 public interface IInventoryManager
03 {
05 void CloseOrder();
06 }
You needs to decorate and manage the operation as the method that closes the current session method.
Which of the following code statements should you insert at line number 04 to accomplish the task?
A. [OperationContract(IsTerminating=true)]
B. [OperationContract(IsTerminating=false)]
C. [OperationContract(IsInitiating=true)]
D. [OperationContract(IsInitiating=false)]
Answer: A
Braindump2go New Released 70-513 Dumps PDF are Now For Free Download, 341 Latest Questions, Download It Right Now and Pass Your Exam 100%:
FREE DOWNLOAD: NEW UPDATED 70-513 PDF Dumps & 70-513 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-513.html (341 Q&A)