You create a Windows application by using the .NET Framework 3.5. The application is used by the employees and managers of a bank. You plan to implement role-based security for the application by using the Identity and Principal features provided by the .NET Framework 3.5. You need to ensure that application meets the following requirements:
* All users are authenticated against credentials stored in the application database.
* Only the managers can access certain features in the application.
What should you do?
You are creating a Windows application by using the .NET Framework 3.5. The application uses a Web Service to allow managers to retrieve employee performance data. The application allowsmanagers to access and modify data offline. The employee performance data is sensitive and must be protected. You need to implement an offline storage strategy. What should you do?
You create Windows Forms applications by using the .NET Framework 3.5. You plan to deploy a new application. You need to ensure that on deployment, the application meets the following requirements:
* It is executed on the client computer.
* It is removed from the client computer after the application is closed.
* It is not displayed in the Add/Remove programs panel on the client computer.
What should you do?
You create Windows Forms applications by using the .NET Framework 3.5. You create a new application for Windows Vista client computers. The application requires elevated access to read files from the local file system. You need to ensure that the application requires elevated permissions on execution. What should you do?
You create Windows Forms applications by using the .NET Framework 3.5. You plan to use the Windows Installer to deploy a new application. The application must meet the following requirements:
* Support deployment to 32-bit and 64-bit operating systems.
* Use the 64-bit Program Files folder when deployed to 64-bit platforms.
You need to ensure that the application is deployed appropriately.What should you do?
You are creating a Windows Forms application that has the print functionality by using the .NET Framework 3.5. You implement the PrintPage page event for the form. You associate an instance of the PrintDocument control along with an instance of the PrintPreviewDialog control named prevDialog1. You want to set the default size of the PrintPreviewDialog class to full screen. You need to provide a print preview for the user by adding a code segment to the Click event of the button on the form. Which code segment should you use?
You are creating a Windows application by using the .NET Framework 3.5. The application processes a large number of records. The records are processed on a separate thread. Occasionally, the record processing takes a long time. You add a Cancel button to the form. You also add an AutoResetEvent object on the user interface thread, and set the default value of the object to false. You plan to perform the following steps in sequence:
* After every record is processed, read the value of the AutoResetEvent object by using the AutoResetEvent.WaitOne method.
* When the value of the AutoResetEvent object is True, discontinue the record processing.
You need to modify the Click event handler of the Cancel button to change the value of the AutoResetEvent object. What should you do?
You are creating a Windows Forms application by using the .NET Framework 3.5. You have implemented the PrintPage event to send the page output to the printer. The users must select the printer and the page range before printing. You need to ensure that users can print the content of the form by clicking the button control. Which code segment should you use?
You are creating a Windows application for graphical image processing by using the .NET Framework 3.5. You create an image processing function and a delegate. You plan to invoke the image processing function by using the delegate. You need to ensure that the calling thread meets the following requirements:
* It is not blocked when the delegate is running.
* It is notified when the delegate is complete.
What should you do?
You are creating a Windows application by using the .NET Framework 3.5. You plan to create a form that might result in a time-consuming operation. You use the QueueUserWorkItem method and a Label control named lblResult. You need to update the users by using the lblResult control when the process has completed the operation. Which code segment should you use?