PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You are hosting a Windows Communication Foundation (WCF) service under Microsoft Interent Information Services (IIS) 7.0.
You have set up a web site in IIS Manager. The physical path is c:\wwwroot\Calendar.
There is a Calendar.svc file in the c:\wwwroot\Calendar folder. It contains the following directive:

<% @ServiceHost Language=”C#” Debug=”true” Service=”Calendar.Calendar” CodeBehind=”CalendarSvc.cs” %>

The CalendarSvc.cs file contains the source for the Calendar class in the Calendar namespace.
You compile this code into the Calendar.dll file. You need to deploy your service to the web site. What should you do?

What should you do?

You are creating a Windows Presentation Foundation (WPF) application by using Microsoft NET Framework 4.
You creates a photo album-browsing application.
When the user opens an album,pictures in the album are displayed in sets of 10. Pictures are obtained from a Windows Communication Foundation (WCF) service. Most of the memory of the application is allocated in the native heap. The memory usage of the application increases when new albums are opened. You need to ensure that the memory usage of the application remains within a specific range.
What should you do?

What should you do?

You are modifying a Windows Communication Foundation (WCF) service that issues security tokens.
The service is accessible through the named pipe protocol. No endpoints are added in the service code.
The configuration file for the service is as follows. (Line numbers are included for reference only)

01 <configuration>
02 <system.serviceModel>
03 <services>
04 <service name=”Contoso.TokenService”>
05 …
06 <host>
07 <baseAddress>
08 …
09 <add baseAddress=”net.pipe://www.contoso.com/tokenpipe” />
10 <baseAddress>
11 </host>
12 </service>
13 </services>
14 </system.serviceModel>
15 </configuration>

You need to ensure that the existing client applications can access the service through HTTP and named pipes.
What should you do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server database.
You use the ADO.NET Entity Framework to manage persistence-ignorant entities. You create an ObjectContext instance named context.
Then, you directly modify properties on several entities. You need to save the modified entity values to the database.
Which code segment should you use?

What should you do?

The Windows application will consume a Windows Communication Foundation (WCF) service.
The WCF service will provide data to the application.
you plan to use the ADO.NET Entity Framework to create a data model that wil be used by the application. Other development team members make changes to the WCF service data contract. You need to ensure that changes made to the WCF service data contract do not require the application to be recompiled.
What should you do?

Which two approaches should you recommend?

You are designing an ASP.NET Web application for display on desktop computers and on mobile devices.
You have the following requirements:
– Present a full-featured interface to users of desktop computers that includes many interaction options and graphical buttons.
– Present a simple interface to users of mobile devices that does not include bandwidth-intensive elements.
You need to design the Web application to meet the requirements.
Which two approaches should you recommend?
(Each correct answer presents part of the solution. Choose two.)

Which two actions should you perform?

You are adding a Windows Communication Foundation (WCF) service to an existing application.
The application is configured as follows. (Line numbers are included for reference only)

01 <configuration>
02 <system.serviceModel>
03 <services>
04 <service name=”Contoso.Sales.Stock.Service”
05 behaviorConfiguration=”MetadataBehavior”>
06 <host>
07 <baseAddresses>
08 <add baseAddress=”http://contosso.com:8080/StockService” />
09 </baseAddresses>
10 </host>
11 </service>
12 </services>
13 <behaviors>
14 <serviceBehaviors>
15 <behavior name=”MetadataBehavior”>
16 </behavior>
17 </serviceBehaviors>
18 </behaviors>
19 …

You need to configure the service to publish the service metadata.
Which two actions should you perform? (Each answer presents part of the solution. Choose two.)