PrepAway - Latest Free Exam Questions & Answers

Category: 70-503

Exam 70-503: TS: Microsoft .NET Framework 3.5 – Windows Communication Foundation Application Development

Which code fragment should you insert at line 03?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code fragment for the configuration setting.
(Line numbers are included for reference only.)

01 <wsHttpBinding>
02 <binding name="simple">
03
04 </binding>
05 </wsHttpBinding>

You need to ensure that the service uses transport security and allows access to anonymous client applications.
Which code fragment should you insert at line 03?

Which code segment should you insert at line 07?

You are creating a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5.
The WCF service must authenticate the client applications by validating credit card numbers and expiry dates.
You write the following code segment.
(Line numbers are included for reference only.)

01 class CreditCardTokenAuthenticator: SecurityTokenAuthenticator
02 {
03 // Implementation of other abstract methods comes here.
04 protected override ReadOnlyCollection<IAuthorizationPolicy> ValidateTokenCore(SecurityToken token)
05 {
06 CreditCardToken creditCardToken = token as CreditCardToken;
07 }
08
09 private bool IsCardValid(string cardNumber, 13 DateTime expirationDate)
10 {
11 // Validation code comes here.
12 }
13 }

You need to implement custom authentication for the WCF service. Which code segment should you insert at line 07?

Which code segment should you insert at line 07?

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

01 [ServiceContract]
02 public interface IMyService
03 {
04 [OperationContract]
05 void MyMethod();
06 }
07
06 public class serviceImpl:IMyService
09 {
10 [OperationBehavior(TransactionScopeRequired=true)]
11 public void MyMethod(){ }
12}

You need to ensure that concurrent calls are allowed on the service instance.
Which code segment should you insert at line 07?

Which code segment should you insert at line 04?

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

01 [ServiceContract(SessionMode=SessionMode.Required)]
02 public interface IOrderManager
03 {
04
05 void CloseOrder();
06 }

You need to decorate the operation as the method that closes the current session.
Which code segment should you insert at line 04?

Which code segment should you insert at line 05?

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

01 [ServiceContract]
02 public class MyService
03 {
04 [OperationContract]
05
06 public void MyMethod()
07 {
08 …
09 }
10 }

The service uses a transactional binding. The TransactionFlow property for the binding is set to true
You need to ensure that the MyMethod method meets the following requirements:
The method uses a client-side transaction if a client-side transaction exists.
The method uses a server-side transaction if a client-side transaction does not exist.
Which code segment should you insert at line 05?

Which code segment should you use?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The service contains the following code segment.

[DataContract]
public class Person{ }
[DataContract]
public class Customer: Person{ }

You need to create a service contract that meets the following requirements:
The service contract must have an operation contract named GetPerson that returns an object of Type Person.
The GetPerson operation must be able to return an object of Type Customer.
Which code segment should you use?

Which attribute should you insert?

You create a client application by using Microsoft .NET Framework 3.5.
The client application consumes a Windows Communication Foundation service that uses the netMsmqBinding binding.
The binding uses a private transactional queue named Library. The following code fragment is part of the application configuration file
(Line numbers are included for reference only.)
<endpoint binding="netMsmqBinding" contract="serviceReference.ILibrary" />
You need to specify the address of the endpoint.
Which attribute should you insert?


Page 9 of 11« First...7891011