70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

You are creating a Windows application by using the .NET Framework 3.5.

The application uses multiple threads.

You need to ensure that any exceptions that occur while executing the application are reported to the

common exception handler. You want to achieve the goal by using minimum development effort.

What should you do?


Options are :

  • Place a TRY& CATCH statement around the call to the Application.Run method, and report any exceptions to the common handler. Handle the Application.ThreadException event, and report any exceptions to the common handler. (Correct)
  • Place a TRY& CATCH statement around every call to the System.Threading.Thread.Start method in the application. Report any System.Threading.Thread.ThreadStateException to the common handler
  • Place a TRY& CATCH statement inside the Form_Load event in the main form, and report any exceptions to the common handler. Handle the Application.ThreadExit event, and report any exceptions to the common handler.
  • Place a TRY& CATCH statement around every method in the application. Report any exceptions to the common handler

Answer : Place a TRY& CATCH statement around the call to the Application.Run method, and report any exceptions to the common handler. Handle the Application.ThreadException event, and report any exceptions to the common handler.

You are creating a Windows application by using the .NET Framework 3.5. The application is used to

schedule appointments.

The application contains a scheduling component that will perform the following tasks:

Return available appointments.

Add a new appointment to a calendar.

The initial implementation of the scheduling component must be deployed.

You need to recommend a strategy to allow replacement of the scheduling component without changing

compiled code.

Which actions should you recommend?


Options are :

  • All of the above (Correct)
  • Specify the implementation type and its assembly in configuration.
  • Use reflection to load the configured type dynamically.
  • Create an interface that describes the service properties and methods. Create types that implement this interface.

Answer : All of the above

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 4

You are creating a Windows application by using the .NET Framework 3.5.

The application will be used by the shipping department of your company. The application contains a form

named SchedulingForm.

You plan to design a strategy to ensure the following accessibility criteria:

SchedulingForm is accessible only to users logged on by using a particular Windows account.

The Windows account belongs to a local group named Managers.

You need to implement the strategy by using the minimum amount of development effort.

Which two actions should you perform?


Options are :

  • Call the AppDomain.CurrentDomain.SetPrincipalPolicy method that has the PrincipalPolicy enumeration value set to WindowsPrincipal
  • Create custom components that implement the IIdentity and IPrincipal classes.
  • B & C (Correct)
  • Use the Thread.CurrentPrincipal.IsInRole method to test the role membership. If the user does not belong to the Managers group, hide access to SchedulingFor

Answer : B & C

You are creating two related desktop applications by using the .NET Framework 3.5.

The applications will access and manage the timesheet entries that are stored in a shared local data

store.

An existing ASP.NET application that uses a Microsoft SQL Server 2005 Standard Edition database

provides corporate timesheet entry management.

You need to deploy a local data store that helps reuse schemas and stored procedures that are defined in

the database.

Which data store should you use?


Options are :

  • Microsoft SQL Server 2005 Express Edition database (Correct)
  • Microsoft Office Access 2007 database
  • A strongly-typed XML file that uses a schema
  • Microsoft SQL Server 2005 Compact 3.5 database

Answer : Microsoft SQL Server 2005 Express Edition database

You are creating a Windows application by using the .NET Framework 3.5.

The application will be used by individuals with physical disabilities.

You need to ensure that the application meets the accessibility design guidelines for screen readers.

What should you do?


Options are :

  • Increase the font size of the text to 16 point.
  • Provide a visible border on every control to distinguish them from each other.
  • Implement the click event for all controls in the application.
  • Set detailed values for the Name and the ToolTip properties of all controls (Correct)

Answer : Set detailed values for the Name and the ToolTip properties of all controls

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

You create a Windows application by using the .NET Framework 3.5.

You plan to deploy an application by using the ClickOnce deployment method.

The application has the following specifications:

It contains multiple components.

It is based on the .NET Framework 3.5.

The .NET Framework 3.5 is not installed on all the client computers.

You need to install the .NET Framework 3.5 on the client computers during the application deployment

process.

What should you do?


Options are :

  • Include the .NET Framework 3.5 in the platform dependencies of the ClickOnce deployment method
  • Use registration-free Component Object Model (COM) components for deployment and set the Isolated property to TRUE.
  • Use the bootstrapping feature of the ClickOnce deployment method. (Correct)
  • Change the method for deployment to the Microsoft Windows Installer (MSI) packages and disable the bootstrapping feature.

Answer : Use the bootstrapping feature of the ClickOnce deployment method.

You are updating a Windows application by using the .NET Framework 3.5.

You are required to upgrade the UI for the application from Windows Forms to Windows Presentation

Foundation (WPF).

The new version of the application will include new UI components.

You need to ensure that an interim release of the application will support the new UI components within

Windows Forms. You want to achieve this goal by using minimum development effort.

What should you do?


Options are :

  • Develop WPF pages that are hosted in XAML Browser applications. Host the application by using WebBrowser controls
  • Develop WPF controls that can be hosted in ElementHost controls. (Correct)
  • Develop WPF controls that include COM callable wrappers. Access the controls by using runtime callable wrappers
  • Develop WPF controls that can be hosted in WindowsFormsHost controls.

Answer : Develop WPF controls that can be hosted in ElementHost controls.

You create a Windows application by using the .NET Framework 3.5.

The application captures account information. The account number contains both literal characters and

input characters of the alphanumeric type.

The account number has a predefined format.

You need to ensure that the account number is in the correct format. You also need to ensure that only

input characters are accepted from the user.

What should you do?


Options are :

  • Use a MaskedTextBox control. Create a mask to validate the format. (Correct)
  • Use a TextBox control. Create a regular expression to validate the format
  • Use a TextBox control. Bind the TextBox control to a string that has the required format.
  • Use a RichTextBox control. Create a regular expression to validate the format.

Answer : Use a MaskedTextBox control. Create a mask to validate the format.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 4

You are creating a Windows application by using the .NET Framework 3.5.

The application must meet the following requirements:

It records the details of the users who modify sensitive information.

It requires a context-related stack dump for the details.

It is executed by using the local user account without administrative privileges.

You need to ensure that the requirements are met by using minimum possible development effort.

What should you do?


Options are :

  • Add performance counters to the application for each set of sensitive information. Write a code segment to record the details of users who modify sensitive information.
  • Store the user details to a text file when a user modifies sensitive information.
  • Use the Trace.WriteLine method to generate trace information when a user modifies sensitive information. Configure the TraceListener object to save the trace information. (Correct)
  • Store the user details as a log entry to the Windows application log when a user modifies sensitive information

Answer : Use the Trace.WriteLine method to generate trace information when a user modifies sensitive information. Configure the TraceListener object to save the trace information.

You are creating a Windows application by using the .NET Framework 3.5.

The application is used to track the activities of the sales team of your company.

The application has the following features:

It stores information in a local Microsoft SQL Server 2008 database instance.

It uses SQL Server 2008 Reporting Services (SSRS) to render reports.

You need to design a reporting strategy that implements the following tasks:

It renders the reports in the application.

It allows export of the reports as a PDF document.

What should you do?


Options are :

  • Use a CrystalReportViewer control to render a local report against a rowset extracted from the local database. Export the report file to a PDF document.
  • Use a MicrosoftReportViewer control to render a local report against a rowset extracted from the local database. Export the report file to a PDF document. (Correct)
  • Use a PictureBox control to render a local report against a rowset extracted from the local database. Set the PictureBox.Image property to the required PDF document name.
  • Use a PrintDocument control to render a local report against a rowset extracted from the local database. Set the PrintDocument.DocumentName property to the required PDF document name.

Answer : Use a MicrosoftReportViewer control to render a local report against a rowset extracted from the local database. Export the report file to a PDF document.

You create a Windows application by using the .NET Framework 3.5.

You plan to design the deployment of an application. The application deploys user-specific files and

settings. Updates to the application are deployed frequently.

The requirement specifies that all computers must run the same version of the application.

You need to select the appropriate deployment technique to meet the requirement by using minimum

possible development effort.

What should you do?


Options are :

  • Use the ClickOnce installation method and request the administrator to install the application.
  • Use the MS-DOS XCOPY command.
  • Use the Microsoft Windows Installer packages
  • Use the ClickOnce installation method and allow users to install the application. (Correct)

Answer : Use the ClickOnce installation method and allow users to install the application.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

You are creating a Windows application by using the .NET Framework 3.5.

The application contains a form that has 10 data entry controls.

When the user presses the F1 key, help information for the selected control must be displayed.

You need to create an event handler to display the help information by using a sender parameter.

What should you do?


Options are :

  • Create a handler for the KeyDown event of the form.
  • Create a single handler for the KeyPress event of all controls
  • Create a handler for the KeyPress event of the form
  • Create a single handler for the KeyDown event of all controls. (Correct)

Answer : Create a single handler for the KeyDown event of all controls.

You are creating a Windows application by using the .NET Framework 3.5. The application will be

installed on Windows Vista computers.

The application includes tasks to change the application settings. Elevated privileges are required to

complete a particular task.

The application must differentiate the task that requires elevated privileges to meet the Windows Vista

User Account Control guidelines.

You need to ensure that the application indicates the task to the user before the user initiates the task.

What should you do?


Options are :

  • Add a tooltip to the UI element related to the task.
  • Display a message box that has the security shield when the user attempts the task
  • Identify the task that has a security shield icon. Separate this task from the other tasks (Correct)
  • Identify the application that has an icon which includes the security shield.

Answer : Identify the task that has a security shield icon. Separate this task from the other tasks

You are creating a Windows application by using the .NET Framework 3.5.

You plan to deploy the application to the %ProgramFiles%\Contoso directory on computers that run

Windows Vista and Microsoft Windows XP operating systems.

The user settings are stored between user sessions.

Users with non-administrative privileges must be able to execute the application.

You need to store the user settings without causing a security exception or a permission exception.

What should you do?


Options are :

  • Store the user settings to a location in the %LOCALAPPDATA% directory. (Correct)
  • Store the user settings to the %ProgramFiles%\Contoso directory.
  • Use a ConfigurationSection object to store the user settings. Set the SectionInformation.AllowExeDefinition property of the related section to MachineToApplication.
  • Store the user settings to a location that is supported by Windows Vista virtualization.

Answer : Store the user settings to a location in the %LOCALAPPDATA% directory.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

You are creating a Windows application by using the .NET Framework 3.5.

The application will be used for telephone directory management.

The application has the following specifications:

It stores data in a Microsoft SQL Server 2008 database instance.

It uses the LINQ to SQL model.

It stores the photograph of each directory member in the Picture column of the DirectoryEntry table.

It displays the directory information in a DataGridView control.

It supports expansion of rows of the DataGridView control to display the complete photograph of the

directory member.

The application is frequently used across remote or slow database connections.

You need to implement the lazy load technique to load the photographs from the database. You also need

to ensure that the implementation has minimum effect on the database connection.

What should you do?



Options are :

  • Configure the Picture property of the DirectoryEntry entity in the LINQ to SQL model. Set the Delay Loaded property to True (Correct)
  • Modify the method that executes the LINQ query to accept a Boolean parameter which indicates whether a photograph is to be loaded. Include a data-shaping clause to exclude the Picture column from the list of columns that are returned if the Boolean parameter is False. Execute the method initially by setting the Boolean parameter to True. Repeat the method execution by setting the Boolean parameter to False when the DataGridView row is expanded.
  • Identify the DataGridView column that contains the photograph. Set the Visible property of the column to False. Identify the DataGridView column that contains the photograph. Set the Visible property of the column to True when the row that contains the photograph is expanded.
  • Create a DataLoadOptions object in the method that is used to execute the LINQ query. Call the LoadWith method of the object along with the de => de.Picture statement. Use the DataLoadOptions object when the statement is executed

Answer : Configure the Picture property of the DirectoryEntry entity in the LINQ to SQL model. Set the Delay Loaded property to True

You are creating a Windows application by using the .NET Framework 3.5.

The application uses Microsoft SQL Server 2008 authentication to connect to a relational database.

You need to devise a storage strategy for the connection string to prevent unauthorized users from

accessing the information.

What should you do?


Options are :

  • Store the connection string to a location in the %LOCALAPPDATA% folder of the application
  • Store the connection string by using the isolated storage mechanism.
  • Embed the connection string in the application code
  • Store the connection string in a protected configuration section. (Correct)

Answer : Store the connection string in a protected configuration section.

You are creating a Windows application by using the .NET Framework 3.5.

The application is used to manage employee information.

The application meets the following specifications:

A main form named EmployeeList contains a list control that displays a list of all employees.

The menu items help simultaneously display various detail forms for each employee selected from the list

control.

Each detail form for a selected employee contains a different set of information about the employee.

You need to ensure that when a user switches from one employee to another, the open detail forms are

updated to the corresponding employee information.

What should you do?


Options are :

  • Add a public static property named EmployeeId to all the detail forms. Implement the INotifyPropertyChanging interface on the EmployeeList form. Implement the INotifyPropertyChanging interface on each detail form.
  • Implement the INotifyPropertyChanging interface on the EmployeeList form. Add a static constructor to all detail forms and instantiate a PropertyChangingEventHandler delegate in all the static constructors.
  • Add a public event named SelectEmployeeChanged to the EmployeeList form. Raise the event when another employee is selected from the list control. Subscribe to the SelectEmployeeChanged event in the constructor of all the detail forms along with a method that updates the information displayed on the form. (Correct)
  • Add a public delegate named UpdateEmployee of the type EventHandler to the EmployeeList form. Create a method named UpdateInformation in all the detail forms. When a detail form is loaded, instantiate a new EventHandler delegate and point it to the UpdateInformation method. Assign this delegate to the UpdateEmployee delegate of the EmployeeList form. Invoke the UpdateEmployee delegate when another employee is selected from the list control.

Answer : Add a public event named SelectEmployeeChanged to the EmployeeList form. Raise the event when another employee is selected from the list control. Subscribe to the SelectEmployeeChanged event in the constructor of all the detail forms along with a method that updates the information displayed on the form.

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 5

You create a Windows application by using the .NET Framework 3.5.

The application has a complex form that is used to capture information.

Users of the application enter data in the forms quickly by using tabs to navigate through the form controls.

They must be immediately notified when they enter invalid data in the form controls.

You need to notify the users without blocking the data entry process.

Which control should you use?


Options are :

  • HelpProvider
  • ErrorProvider (Correct)
  • MessageBox
  • ToolTipProvider

Answer : ErrorProvider

You are creating a Windows application by using the .NET Framework 3.5.

The application contains a form to enter user details. The application must capture the preferred search

engine as part of input data.

You discover that the preferred search engine can be a known search engine or an unknown one.

You need to allow the user to select a value for the preferred search engine from a list of search engines.

You also need to allow the user to enter a value for the search engine in the same list.

Which control should you use?


Options are :

  • A ComboBox control that has the DropDownStyle property set to DropDown (Correct)
  • A TextBox control that has the AutoCompleteSource property set to Custom
  • A ListBox control that has the SelectionMode property set to 1
  • A ComboBox control that has the DropDownStyle property set to DropDownList

Answer : A ComboBox control that has the DropDownStyle property set to DropDown

You create a Windows application by using the .NET Framework 3.5.

The application is used in a corporate environment to maintain the contact information of all employees.

You create a Windows client application to browse through employee contacts information. All data is

stored on a central Microsoft SQL Server 2008 database, and smart clients are deployed on each

computer.

You discover that users often browse through the same contacts data several times.

You need to prevent unnecessary round trips to bind the data from the server.

What should you do?


Options are :

  • Use BindingSource.CurrentChanged event to retrieve the updated data.
  • Use System.Web.Caching.Cache class to temporarily store on a network file share.
  • Use DataSet class to bind and store data in the client application (Correct)
  • Use BindingNavigator.BindingSource class to navigate through data

Answer : Use DataSet class to bind and store data in the client application

You create a Windows application by using the .NET Framework 3.5.

The application contains a form to display a wizard interface.

When a user performs the steps in the wizard, a tree view control must concurrently display the list of

steps and the progress in the wizard.

You need to ensure that the progress display area along with the tree view control is always visible and

can be resized.

Which container should you add to the form?


Options are :

  • GroupBox
  • TableLayoutPanel
  • TabControl
  • SplitContainer (Correct)

Answer : SplitContainer

You are creating a Windows application by using the .NET Framework 3.5.

The application will access data files that are installed along with the application.

The application must be able to locate these data files.

You need to record the location of the installed data files. You also need to ensure that the application can

be accessed by roaming users.

What should you do?


Options are :

  • Append your application name to the Known Folder FOLDERID_Program location. Write this value to an HKLM registry key.
  • Create an application-specific Known Folder that is prefaced by using FOLDERID along with the location where the application is installed. (Correct)
  • Append your application name to the Known Folder FOLDERID_ProgramFiles location. Write this value to an HKLM registry key.
  • Change the Known Folder FOLDERID_Profile to the location where the application is installed

Answer : Create an application-specific Known Folder that is prefaced by using FOLDERID along with the location where the application is installed.

You are creating a Windows application by using the .NET Framework 3.5.

The corporate users will install the application from an Intranet Web site.

You plan to use ClickOnce deployment to perform the following tasks:

Publish the application.

Release application service packs.

The update strategy must prevent users from launching an earlier version of the application when a new

service pack is available.

You need to recommend an update strategy.

Which two actions should you perform?


Options are :

  • Specify a minimum required version for the application
  • A & B (Correct)
  • Publish updates by setting the Choose when the application should check for updates option to Before the application starts.
  • Publish updates along with the automatic updates disabled

Answer : A & B

You are creating a Windows application by using the .NET Framework 3.5.

You build reports by using the Microsoft SQL Server 2008 Reporting Services (SSRS). The sales

associates of the company execute the reports locally.

Parameters are entered in a MicrosoftReportViewer control that calls a stored procedure to execute the

report.

The sales associates frequently report that the data returned on execution is not the most recent.

You need to ensure that each time a report is executed, real-time data is displayed.

What should you do?


Options are :

  • Call the ReportViewer.DataBindings.Clear method.
  • Call the BindingSource.Clear method
  • Delete the client report definition (RDLC) file by using the System.IO.File.Delete method
  • Call the ReportViewer.LocalReport.Refresh method. (Correct)

Answer : Call the ReportViewer.LocalReport.Refresh method.

You are creating a Windows application by using the .NET Framework 3.5.

You configure the deployment project of the application to deploy an assembly named MyClass.dll to the

global assembly cache (GAC).

You replace the existing version of the application with an updated version.

You discover that because of the presence of an old version of MyClass.dll assembly in the GAC, the

updated version does not function properly.

You need to ensure that when the application is uninstalled for replacement, the MyClass.dll assembly is

deleted from the GAC. What should you do?


Options are :

  • Include a single custom action in the deployment project to deploy the MyClass.dll assembly by using the GACUTIL.exe utility along with the /I switch.
  • Set C:\WINDOWS\Assembly as the destination folder for the deployment project
  • Write a VBScript code segment to remove the MyClass.dll assembly from the GAC. Create a custom action to trigger the script.
  • Configure the deployment project to deploy the MyClass.dll assembly to the GAC special folder by using the File Editor tool. (Correct)

Answer : Configure the deployment project to deploy the MyClass.dll assembly to the GAC special folder by using the File Editor tool.

You are creating a Windows application by using the .NET Framework 3.5.

You plan to develop utility classes for the application. The classes will provide a data access layer, a

business logic layer, and a presentation layer.

The presentation layer utility class provides functions for the controls on the forms.

You need to ensure that the utility classes can be reused in other applications. You want to achieve this

goal by using minimum possible development effort.

What should you do?


Options are :

  • Create a Web service that references the utility classes.
  • Create a utility class as a Windows Presentation Foundation (WPF) control for the data access layer and the business logic layer. Create a separate utility class for the presentation layer as a console application.
  • Create a utility class for the data access layer, business logic layer, and the presentation layer as a class library. (Correct)
  • Create a utility class for the data access layer and the business logic layer as a class library. Create a separate utility class for the presentation layer as an executable.

Answer : Create a utility class for the data access layer, business logic layer, and the presentation layer as a class library.

You are creating a Windows application by using the .NET Framework 3.5.

The application will be installed on %ProgramFiles%. The employees use the application to maintain a list

of created and edited document files.

When the list is saved, the operating system must not display a User Account Control (UAC) elevation

prompt.

You need to identify an appropriate location to save the list.

Which location should you use?


Options are :

  • Registry key under HKEY_LOCAL_MACHINE\Software\user-name\
  • Registry key under HKEY_LOCAL_MACHINE\Software\company-name\
  • Application configuration file
  • User configuration file (Correct)

Answer : User configuration file

You are creating a Windows application by using the .NET Framework 3.5.

Your application requires a local data store that requires no administrative privileges to install. The data

store must use the ClickOnce deployment.

The application will cache data when offline. When the application returns online, it must synchronize data

with a corporate SQL Server 2008 database.

You need to identify a local data store that meets the outlined requirements. You also need to ensure that

the application uses minimum possible memory.

Which data store should you use?


Options are :

  • Microsoft SQL Server 2008 Compact Edition database (Correct)
  • Microsoft SQL Server 2008 Standard Edition database
  • Microsoft Desktop Engine (MSDE) database
  • Microsoft SQL Server 2008 Express Edition database

Answer : Microsoft SQL Server 2008 Compact Edition database

You are creating a Windows application by using the .NET Framework 3.5.

The application uses resource files to provide localization support.

The application must meet the following requirements:

If the user is a French Canadian or a French Belgian, then the interface is initially displayed in the

respective language.

If the user is French, then the interface is displayed in French.

If the user is not from any of these three categories, then the interface is displayed in English.

You need to design a localization strategy to meet the specified requirements.

What should you do?


Options are :

  • Set French Belgian as a default culture. Set French Canadian as a default culture. Set English as a neutral culture. Set French as a specific culture.
  • Set French Belgian as a default culture. Set French Canadian as a default culture. Set French as a neutral culture. Set English as a specific culture.
  • Set English as a default culture. Set French as a neutral culture. Set French Belgian as a specific culture. Set French Canadian as a specific culture. (Correct)
  • Set French as a default culture. Set English as a neutral culture. Set French Belgian as a specific culture. Set French Canadian as a specific culture.

Answer : Set English as a default culture. Set French as a neutral culture. Set French Belgian as a specific culture. Set French Canadian as a specific culture.

You are creating a Windows application by using the .NET Framework 3.5.

The application will be used for processing sales orders.

Individual product quantities are retrieved from the database before an order is placed. The product

quantity is reduced after an order is placed.

You need to design a concurrency model to ensure that the correct product quantity on hand is displayed

at all times.

What should you do?


Options are :

  • Use a DataSet object and a DataAdapter object to retrieve the quantity on hand. When an order is placed, verify whether the quantity on hand for the particular product in the database has decreased.
  • Use a DataReader object to retrieve the quantity on hand. When an order is placed, verify whether the quantity on hand for the particular product in the database has decreased.
  • Use a Transaction object along with the IsolationLevel property set to IsolationLevel.Serializable. Read and update the quantity on hand within the Transaction object for each product (Correct)
  • Use a Transaction object along with the IsolationLevel property set to IsolationLevel.ReadCommitted. Read and update the quantity on hand within the Transaction object for each product.

Answer : Use a Transaction object along with the IsolationLevel property set to IsolationLevel.Serializable. Read and update the quantity on hand within the Transaction object for each product

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions