PrepAway - Latest Free Exam Questions & Answers

Tag: 70-503

Which code segment should you insert at line 02?

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

01 [ServiceContract]
02
03 public class MyService
04 {
05 …
06 }

The service uses transactions that time out in a minute.
You need to increase the timeout interval of the transactions to 2 minutes and 30 seconds
Which code segment should you insert at line 02?

Which service implementation should you use?

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

[ServiceContract(CallbackContract=typeOf(MyServiceCallback))]
public interface IMyService
{
[OperationContract]
void MyMethod();
}
[ServiceContract]
public interface IMyServiceCallback
{
[OperationContract]
void CallbackMethod();
}

The implementation of the MyMethod operation must call back the CallbackMethod operation.
You need to ensure that the service meets the following requirements:
The CallbackMethod operation is able to call the service.
The service instance is thread-safe.
Which service implementation should you use?

Which four tasks should you perform?

You are creating a client application that will call a Windows Communication Foundation service.
The service was created by using Microsoft .NET Framework 3.5.
You write the following code segment.

[DataContract]
public class CreditCard
{
[DataMember]
public string Name{ get; set; }
[DataMember]
public string CardNumber
{
get{ return cardNumber; }
set {
if (IIsValidCreditCardNumber(value))
throw new ArgumentException("Invalid credit card number");
cardNumber = value;
}
}
}

You plan to share the validation logic between the client application and the WCF service.
You need to generate a client-side service proxy that includes the validation logic.
Which four tasks should you perform?
(Each correct answer presents part of the solution. Choose four.)

Which code segment should you insert at line 06?

You are creating 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(Namespace="http://uri.contoso.com )]
02 public interface IMyService
03 {
04 [OperationContract]
05 string ProcessDetails(string s);
06 [OperationContract(Action="UpdateStatus")]
07 void UpdateStatus();
08 …
09 }

If the existing operation contract is unable to process a request made to the service a generic operation contract must attempt to process the request.
You need to create the generic operation contract.
Which code segment should you insert at line 06?

Which code segment should you insert at line 03?

You are creating a remote database management application by using Microsoft Windows Forms and Microsoft .NET Framework 3.5
You use the Windows Communication Foundation model to create the application.
You write the following code segment.
(Line numbers are included for reference only.)

01 public class QueryAnalyzerService : IQueryAnalyzerService, IDisposable
02 {
03
04 public void Open(){ }
05 public void ExecuteSql(string sql){ }
06 public void Close(){ }
07 public void Dispose(){ }
06 }

You need to ensure that each time a client application calls the Open() method, a new service instance is created.
Which code segment should you insert at line 03?


Page 8 of 11« First...678910...Last »