What should you do to find out the precise number of nanoseconds that were consumed by the call to the compone
You are an enterprise application developer. You create a Web Service that provides methods which return the values of a series of calculations. You identify performance problems in a component within the calculations. You need to find out the precise number of nanoseconds that were consumed by the call to the component. What should you do?
How should you accomplish this goal?
You create Web-based client applications. You are creating a data access component. Several Web user controls will use the component to populate bound controls from a data source. The data source has end-user inputs. You need to ensure that the data source communicates all relevant information to the Web user controls that call your component. How should you accomplish this goal?
Which code segment should you use?
A Windows Forms application contains the following code segment.
string SQL = @”SELECT EmployeeID, LastName, FirstName FROM Employees”;
SqlDataAdapter da = new SqlDataAdapter(SQL, connStr);
DataTable dt = new DataTable();
da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
SqlCommandBuilder bld = new SqlCommandBuilder(da);
da.Fill(dt);
The application allows the user to add rows to the data table. The application will propagate these additions to the database. If the addition of any row fails, the other rows must still be added. The code must log how many new rows failed to be added. You need to propagate the additions to the database and log a failed count.
Which code segment should you use?
should you use?
You are an enterprise application developer. You create a Web-based application and deploy it to your customers. The application requires the users to log on to use the application. The application does not permit impersonation. The application also requires the users to connect to the database and to a folder in the Web server. Your customers report a security bug. The bug denies access to the logged-on users every time they try to upload a file to the folder in the Web server. Your customers provide you with the following data to reproduce the bug: The version of the Web-based applicationThe users steps in the Web-based applicationThe version of the operating system You find that the information is insufficient to reproduce the bug. You need to identify the additional information that is required to reproduce the bug. Which two additional data
should you use? (Each correct answer presents part of the solution. Choose two.)
Which design feature should you choose?
You create Web-based client applications. You are creating a component named Product. The component will represent data in the products table of a database. The ProductID field is the primary key of the products table. The Product ID is an integer value that is generated by the database. The products table contains two fields named ProductName and CurrentPrice, which do not accept null values. You need to design an interface for the Product class. You also need to ensure that upon instantiation the component will either retrieve an existing product from the database or add a new record to the products table. Which design feature should you choose?
What should you do?
You are creating a Windows Forms application. The application executes a stored procedure that takes several seconds to complete. The stored procedure is invoked to populate a SqlDataReader object. You need to ensure that the application remains responsive to the user while the stored procedure is executing.
What should you do?
What should you do?
You are an enterprise application developer. You plan to design a monitoring mechanism for a Web service. The Web service contains a method named Forecast that uses a complex algorithm to forecast weather. The algorithm generates a number of exceptions. Administrators are responsible for shutting down the service when the number of exceptions is greater than 50 for every 10 seconds. You need to monitor the number of exceptions that are generated by the Forecast method during the execution of the Web service. What should you do?
What should you do?
You develop Web-based client applications. You are developing a custom Web control named ShoppingCart. The ShoppingCart control tracks the products in a users shopping cart. The ShoppingCart control contains a read-only property named SubTotal. The pages that use the ShoppingCart control compare the SubTotal property with the users credit limit before attempting to add any new items to the users shopping cart. The ShoppingCart control also contains display properties, such as Font, Color, and DisplayDirections. These properties are not critical to the functionality of the control. You need to establish how to implement the SubTotal property and the display properties in the ShoppingCart control. What should you do?
<?xml version="1.0"?
A Windows Forms application reads the following XML file.
<?xml version=”1.0″?>
<x:catalog xmlns:x=”urn:books”>
<book id=”bk101″>
<author>Gambardella, Matthew</author>
<title>XML Developer’s Guide</title>
</book>
<book id=”bk102″>
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
</book>
</x:catalog>
The form initialization loads this file into an XmlDocument object named docBooks. You need to populate a ListBox control named lstBooks with the concatenated book ID and title of each book.
Which code segment should you use?
What should you do?
You are an enterprise application developer. You are reviewing a code segment in a Windows Forms application that invokes a Web service asynchronously. You discover that there is no implementation of exception handling. You need to implement exception handling for the application and log the error in the event log by using the minimum amount of coding effort.
What should you do?