Which two actions should you perform?
You create a Visual Studio 2010 solution that includes a WCF service project and an ASP.NET project.
The service includes a method named GetPeople that takes no arguments and returns an array of
Person objects. The ASP.NET application uses a proxy class to access the service. You use the Add
Service Reference wizard to generate the class. After you create the proxy, you move the service
endpoint to a different port. You need to configure the client to use the new service address. In
addition, you must change the implementation so that calls to the client proxy will return a
List<Person> instead of an array. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)
Which behavior should you configure and apply to the service?
A Windows Communication Foundation (WCF) service interacts with the database of a
workflow engine. Data access authorization is managed by the database, which raises
security exceptions if a user is unauthorized to access it. You need to ensure that the
application transmits the exceptions raised by the database to the client that is calling the
service. Which behavior should you configure and apply to the service?
You need to ensure that the connection string value that is stored in the web.config file is updated to the pr
You are preparing to deploy an ASP.NET application to a production server by publishing the
application in Release configuration. You need to ensure that the connection string value that is
stored in the web.config file is updated to the production server# s connection string value during
publishing. What should you do?
Which configuration segment should you use?
You are developing a Windows Communication Foundation (WCF) service. You must
record all available information for the first 1,000 messages processed, even if they are
malformed. You need to configure the message logging section of the configuration file.
Which configuration segment should you use?
You need to interpret the trace results to determine where the error occurred and what to do next
You are using tracing to diagnose run-time issues when you look at the traces for the
service in Svc Trace viewer exe, you see what is shown in the exhibit (Click the Exhibit
button) The exception trace is selected in Svc Trace reviewer exe. You need to interpret the
trace results to determine where the error occurred and what to do next. What should you
do?
You need to cache the retrieved data so that the database is not queried each time the Web page is accessed
You are implementing an ASP.NET Web application that retrieves data from a Microsoft SQL Server
database. You add a page that includes the following data source control.
<asp:SqlDataSource id=”sqlds” runat=”server” ConnectionString=”<%$ ConnectionStrings:MyDB
%>” SelectCommand=”SELECT * FROM Companies” />
The page is accessed frequently, but the data in the database rarely changes. You need to cache the
retrieved data so that the database is not queried each time the Web page is accessed. What should
you do?
Which code segment should you use?
You are implementing an ASP.NET application that uses LINQ to Entities to access and update the
database. The application includes the following method to update a detached entity of type Person.
private NorthwindContext _entities;
public void UpdatePerson(Person personToEdit)
{}
You need to implement the UpdatePerson method to update the database row that corresponds to
the personToEdit object. Which code segment should you use?
You need to configure the WCF service to execute under the Windows logged-on identity of the calling applicati
A Windows Communication Foundation (WCF) service that handles corporate accounting
must be changed to comply with government regulations of auditing and accountability You
need to configure the WCF service to execute under the Windows logged-on identity of the
calling application. What should you do?
Which two actions should you perform?
You are implementing an ASP.NET Web site. The Web site contains a Web service named
ProductService . The code-behind file for the ProductService class contains the following code
segment.
public class ProductService :
System.Web.Services.WebService
{
public List<Product> GetProducts( int categoryID )
{
return GetProductsFromDatabase(categoryID);
}}
You need to ensure that the GetProducts method can be called by using AJAX. Which two actions
should you perform? (Each correct answer presents part of the solution. Choose two.)
You need to ensure that the About action is invoked when the root URL of the site is accessed
You create a new ASP.NET MVC 2 Web application. The following default routes are created in the
Global.asax.cs file. (Line numbers are included for reference only.)
01 public static void RegisterRoutes(RouteCollection routes)
02 {
03 routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”);
04
05 routes.MapRoute( “Default”, “{controller}/{action}/{id}”, new { controller = “Home”, action =
“Index”, id = “” } );
06 }
You implement a controller named HomeController that includes methods with the following
signatures.
public ActionResult About()
public ActionResult Index()
public ActionResult Details(int id)
You need to ensure that the About action is invoked when the root URL of the site is accessed. What
should you do?