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 segment should you insert at line 09?

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 public class SeviceImpl : MyService
08 {
09
10 public void MyMethod(){ }
11 }

You need to ensure that when the MyMethod method is called, the service is the root of a transaction.
Which code segment should you insert at line 09?

Which code fragment should you insert at line 10?

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

01 <System.serviceModel>
02 …
03 <behaviors>
04 <ServiceBehaviors>
05 <behavior name="CalculatorServiceBehavior">
06 <CustomServiceBehavior/>
07 </behavior>
06 </ServiceBehaviors>
09 </behaviors>
10
11 </System.serviceModel>

You need to register the custom service behavior in the service configuration file.
Which code fragment should you insert at line 10?

Which code segment should you use?

You have created a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The existing service interface is named MyService, and contains the following code segment.

[ServiceContract(Name="SvcOrder", Namespace="http://contoso.com/services")]
public interface IMyService
{
[OperationContract]
void DoSomething();
}

You create a new service named MyServiceV1 that contains an operation named DoSomethingElse.
You need to ensure that existing client applications are still able to access the MyService.DoSomething method without Modifying client code.
Which code segment should you use?

Which configuration setting should you insert at line 03?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The service contains the following binding configuration in the configuration file.
(Line numbers are included for reference only.)

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

You need to ensure that the following requirements are met:
The service must use transport-level security (SSL via HTTPS).
The service must use message-level security to authenticate client applications by using user name and password.
Which configuration setting should you insert at line 03?

Which code segment should you use?

You create a stateless, thread-safe service by using Microsoft .NET Framework 3.5.
You use the Windows Communication Foundation model to create the service.
Load testing reveals that the service does not scale above 1,000 concurrent users.
You discover that each call to the service instantiates a new service instance.
You also discover that these service instances are expensive to create.
You need to ensure that 5,000 concurrent users can access the service.
Which code segment should you use?

Which definition should you add?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following XML code fragment.

<service name="Contoso.Exams.Examservice" BehaviorConfiguration="ExamServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/serviceModelExam/service"/>
</baseAddresses>
</host>
</service>

You need to add an endpoint definition to the service configuration for the URL
http://localhost:8000/serviceModelExam/service to expose the Contoso.Exams.IExam service contract
Which definition should you add?

Which code segment should you add?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You have successfully defined a service contract named IManageOrders.
You write the following code segment.

public class OrderImpl : IManageOrders
{
public void MarkOrderClosed(int orderId)
{
try{ }
catch (SqlException exc) { throw new FaultException<DataFault>(new DataFault()); }
}
}
[DataContract]
public class DataFault{ }

You need to create a fault contract for the MarkOrderClosed method on the IManageOrders service contract.
Which code segment should you add?


Page 6 of 11« First...45678...Last »