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 two bindings should you use?
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5
You need to host the service in a medium trust environment on a Web server.
Which two bindings should you use?
(Each correct answer presents a complete solution. Choose two.)
Which binding should you use?
You are creating a Windows Communication Foundation (WCF) client application by using Microsoft .NET Framework 3.5
The WCF service transfers data to the client applications by using the streaming transfer mode.
You need to create an endpoint that supports the streaming transfer mode.
Which binding should you use?
Which operation contract should you create?
You are creating a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5.
You Configure a binding to enable streaming.
You need to ensure that the client application is able to stream large XML files to the WCF service.
Which operation contract should you create?
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 use?
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You need to programmatically add the following endpoint definition to the service
http://localhost:8000/Examservice/service
Which code segment should you use?
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?
Which configuration setting should you use?
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You need to expose two different service endpoints that have the same address.
Which configuration setting should you use?