70-518 169 Q&S MCPD Pro: Designing and Developing Windows Applications Using Microsoft .NET Framework 4 by Lord Obsidian

You are designing a Windows Presentation Foundation (WPF) data entry application. The application uses data binding to bind controls in the user interface (UI) to business objects. The UI uses validation rules for each input control. The data validation rules change based on the state of the business object. You need to recommend a validation strategy that will allow changes to the validation rules without changes to the UI code.
What should you recommend?


A. Implement the IDataErrorlnfo interface in the business objects and replace all ValidationRule elements with ExceptionValidationRule elements.
B. Set the ValidationStep attribute on ValidationRule elements to CommittedValue.
C. Set the ValidationStep attribute on ValidationRule elements to RawProposedValue.
D. Implement the IDataErrorlnfo interface in the business objects and replace all ValidationRule elements with DataErrorValidationRule elements.


Answer Clike
User will have a windows displayed which contains a stackpanel, text and image. Can only contain WPF elements and user HAS TO answer before closing the window. What would you choose for this?


A. System.Windows,MessageBox class
B. System.Windows.Forms.MessageBox class
C. a new class derived from Window class and call ShowDialog() method
D. a new class derived from Window class and call Show() method


Answer Clike
There is a feature within a software that is causing performance issues. You want to log this after deploying the application to a file. What to use?


A. ConsoleTraceListener
B. XmlWriterTraceListener
C. EventLogTranceListener
D. DelimitedListTraceListener


Answer Clike
You are reviewing an existing Windows application that uses .NET Framework 4. When the user clicks a button, the application sequentially processes thousands of image files contained in a directory. The user interface becomes unresponsive while the application processes the files. You have the following requirements:
. Modify the button’s click event.
. Increase application throughput by processing multiple image files concurrently.
. Ensure that the user interface remains responsive while the application processes the image files.
You need to recommend an approach for meeting the requirements. What should you recommend?


A. Iterate over the image files. For each image file, use the Process.Start() method to launch a console application that processes the image file.
B. Use the ThreadPool.QueueUserWorkItem() method to queue up a single work item that uses the Parallel.ForEach () method to process the image files concurrently.
C. Use the Parallel.ForEach() method to process the images concurrently.
D. Iterate over the image files by using the Parallel.ForEach() method. For each image file, start a separate thread that processes the image file, by using the Thread.Start() method.


Answer Clike
You are designing a .NET Framework 4 solution that contains a Windows Presentation Foundation (WPF) application. The WPF application includes CPU-intensive calculations. The calculations can be run on a separate process and can effectively be isolated from the rest of the WPF application. You need to recommend a deployment strategy that maximizes the scalability of the calculations for each user. What should you recommend?


A. Deploy the calculation logic as a separate assembly along with the WPF application to each client computer. Invoke methods in the assembly asynchronously.
B. Deploy the calculation logic as a separate assembly along with the WPF application to each client computer. Invoke methods in the assembly synchronously.
C. Deploy the calculation logic as a Windows Communication Foundation (WCF) service to servers. Deploy the WPF application to each client computer.
D. Deploy the calculation logic as a Windows Communication Foundation (WCF) service to servers. Deploy the WPF application to the same servers.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) client application from which employees will access a Web service. Business partners will access the Web service by using proprietary client applications. You need to recommend a solution for ensuring the integrity of data in the system. What should you recommend?


A. Secure the Web service by using SSL
B. Implement data validation at the service layer and reject invalid data.
C. Implement data validation on the client and reject invalid data.
D. Encrypt data while storing it in the database.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application. The application will be localized into multiple languages. You need to recommend an approach for preparing the application for localization. Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)


A. Add UID attributes to language-specific elements in the XAML file.
B. Define a UICulture element for each language in the project file.
C. Add an application setting for each language to the App.config file.
D. Translate the contents of the appropriate XAML elements into each localization language.


Answer Clike
What do you suggest for windows application that creates MS Word files:


A. dynamic types
B. TypeLibConverter
C. COM callable wrapper
D. The Assembly registration tool


Answer Clike
How to navigate to Page3 when wpf frame shows Page2 for the first time:


A. Frame1.NavigationService.GoForward()
B. Frame1.NavigationService.Navigate(new Uri("Page2.xaml", UriKind.Relative)
C. Frame1.Navigate(new Page3())
D. Frame1.NavigationService.Navigate("Page3");


Answer Clike
Preparing a component to be localized how to proceed? select 2


A. UID in xaml
B. CultureId
C. Project setting
D. Text Translation


Answer Clike
An existing Windows application uses a Windows Communication Foundation (WCF) Web service that is available only to employees. You have the following requirements:
. Make the WCF Web service available to business partners.
. Enable business partners to send a profile token.
. Ensure that the currently deployed application continues to function.
You need to recommend a solution that meets the requirements. What should you recommend?


A. Convert the WCF Web service to a Duplex service that implements a callback to accept the profile token.
B. Use SOAP headers to pass the profile token to the service operations.
C. Modify the WCF Web service operations to accept the profile token as an additional parameter.
D. Implement the WCF Web service as a REST service.


Answer Clike
You design a Windows Presentation Foundation (WPF) application that interacts with a Windows Communication Foundation (WCF) Web service. The WCF Web service throws exceptions of type Exception. The WPF application crashes when the WCF Web service throws an exception. You need to recommend an error-handling strategy that allows users to submit updated data to the WCF Web service without restarting the WPF application. What should you recommend?


A. Modify the Web service to throw custom exceptions derived from the Exception class.
B. Modify the Web service to throw exceptions of type FaultException.
C. Modify the Web service to throw exceptions of type InvalidOperationException.
D. Modify the Web service to throw custom exceptions derived from the ApplicationException class.


Answer Clike
You create a Console application using .NET Framework 2.0. The Console application utilizes a set of assemblies for business logic and the data layer. You want to convert the Console application to a Windows Forms application.
Therefore, you need to design a conversion strategy by using the least amount of time and coding.
What will you do? Each correct answer represents a part of the solution. Choose two.


A. Convert the Console application to Web application.
B. Convert the Console application to Windows Forms application.
C. Retain the business logic and data layer assemblies as .NET Framework 2.0 assemblies.
D. Convert the Console application and all data layer assemblies to .NET Framework 4.0.
E. Upgrade the business logic and data layer assemblies to .NET Framework 4.0.


Answer Clike
You are creating a Windows application using .NET Framework 4.0. All employees of the company will use that application. The local file of the application is stored on the local computers. The file is secure and cannot be accessed from remote places.
You are required to design a remote monitoring strategy to monitor the usage time of the application by each user.
What will you do? Each correct answer represents a part of the solution. Choose two.


A. Publish the events to Windows Event Log.
B. Publish the events to Microsoft Operations Manager.
C. Publish the application’s startup, shutdown, and user idle time events by using the System Management Instrumentation namespace.
D. Use Windows Management Instrumentation.
E. Add TraceSource for startup, shutdown, and user idle events.


Answer Clike
LINQ to SQL defines which two core attributes?


A. [Row] and [Column]
B. [Table] and [Column]
C. [Expression] and [Table]
D. [Table] and [Cell]


Answer Clike
Which of the following allows you to create data access applications by programming alongside a conceptual application model?


A. ADO.NET Entity Framework
B. Entity Framework
C. Language-Integrated Query
D. Conceptual Model


Answer Clike
Question. You are developing a Windows Presentation Foundation (WPF) application.
You need to ensure that when the user attempts to run the application, the user cannot use the application if a new version of the application is available.
What should you do?


A. Deploy the application using the XCopy technology
B. Create a custom action within the MSI package to check for updates
C. Use the ClickOnce technology along with the Search for updates during application startup setting
D. Use a Background Worker object on an application load to connect to a Background Intelligent Transfer Service (BITS)


Answer Clike
You are creating a Windows application in an application domain named DomainX using .NET Framework 4.0. DomainX builds an application domain named DomainY. Code in DomainY throws ApplicationException. However, code in DomainX throws an unhandled FileNotFoundException.
You are required to ensure that the exception thrown in DomainY is correctly handled in DomainX.
What will you do? Each correct answer represents a part of the solution. Choose two.


A. Use the Gacutil.exe tool to sign the assembly holding the exception.
B. Deploy the assembly to the Global Assembly Cache.
C. Use the primary interop assembly to handle the exception.
D. Sign the assembly holding the exception by using a strong name.
E. Use a publisher policy to deploy the assembly.


Answer Clike
Which event of the Application class is used to occur when an untrapped thread exception is thrown?


A. ThreadExit
B. ThreadException
C. ApplicationExit
D. IdleExit


Answer Clike
Which deployment method will you use to create an application installer file and distribute the file?


A. Windows Installer
B. Windows Setup Wizard
C. XCOPY
D. Mixed Mode


Answer Clike
You create a Windows application using .NET Framework 4.0. The application is deployed by using the XCOPY command.
The application updates are provided through a Web site.
The application’s users increase eventually.
You are required to ensure that all users make use of the same version of the application.
What will you do?


A. Change the application to use the ClickOnce deployment.
B. Use the Windows Installer package for the application.
C. Use a deployment manifest for the application.
D. Write a bootstrap code to ensure the availability of a new version of the application.


Answer Clike
You are creating a Windows application using .NET Framework 4.0.
The application has the following requirements:
. It will access the data files that are installed together with the application.
. It must be able to locate these data files.
You are required to record the location of the installed data files.
You are also required to ensure that the application can be accessed by roaming users.
What will you do? Each correct answer represents a part of the solution. Choose two.


A. Ensure that the Known Folder is introduced by using FOLDERID together with the application’s installed location.
B. Create an application-specific Known Folder.
C. Append your application name to IKnownFolder.
D. Change the Known Folder FOLDERID_Profile to the application installed location.
E. Write the value to the HKLM registry key.


Answer Clike
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application uses the background worker process (BWP). When the user clicks a button, the background worker executes a method named DoCalculations asynchronously. You need to implement a progress bar on the user interface (UI) that informs the user of the progress of DoCalculations. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)


A. Modify the Value property of the progress bar in DoCalculations.
B. Modify the Value property of the progress bar in the ProgressChanged event handler of the background worker.
C. Modify the Value property of the progress bar in the RunWorkerCompleted event handler of the background worker.
D. Call the ReportProgress method of the background worker in DoCalculations.
E. Call the ReportProgress method of the background worker in the DoWork event handler of the background worker.


Answer Clike
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList. You need to ensure that changes to ProductList are automatically reflected in the ListBox control. What should you do?


A. Implement the INotifyPropertyChanged interface in the Product class.
B. Implement the IQueryable<Product> interface in the ProductList class.
C. Extend the DependencyObject class in the Product class.
D. Extend the ObservableCollection<Product> class in the ProductList class.


Answer Clike
You use Microsoft .NET Framework 4 to create a custom Windows Presentation Foundation (WPF) application. Your environment includes several WPF applications. The applications use the same logo and style configuration as part of a corporate standard. You need to ensure that the existing applications can be updated to use the same logo and style settings without recompiling. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)


A. Mark the resource as an embedded resource in each application.
B. Create a resource in an XAML file that contains the logo and style configurations.
C. Create a resource in a custom control that contains the logo and style configurations.
D. Add the resource as a ResourceDictionary in the MergedDictionaries collection of each application.
E. Use ResourceManager to read the content of the resource. Manually assign the style configurations included in the resource file to the appropriate control in each application.


Answer Clike
You are designing a Windows desktop application for your company by using Microsoft NET Framework 4 and Microsoft SQL Server 2008.
The middle tier of the application uses several Data Adapter objects that query a SQL Server database The user interface (UI) tier of the application uses controls that are bound to Typed Data Set objects.
The database schema frequently changes.
You need to ensure that changes in the database schema do not impact the UI tier.
What should you do?


A. Replace the Data Adapter objects with Data Reader objects.
B. Replace the Data Set objects with Language Integrated Natural Query (LINQ) objects
C. Encapsulate the Data Set objects in a custom Data Transfer Object (DTO) class
D. Encapsulate the Data Adapter objects in a custom Data Transfer Object (DTO) class.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application for your company by using Microsoft NET Framework 4 and Microsoft Visual Studio 2010.
The user interface (UI) tier of the application will be developed by using Windows Presentation Foundation (WPF).
The middle tier of the application will be developed by using Windows Communication Foundation (WCF).
You plan to use several legacy third-party COM components. You do not have access to the source code of these components
You need to ensure that the following requirements are met
"The middle tier can use the COM components
"Application developers can debug the application.
"The application must allow for a gradual migration away from the COM components
What should you do?


A. Add references to the COM components in the UI tier
B. Design a thin interface layer assembly that uses COM Callable Wrappers (CCWs) to dynamically access the COM components
C. Design a new Primary Interpol Assembly (PIA) by using appropriate source attenuates for the COM components In the PIA, expose selected elements of the components that can be used by developers
D. Design a custom wrapper assembly that uses the methods of the Type Lib Converter class to load and interface to the COM components. Expose managed NET methods that dynamically access the corresponding COM methods.


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft NET Framework 4.
You design a wizard for the application. The wizard contains many screens.
You need to ensure that users can move backward and forward through the screens. You also need to ensure that users can navigate to the previous screen stored in history.
What should you do?


A. Create all the screens in the wizard by using the Window object. Then, use the Show method of the Window object.
B. Create all the screens in the wizard by using the Window object. Then, use the Show Dialog method of the Window object.
C. Create all the screens in the wizard by using the Page object. Then, use the Go Back method of the Navigation Service object.
D. Create all the screens in the wizard by using the Page object. Then, use the Navigate method of the Navigation Service object.


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4.
You plan to create a wizard by using a Window, a Frame, and several Page objects.
The wizard will use the Navigation Service. The Navigation Service will be invoked by buttons on the user interface (UI).
You need to ensure that prior-page navigation can be disabled.
What should you do?


A. In the button On Click event, remove the previous wizard page from the journal.
B. In the button On Click event, remove the previous wizard page from the Window.
C. In the button On Mouse Down event, remove the previous wizard page from the Frame.
D. In the button On Mouse Down event, remove the previous wizard page from the Window.


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft NET Framework 4. The application retrieves customer data from an enterprise resource planning (ERP) system. You need to ensure that the following requirements are met:
"Customer data is retrieved only once.
"Customer data is available on multiple forms within the application.
" Forms can implement Two-Way binding to the customer data
What should you do?


A. Store the results of the query in a static Data Table object that is used by all the forms.
B. Store the results of the query in a local XML file. Bind all forms to an XML Data Adapter object that references the local XML file.
C. Design a static class for the data that implements the IObservable interface.
D. Design a static class for the data that implements the INotifyPropertyChanged interface. Raise the Property Changed event to notify the forms when data is changed.


Answer Clike
You are designing a Windows client application by using Microsoft .NET Framework 4.
You create a Global Positioning System (GPS) navigation application. Routing data is stored on a server. A wireless data connection that has limited bandwidth allows the application to download data from the server.
The application continuously shows a perspective view of the route ahead as a user sees it, based on the position and direction of the vehicle.
Prior to navigation, a user types their destination and selects a route they will follow.
You need to ensure that when the position or direction of the vehicle changes, the perspective view is updated immediately.
What should you do?


A. Download perspective views asynchronously as JPEG images when the user moves toward the route.
B. Compute the best route on the server. Download the selected routing data as geographic coordinates before the routing begins.
C. Compute all possible perspective views on the server, compress them as JPEG images, and download the images before the routing begins
D. When a wireless connection is available, compute potential routes from the current position of the car and store the corresponding routing data on the client application.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.The application vii use multiple worker threads and a single user interface (UI) thread.
You plan to design the exception.-handling strategy for the application.You need to ensure that all exceptions that occur can be handled.
What should you do?


A. Use a DispatcherUnhandledExceptionEvent handler on the main UI thread
B. Use a DispatcherUnhandledExceptionEvent handler on each worker thread
C. Write an AppDomain UnhandledExceptionEvent handler
D. Write a general catch block for the System Exception types after any specific catch statements on the main user interface thread


Answer Clike
You are designing an application by using Microsoft NET Framework 4 and Microsoft VisualStudio 2010. You are creating an application in Domain A that creates an application domain named Domain B.
Code in Domain B throws an Application Exception Code and Domain A throws an unhandled File Not Found Exception.You need to ensure that the exception thrown in Domain B is properly handled in Domain A.
What should you do?


A. Create a separate thread in Domain B to handle exceptions in Domain A
B. Sign the assembly and register *
C. Sign the assembly and place * in the application folder
D. Sign the assembly that contains the exception by using a strong name and deploy the assembly to the Global Assembly Cache (GAC).


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4.
You create a control named Help Viewer to view the Help documentation of the application.
The Help Viewer control must be available to all windows in the application.
You need to ensure that the application allows users to perform the following tasks:
- Bookmark their location in the documentation and return to the bookmark from any window
- Hide the Help Viewer control
- Dock the Help Viewer control
You create a main window as a base class.
What should you do next?


A. – Add the Help Viewer control to the window at runtime.
- Inherit all other window classes in the application from the main window base class.
B. – Add the Help Viewer control to a Dock Panel control at runtime.
- Inherit all other window classes in the application from the main window base class.
C. – Add the Help Viewer control and a Frame control to a Dock Panel control to the window at runtime.
- Create all other windows in the application as pages and host them in the Frame control.
D. – Add the Help Viewer control and a Frame control to a Stack Panel control to the window at runtime.
- Create all other windows in the application as pages and host them in the Frame control.


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4.
The application consists of multiple data entry screens.
You need to ensure that users can return to previous screens.
You also need to ensure that users can view a history of screens.
What should you do?


A. Create buttons to allow a user to open a new Window for the data entry screens.
B. Create buttons to allow a user to open a new Window as an MDI child window for the data entry screens.
C. Create hyperlinks to allow a user to move between data entry screens. Use the Navigation Service class to manage navigation history.
D. Create hyperlinks to allow a user to move between data entry screens. Use the Navigation Progress Event Rags class to manage navigation history.


Answer Clike
You are creating a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The application will consist of several data entry forms.
Each data entry form requires a user to enter phone numbers and addresses.
You need to design a solution that promotes code reusability.
What should you do?


A. Add multiple text boxes for each data entry form.
B. Use the same style resource for each data entry form.
C. Create a new user control and reference it on each data entry form.
D. Create a new merged resource dictionary and reference it from each data entry form.


Answer Clike
You are designing a new feature for an existing Windows Forms application by using Microsoft .NET Framework 4.
The application contains multiple forms that are loaded into a parent Multiple Document Interface (MDI) form.
Your company policy does not allow the use of third-party controls.
You need to ensure that the new feature meets the following requirements:
- It provides a three-dimensional scale model.
- It allows users to change the colors of the model and communicates the color selections back to the application.
- It allows the model to scale, based on the user’s client computer display resolution.
- It is a child form in the MDI application.
What should you do?


A. – Design the new feature in the existing Windows Forms application as a Windows form.
- Add the form as a child form to the MDI window.
B. – Design the new feature in a new application by using Windows Presentation Foundation (WPF).
- Invoke the new WPF application from the existing Windows Forms application.
C. – Design the new feature in a new Windows Presentation Foundation (WPF) application.
- Host the existing application inside the new WPF application by using the Windows Forms Host class.
D. – Design the new feature by using a Windows Presentation Foundation (WPF) user control.
- Use the Element Host class to host the WPF user control in the existing Windows Forms application.


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF), Microsoft .NET Framework 4, and Microsoft SQL Server 2008.
The application will contain several forms that include custom data validators.
You need to ensure that data is validated before the database updates occur. You also need to ensure that the validation logic can be reused.
How should you design the validation?


A. Implement the IDataErrorlnfo interface in the data class of the application
B. Implement the INotifyPropertyChanged interface in the data class of the application
C. . Subscribe to the MouseLeave event for all user interface (UI) components of the application.
. Perform data validation in the event handler and alert users when a data entry error occurs
D. . Subscribe to the TextChanged event for all user interface (UI) components of the application.
. Perform data validation in the event handler and alert users when a data entry error occurs


Answer Clike
You are designing a .NET Framework 4 solution. The solution contains a Windows Presentation Foundation (WPF) application and a Windows Service, Both Applications using a common assembly and both store data in a Compact MSSQL Database.
You need to install the applications with the following requeriment Must be possible to update the WPF without stop the Windows Service


A. Deploy the Windows service in a separate folder from the WPF application
B. Store the connection string in a enviroment variable.
C. Store the connection string in a key in registry.
D. Deploy the Windows Service in the same folder as the WPF application.


Answer Clike
You are updating a Windows desktop client application that was created by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
The application displays data derived from several database queries. The display takes a long time to update.
The application currently uses a BackgroundWorker thread and a Parallel.ForEach statement on that thread.
Users have requested a modification to the program that would allow them to interrupt the display of data and begin processing a new and different query.
You decide to provide a new Stop button on the user interface (UI) to allow the user to terminate the current data display and initiate the new query.
The main UI thread must be notified when the current data processing is terminated so that the new query can be started.
You need to implement the Stop button event handler.
What should you do?


A. . Use the DoWork handler of the worker thread and test a shared status value.
. Use a break statement to terminate the Parallel.ForEach loop.
B. . Use the DoWork handler of the worker thread and test a shared status value.
. Use a loopStatus.Stop() statement to terminate the Parallel.ForEach loop.
C. . Use the DoWork handler of the worker thread and test a shared status value.
. Use the Thread.AbortQ statement to terminate the worker thread.
. Start a new BackgroundWorker thread from the main UI thread.
D. . Use a CancelAsync() function to cancel the worker thread.
. In the Parallel.ForEach loop, test the CancellationPending property.
. If the property is set to true, perform the following tasks:
Write a loopStatus.Stop() statement.
Set the DoWorkEventArgs.Cancel property to true.
Use a return statement to exit from the loop.


Answer Clike
You are developing an application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
You plan to use Microsoft Sync Framework to synchronize the data stored in a local Microsoft SQL Server Compact Edition database with the data stored in a centralized SQL Server 2008 database.
Four columns are added to each table involved in the synchronization process to track changes to the database.
You add the following four columns to the database table.



Users report that the synchronization process is not always successful. You need to ensure that the application synchronizes data successfully.
What should you do?
Option A:
. Replace the UpdatedTime and CreatedTime with the updated columns and data types as shown in the following table.



. Modify the synchronization anchor to use the min_active_rowversion() function.
Option B:
. Replace the UpdatedTime and CreatedTime with the updated columns and data types as shown in the following table.


. Modify the application to update the counter before and after synchronization.
Option C:
. Replace the UpdatedTime and CreatedTime with the updated columns and data types as shown in the following table.



. Modify the synchronization anchor to use the getdate() function.
Option D:
. Replace the UpdatedTime and CreatedTime with the updated columns and data types as shown in the following table.



. Modify the synchronization anchor to obtain the maximum value of the UpdateCounter or CreatedCounter columns across the database.
. Add one to the value obtained from the UpdateCounter or CreatedCounter columns and use that as the new value of the of the UpdateCounter or CreatedCounter column based on the operation performed


A. Option A
B. Option B
C. Option C
D. Option D


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
The application will be deployed on Windows 7 computers in the United States and Europe.
You need to ensure that array data is sorted based on the culture of the operating system.
What should you do?


A. Add a configuration setting to the appSettings section of the App.config file.
B. Use a comparison method to compare ASCII values.
C. Use the Resource Manager to create culture-sorted lists
D. Use a comparison method that specifies a Culturelnfo class or the CompareOptions enumeration parameter


Answer Clike
You are designing a complex and critical Windows desktop application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
You plan to implement a logging strategy for the application.
You need to record all unexpected errors that occur in the application.
What should you do?


A. . Subscribe to the unhandled exception event handler for the AppDomain object.
. Record relevant application-specific information to an external log.
B. . Subscribe to the unhandled exception event handler for the application’s dispatcher on the main application thread.
. Record relevant application-specific information to an external log.
C. . Create a generic catch (Exception e) block in the Main method of the application.
. Record relevant application-specific information to a log in the Main method.
D. . Create a global WIN 32 unhandled exception filter.
. Record relevant application-specific information to an external log from within the filter.


Answer Clike
You are making a Windows software by employing Microsoft .Net Framework 4 and Microsoft Visual Studio 2010.The business logic layer of the software is applied by using Windows Communication Groundwork(WCF). You produce a WCF services that consists of a single operation to upload big binary information files. You configure the binding of the WCF support to allow information streaming. You need to guarantee that the WCF service operation gets binary info files along with a string parameter that contains the description of each file. You create a service operation that gets a single parameter. What should you do following?


A. Implement the service parameter as a Serializable class that contains a property for the description of the file and another property for the content of the data file
B. Implement the service parameter as a DataContract class that contains a DataMember property for the description of the file and another DataMember property for the content of the data file.
C. Implement the service parameter as a MessageContract class that contains a MessageHeader property for the description of the file and a MessageBodyMember property for the content of the data file.
D. Implement the service parameter as a MessageContract class that contains a MessageBodyMember property for the description of the file and another MessageBodyMember property for the content of the data file.


Answer Clike
You are planning a Windows Presentation Basis (WPF) application for your organization by making use of Microsoft .Web Framework 4 and Microsoft Visual Studio 2010. The organization layer of the software is implemented by using Windows Communication Groundwork (WCF).
You plan to assistance non-repudiation and data integrity for WCF messages.
You need to style the security method for the software.
What really should you do?


A. Attach a digital signature to the WCF messages.
B. Encrypt the WCF messages by employing the Secure Sockets Layer (SSL) protocol.
C. Encrypt the WCF messages by employing the Internet Protocol Protection (IPSec) protocol.
D. Implement message-level security by using digital certificates as client computer credentials.


Answer Clike
You are developing an application by using Microsoft .NET Framework 4, The application will be used by all employees of your company, Local file stores on the computers are secure and inaccessible remotely.
You need to design a remote monitoring strategy to monitor the usage time of the application by each user.
What should you do?


A. Create a TraceLog object and the Trace object by using the System.Diagnostics element to trace startup, shutdown, and user idle time events throughout the application
B. Create a TraceLog object by using the System.Diagnostics element in the application configuration file. Add the TraceSource element for startup, shutdown, and user idle time events
C. Use the System.Management.Instrumentation namespace to publish startup, shutdown, and user idle time events of the application. Publish the events to Microsoft Operations Manager
D. Use the System.Management.Instrumentation namespace to issue event queries against methods that pass ProgressEvent and StoppedEvent arguments. Publish the events to the Event Log Correct


Answer Clike
You are designing an n-tier Windows application by using Microsoft .NET Framework 4, Microsoft Visual Studio 2010, and Microsoft SQL Server 2008. The application will replace an existing client/server application. The existing application was created by using Microsoft Visual Basic 6.0 and consists of a series of COM components that access a SQL Server database.
You plan to move the existing COM components into a Windows Communication Foundation (WCF) tier. You need to ensure that the COM components can be replaced without impacting the existing user interface (UI) tier.
You also need to ensure that the COM components can be replaced separately.
What should you do?


A. Create a common assembly on the UI tier of the new application to interface with the COM components.
B. Create a common assembly on the WCF tier of the new application to interface with the COM components
C. Use NET COM Interpol on the client tier to interact directly with the COM components until they are replaced by the managed code
D. Convert the Visual Basic 6.0 source code to managed code by using the Visual Studio converters.
Use these code components on the client/server application until they are replaced individually with the new permanent managed code functionality.


Answer Clike
You are upgrading a stand-alone Windows Presentation Foundation (WPF) application and an XAML browser application (XBAP) to Microsoft NET Framework 4 You plan to add NET 4 types and members to both applications. Both applications consume a common utility assembly that modifies files on a local file system. The utility assembly requires full trust.
You need to ensure that both applications can use the common utility assembly without any security-related exceptions.
What should you do?


A. Change the <supported Runtime> element for the WPF application to the NET Framework 35
B. Change the <supported Runtime> element for the XBAP application to the NET Framework 35
C. Apply the Allow Partially Trusted Callers attribute to the utility assembly
D. Apply the Allow Partially Trusted Callers Attribute to the XBAP application


Answer Clike
You are developing an application by using Windows Forms and Microsoft NET Framework 4. The user interface (UI) of the application can be resized. You need to ensure that the images in the application scale to the entire height and width of the UI without degradation.
What should you do?


A. Convert the images to PNG format.
B. Use a Picture Box control.
Set the Size Mode property to use auto-sizing.
C. Use an Element Host control.
Convert the images to XAML-based images.
D. Use a Picture Box control.
Add events to resize the control based on the size of the main UI form.


Answer Clike
You are debugging a Windows application that uses Windows Presentation Framework (WPF) and Microsoft Visual Studio 2010.
The application is deployed as an XAML browser application (XBAP). Some users report that they are not able to use the drag-and-drop functionality. You need to ensure that all users can use the drag-and-drop functionality.
What should you do?


A. Use loose XAML.
B. Require the Full Trust permission on the XBAP application.
C. Add the URL for the application to the browser’s trusted sites list.
D. Register the assembly that contains the Data Object objects to the GAG on all client computers.


Answer Clike
You are developing a Windows Application.
New features that require changes to be made to the database schema are added to the application every week.
You need to ensure that the changes made to the database schema do not require the application to be recompiled.
Which 2 actions should you perform?


A. Modify the XML mapping file when the schema changes occur
B. Modify the conceptual schema XML file when the schema changes occur
C. Build a storage model and use it to access data from the business entities
D. Build a conceptual model and use it to access data from the business entities


Answer Clike
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?


A. Create a conceptual model and a storage model based on the existing version of the WCF service
B. Create a storage model based on the business model.
Use a class generated from the storage model for programming
C. Create a storage model based on the schema of the existing WCF service.
Update the mapping file when the new version of the WCF service is available
D. Create a conceptual model based on the business model.
Use a class generated from the conceptual model for programming.
Update the mapping file when the new version of the WCF service is available


Answer Clike
You are designing a data access layer (DAL) for an application. Conflicts are occurring in the SQL Server database due to concurrent updates. You need to design a database locking strategy that meets the following requirements:
Resolves concurrent update conflicts without loss of data
Ensures that data conflicts can be resolved by users
Locks only the necessary data for updates
What should you do?


A. Use optimistic locking.
Terminate the update when a DB Concurrency Exception occurs
B. Use pessimistic locking.
Terminate the update when a DB Concurrency Exception occurs
C. Use pessimistic locking.
Retry the failing update operation in the DB Concurrency Exception handler until it succeeds.
D. Use optimistic locking.
In the DB Concurrency Exception handler, display the data of both original and updated records to the user. Allow the user to resolve the conflicts.


Answer Clike
You have developed a Windows Forms server application.
Client applications connect to the server application to receive streaming media on demand on a single server.
Each incoming connection is launched on a separate thread, As the number of client applications increases, users report that connection attempts fail. You need to ensure that users can connect to the server application even when the number of clients increase.
What should you do?


A. Add additional RAM to the server
Increase the size of the thread pool
B. Add additional RAM to the server.
Decrease the size of the thread pool
C. Install a network load balancer
Increase the size of the connection pool
D. Install a network load balancer
Decrease the size of the connection pool


Answer Clike
You are packaging updates for multiple Windows Presentation Foundation (WPF) applications. Updates to the applications and to third-party control files are available. Updates to the applications have dependencies upon updates to the third-party control files. An update script is run at logon that allows only a single command to be executed. You need to package the application updates and updates to the third-party controls to ensure that they are successfully installed.
What should you do?


A. Package application updates as a single Installer.
Package third-party control files as a merge module
B. Package application updates as a single Installer.
Package third-party control files as a separate installer
C. Prepare the installers for individual application updates and include the third-party control files as individual Ides
D. Prepare the installers for individual application updates and include the third-party control files as a merge module


Answer Clike
You are designing a Windows application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
You plan to implement control caching to improve the loading time of a control. It is not required to refresh the content of the control after the application loads. The application will be compiled by using the .NET 4 client profile.
You need to ensure that the following requirements are met:
The control is reusable in multiple forms.
Data in the control is cached when the application is loaded.
What should you do?


A. In the Load event of the application window, add code to load the control. Save the control to an instance variable.
B. In the Load event of the application window, add code to load the control. Save the control to the cache by using objects in the System.Web.Caching namespace
C. In the constructor of the application window, add code to load the control. Save the control to a static variable
D. In the constructor of the application window, add code to load the control. Save the control to the cache by using objects in the System.Web.Caching namespace


Answer Clike
You are designing a distributed Windows Presentation Foundation (WPF) application.
You have the following requirements:
Ensure that all errors are logged in a central location. Ensure that the WPF application logs related errors within a single transaction. Secure error information during transmission.
You need to recommend a strategy for collecting error information.
What should you recommend?


A. Write the information to the Windows Application log on each client system. Use Windows Error Reporting to collect the results.
B. Write the information to the Windows Application log on each client system. Use Windows Management Instrumentation (WMI) to collect the results.
C. Create a Windows Communication Foundation (WCF) service. Use the basicHttpBinding protocol to transport the information.
D. Create a Windows Communication Foundation (WCF) service. Use the wsHttpBinding protocol to transport the information.


Answer Clike
You are preparing to deploy a solution that includes a Windows Forms application and several COM components. Unsigned interop assemblies have been created for each of the COM components.
You need to recommend an approach for deploying the solution.
What should you recommend?


A. Deploy the windows Forms application and interop assemblies to a folder on the client computer. Sign the interop assemblies.
B. Deploy the Windows Forms application and COM components to a folder on the client computer. Deploy the interop assemblies to the Global Assembly Cache (GAC).
C. Deploy the Windows Forms application, COM components, and interop assemblies to a folder on the client computer. Register the COM components.
D. Deploy the Windows Forms application to a folder on the client computer. Deploy the COM components and interop assemblies to the Global Assembly Cache (GAC). Register the COM components.


Answer Clike
You are designing a Windows Forms application. The application connects to a Microsoft SQL Server 2008 database.
You need to recommend an approach for retrieving and logging all informational messages and error messages reported by the database. What should you recommend?


A. Retrieve informational messages in a SqlException object. Retrieve error messages by creating a handler for the InfoMessage event.
B. Retrieve informational messages by creating a handler for the InfoMessage event. Retrieve error messages in a SqlException object.
C. Retrieve informational messages and error messages by creating a handler for the InfoMessage event.
D. Retrieve informational messages and error messages in a SqlException object.


Answer Clike
You are designing a distributed application that will be deployed to 5,000 users worldwide. Servers on five continents will host the Web services and the Microsoft SQL Server 2008 databases that support the application.
You have the following requirements:
Collect information about all errors associated with the application. Store and view all error information in a centralized location. Minimize the network bandwidth required for the transfer of error information.
You need to recommend a strategy for reporting error information.
Which strategy should you recommend?


A. Write error messages to the SQL Server databases. Synchronize the databases by using merge replication.
B. Write error messages to the event logs on the local computers. Use Windows Error Reporting to view the error information.
C. Write error messages to the SQL Server databases. Synchronize the databases by using transactional replication.
D. Write error messages to the event logs on the local computers. Use Windows Management Instrumentation (WMI) to view the error information.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application. Business entity objects are bound to controls on each data entry window.
The WPF application must meet the following requirements:
Display a watermark in each empty text box.
Display watermarks in a lighter color than user entries.
The watermark code must be reusable with other user interface controls. You need to recommend an approach for creating the watermarks.
What should you recommend?


A. Modify each business entity object to return the watermark text if the property has no data.
B. Attach a custom attached property and an Adorner to each text box.
C. Create a value converter to format the bound value of the business entity objects.
D. Create handlers for the OnFocus and OnFocusLost events of the text boxes in the code-behind.


Answer Clike
You are designing a Windows Forms application that allows users to search a product catalog and place orders. You have the following requirements: Display a progress indicator while the application is searching the catalog.
Ensure that users can cancel search operations.
You need to recommend an approach that meets the requirements.
What should you recommend?


A. Use a BackgroundWorker component to perform the search.
B. Implement the search as a Windows Communication Foundation (WCF) service by using the AsyncPattern property of the OperationContract attribute.
C. Implement the search as a duplex service.
D. Execute the search on the user interface thread. Provide a Cancel button to cancel the search.


Answer Clike
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4.
The application allows users to view product details. Product managers can modify the product details for the products that they manage.
You plan to design the application by using the Model-View-ViewModel (M-V-VM) pattern.
You need to ensure that the product details can be viewed by all users and modified only by product managers.
What should you do?


A. . Create a separate StackPanel in the window to modify data.
. Create a separate StackPanel in the window to view data.
B. In the ViewModel, disable all input controls if the user’s role is not a Product Manager.
C. Create a separate window to modify data.
. Create a separate window to view data
D. In the ViewModel, hide all input controls if the user’s role is a Product Manager.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application. The application calls methods that perform long-running computational tasks.
You need to recommend an approach for ensuring that the application remains responsive while the tasks are executing.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)


A. Use synchronous method calls from a thread other than the thread on which the user interface runs.
B. Run the user interface from a new multi-threaded apartment (MTA) thread.
C. Use synchronous method calls from the user interface thread.
D. Use asynchronous method calls from the user interface thread.


Answer Clike
You are designing an n-tier solution that includes a Windows Presentation Foundation (WPF) client application. The WPF application connects to a middle-tier server that runs the data access layer. The data access layer connects to a Microsoft SQL Server 2008 database and to a mainframe-based database.
The mainframe-based database will be replaced in one year. You have the following requirements:
Centrally manage all database connections.
Minimize changes to the code base when the database is replaced.
Ensure that the WPF application will not need to be redeployed when the database is replaced.
You need to recommend an approach for designing the data access layer.
What should you recommend?


A. Create a data access layer class that uses a database factory class to access all databases. Add the connection string information for the databases to the configuration file for the WPF application
B. Add the connection string information for the databases to the configuration file for the WPF application. Implement one class in the WPF application for each data source.
C. Create a data access layer class that uses a database factory class to access all databases. Add the connection string information for the databases to the configuration file for the data access layer class.
D. Add the connection string information for the databases to the configuration file for the WPF application. Implement a database factory class from within the WPF application.


Answer Clike
You are designing a Windows application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
You need to use a replacement culture for the application at runtime. You also need to ensure that the information in the custom culture will be available to the application.
Which two tasks should you perform? (Each correct answer presents part of the solution. Choose two.)


A. Restart the process that is displaying the user interface,
B. Register the replacement culture by using the CultureAndRegionlnfoBuilder class.
C. Register the replacement culture by using the Culturelnfo class.
D. Call the Save method of the CultureAndRegionlnfoBuilder class instance.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application that will be used to display real- time data from a Microsoft SQL Server 2008 database. You need to recommend an approach for displaying the data.
Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)


A. Implement Oneway binding between the controls in the WPF application and objects in the data layer.
B. Implement OneWayToSource binding between the controls in the WPF application and objects in the data layer.
C. Use a SqlCacheDependency object in the data layer to query the database when a change is detected.
D. Use a System.Runtime.Caching object in the data layer with a sliding expiration, and query the database when the Cache object expires.


Answer Clike
You are working with an existing Windows Presentation Foundation (WPF) application in Microsoft Visual Studio 2010. The WPF application requires approximately one minute to initialize before displaying its main window.
You have the following requirements:
Immediately display a splash screen when the WPF application launches. Allow for the display of an initialization progress bar on the splash screen. Close the splash screen when the WPF application is ready to display the main window.
You need to recommend an approach for meeting the requirements.
What should you recommend?


A. Launch a custom splash screen by using a Window object. When the initialization completes, launch the main window from the splash screen.
B. Create a SplashScreen object. Display the object in the code-behind of the App.xaml file.
C. Move the initialization code to the code-behind of the main window.
D. Compile an image into the WPF application with a Build Action value of SplashScreen.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application that uses .NET Framework 4.
The application uses a subset of the functionality provided by a third-party COM component that will be replaced later.
The application developers must have access to only the required subset of functionality.
You need to recommend a solution that meets the requirements.
Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)


A. Create an adapter assembly that exposes the entire functionality of the COM component.
B. In the adapter assembly, use an embedded interop reference.
C. In the adapter assembly, use a standard interop reference.
D. Create an adapter assembly that exposes the required subset of the COM component functionality.


Answer Clike
You are designing a Windows application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The business logic layer of the application is implemented by using Windows Communication Foundation (WCF).
You create a duplex bidirectional WCF service that contains a single operation. The service operation sends the result back to the client application by using a two- way callback operation.
You plan to design a service interaction strategy.
You need to ensure that deadlocks are prevented.
What should you do?


A. Configure the CallbackBehaviorAttribute attribute to use the Reentrant or Multiple concurrency mode in the callback class.
B. Configure the ServiceBehaviorAttribute attribute to use the Reentrant or Multiple concurrency mode in the service class.
C. Configure the ServiceBehaviorAttribute attribute to use the Synchronization context in the service class.
D. Configure the CallbackBehaviorAttribute attribute to use the Synchronization context in the callback class.


Answer Clike
You are designing a Windows Presentation Foundation (WPF) application that accesses a Microsoft SQL Server 2008 database.
You must ensure that database administrators can change the structure of database tables without requiring redeployment of the WPF application.
You need to recommend a data modeling and data access strategy.
What should you recommend?.


A. Model the data layer by using DataSet objects with automatically generated Create, Read, Update, and Delete (CRUD) statements.
B. Model the data layer by using custom data access objects. Access the database by using stored procedures.
C. Model the data layer by using LINQ to SQL with attribute-based mapping of objects to tables.
D. Model the data layer by using typed DataSet objects with automatically generated Create, Read, Update, and Delete (CRUD) statements


Answer Clike
You are designing an application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
The application includes Windows Workflow Foundation (WF) hosts that run thousands of workflow instances. Workflows usually take 2 hours of time to complete. The application also includes a Windows Communication Foundation (WCF) service that contains a method to check the completion status of a workflow stored in a database.
External applications that use the WCF service to check the status of workflows every minute causes performance degradation of the workflow that hosts the application.
You need to eliminate the performance degradation caused by workflow status checks.
What should you do?


A. Cache the status of the workflow.
. Assign a callback function based on a SqlDependencyobject.
. Reload the cache in the callback function.
B. Cache the status of the workflow.
. Set the expiry time of the Cache object to 30 minutes.
C. Create a status checking workflow.
. Return the status of the original workflow to the external application in 30 minute intervals.
D. Create a status checking workflow.
. Return the status of the original workflow to the external application after 10 requests have been made.


Answer Clike
You are analyzing a Windows client application that uses Microsoft Visual Studio 2010 and Microsoft SQL Server 2008.
The application updates two database tables from the main user interface (UI) thread. You need to ensure that the following requirements are met:
The database tables are either updated simultaneously or not updated at all.
Users are notified of the success or failure of the updates.
Users are able to perform other tasks during the update process.
What should you do?


A. . Use TransactionScope in a using block on the UI thread.
. Batch the database updates by setting the DbDataAdapter.UpdateBatchSize property to 2.
B. . Move the database update logic to a BackgroundWorker thread.
. Ensure that the thread is enclosed in a TransactionScope using block in the BackgroundWorker DoWork method.
C. . Use TransactionScope in a using block on the main thread.
. Create a BackgroundWorker thread within the block.
. Move the database updates to the BackgroundWorker DoWork method.
D. . Use TransactionScope in a using block on the UI thread.
. Create a DependentTransaction object within the block and pass the object to the BackgroundWorker ReportProgress method
. Use the object in the ReportProgress method to create a new TransactionScope block.


Answer Clike
You are designing a .NET Framework 4 solution. The solution contains a Windows Presentation Foundation (WPF) application and a Windows Communication Foundation (WCF) Web service. The WPF application uses the WCF Web service to store data in a Microsoft SQL Server 2008 database.
You have the following requirements:
Ensure that the WPF application functions while users’computers are offline. Minimize the time spent sending data to the WCF Web service.
Minimize disk space requirements for data storage.
You need to recommend an approach for synchronizing data between the WPF application and the database.
Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)


A. Store data in custom business objects. Serialize data locally by using custom serialization.
B. Create a local caching solution that periodically checks for Internet connectivity and writes directly to the local data store and to the WCF Web service.
C. Create a local caching solution that periodically checks for Internet connectivity, uses local memory, and batches changes to the WCF Web service.
D. Store data in DataSet objects. Serialize data locally by using XML serialization.


Answer Clike