Vous êtes sur la page 1sur 5

Developing and Implementing Web Applications with MS C# .

NET

Exam Questions, Answers, Braindumps (70-315)

I passed it easily. I suggest www.examcheets.com .All the questions in the exam were from it.

1. You create an ASP.NET application that produces sales reports. The sales data is stored in a
Microsoft SQL Server database that is used for transaction processing. The application consists
of complex Transact-SQL statements. Many users report that the report generation is taking
longer to run each day. You need to improve response times. What are two possible ways to
achieve this goal? (Each correct answer presents a complete solution. Choose two)

A. Use an OleDbDataAdapter indexes exist on the SQL Server tables.

B. Ensure that appropriate indexes exist in the SQL Server tables.

C. Rewrite your SQL statements to use aliases for all table names.

D. Rewrite your direct SQL statements as stored procedures and call the stored procedures from
your application.

E. Configure queries to run in the security context of the user who is running the query.

Answer: B, D

2. You are creating an order entry application. You set Orders.aspx as the start page. You want
users to log on to Orders.aspx by supplying a user name and password. You create a Login.aspx
page to validate the user name and password. You need to ensure that users log on by using
Login.aspx before they are allowed to access Orders.aspx. Which two courses of action should
you take? (Each correct answer presents part of the solution. Choose two)

A. In the authentication section of the Web.config file, set the mode attribute of the
authentication element to Forms. Set the name attribute of the forms element to Login.aspx.

B. In the authentication section of the Web.config file, set the mode attribute of the
authentication element to Forms. Set the loginUrl attribute of the forms element to Login.aspx.

C. In the authorization section of the Web.config file, set the users attribute of the deny element
to “?”:

D. In the credentials section of the Web.config file, set the users attribute of the dent element to
“?”.

E. In the credentials section of the Machine.config file, set the users attribute of the deny
element to “*”.

F. In the authorization section of the Machine.config file, set the mode attribute of the
authentication element to Forms. Set the policyFile attribute of the trust element to Login.aspx.

G. Create a Page directive in Orders.aspx to load the Login.aspx page.

Answer: B, C
3. You create an ASP.NET application named Inventory. This application will be used by
customers on the Internet. During the beta test period, you ensure that the actual ASP.NET error
message is displayed whenever an error is encountered. Both developers and beta testers see
the actual text of the error message. You perform beta testing of other applications on the same
beta test server during the beta testing period for Inventory. All of the other applications display
ASP.NET error messages. After the beta testing period is complete, the beta test server is
promoted to a production server. You want all applications to display a single, user-friendly error
message. You want to configure Inventory and the production server to meet these goals. You
want to perform this task by using the minimum amount of administrative effort. Which two
actions should you take? (Each correct answer presents part of the solution. Choose two)

A. Set the mode parameter of the customErrors element in the Web.config file for Inventory to
“On”.

B. Remove the customErrors element from the Web.config file for Inventory.

C. Set the mode parameter of the customErrors element in the Inventory.config file to “On”.

D. Remove the customErrors element from the Inventory.config file.

E. Set the mode parameter of the customErrors element in the Machine.config file to “On”.

F. Remove the customErrors element from the Machine.config file.

Answer: B, E

4. You use Visual Studio .NET to develop a Windows-based application that will interact with a
Microsoft SQL Server database named FolksTecSrv. Your application will display employee
information from a table named Employees. You use ADO.NET to access the data from the
database. To limit the possibility of errors, you must ensure that any type mismatch errors
between your application code and the database are caught at compile time rather than at run
time. Which two actions should you take? (Each correct answer presents part of the solution.
Choose two)

A. Create an XML schema for Employees.

B. Create an XML style sheet for Employees.

C. Create an XML namespace for Employees.

D. Create a typed DataSet object based on the XML schema.

E. Create a typed DataSet object based on the XML style sheet.

F. Create a TypeDelegator class based on the XML namespace.

Answer: A, D

5. You are creating an ASP.NET application for FolksTec. Customers will use the application to
file claim forms online. You plan to deploy the application over multiple servers. You want to
save session state information to optimize performance. What are two possible ways to achieve
this goal? (Each correct answer presents a complete solution. Choose two)

A. Modify the Web.config file to support StateServer mode.


B. Modify the Web.config file to support SQLServer mode.

C. Modify the Web.config file to support InProc mode.

D. In the Session_Start procedure in the Global.asax file, set the EnableSession property of the
WebMethod attribute to true.

E. In the Session_Start procedure in the Global.asax file, set the Description property of the
WebMethod attribute to sessionState.

Answer: A, D

6. You create an ASP.NET application named Inventory. This application will be used by
customers on the Internet. During the beta test period, you ensure that the actual ASP.NET error
message is displayed whenever an error is encountered. Both developers and beta testers see
the actual text of the error message. You perform beta testing of other applications on the same
beta test server during the beta testing period for Inventory. All of the other applications display
ASP.NET error messages. After the beta testing period is complete, the beta test server is
promoted to a production server. You want all applications to display a single, user-friendly error
message. You want to configure Inventory and the production server to meet these goals. You
want to perform this task by using the minimum amount of administrative effort. Which two
actions should you take? (Each correct answer presents part of the solution. Choose two)

A. Set the mode parameter of the customErrors element in the Web.config file for Inventory to
“On”.

B. Remove the customErrors element from the Web.config file for Inventory.

C. Set the mode parameter of the customErrors element in the Inventory.config file to “On”.

D. Remove the customErrors element from the Inventory.config file.

E. Set the mode parameter of the customErrors element in the Machine.config file to “On”.

F. Remove the customErrors element from the Machine.config file.

Answer: B, E

---------------------------------------

QUESTION: 1
You use Visual Studio .NET to create a Windows-based application. The application includes a form
named FolksTechForm. FolksTechForm contains 15 controls that enable users to set basic
configuration options for the application. You design these controls to dynamically adjust when
users resize FolksTechForm. The controls automatically update their size and position on the form
as the form is resized. The initial size of the form should be 659 x 700 pixels. is resized to be
smaller than 500 x 600 pixels, the controls will not be displayed correctly. You must ensure that
users cannot resize ConfigurationForm to be smaller than 500 x 600 pixels. Which two actions
should you take to configure FolksTechForm? (Each correct answer presents part of the solution.
Choose two)
A Set the MinimumSize property to “500,600”.
B Set the MinimumSize property to “650,700”.
C Set the MinimizeBox property to True.
D Set the MaximumSize property to “500,600”.
ESet the MaximumSize property to “650,700”.
FSet the MaximumBox property to True.
G Set the Size property to “500,600”.
H Set the Size property to “650,700”.
Answer: A, H

QUESTION: 2
You development team used Visual Studio .NET to create an accounting application, which
contains a class named FolksTechAccounts. This class instantiates several classes from a COM
component that was created by using Visual Basic 6.0. Each COM component class includes a
custom method named ShutDownObject that must be called before terminating references to the
class. Software testers report that the COM component appears to remain in memory after the
application terminates. You must ensure that the ShutDownObject method of each COM
component class is called before FolksTechAccounts is terminated. What should you do?
A Add code to the Terminate event of FolksTechAccounts to call the ShutDownObject method of
each COM component class.
B Find each location in your code where a reference to FolksTechAccounts is set to null or goes
out of scope. Add code after each instance to manually invoke the Visual Studio .NET garbage
collector.
C Add a destructor to FolksTechAccounts. Add code to the destructor to call the ShutDownObject
method of each COM component class.
D Add the procedure private void Finally() to FolksTechAccounts. Add code to the procedure to
call the ShutDownObject method of each COM component class.
Answer: C

QUESTION: 3
You use Visual Studio .NET to develop a Windows-based application. Your application includes a
form named FolksTechInformationForm, which enables users to edit information stored in a
database. All user changes to this information must be saved in the database. You need to write
code that will prevent FolksTechInformationForm from closing if any database changes are left
unsaved. What should you do?
A Include this.Activate in the Closing event handler of FolksTechInformationForm.
B Include this.Activate in the Closed event handler of FolksTechInformationForm.
C Include this.Activate in the Leave event handler of FolksTechInformationForm.
D Change a property of the System.ComponentModel.CancelEventArgs parameter in the Closing
event handler of FolksTechInformationForm.
EChange a property of the System.EventArgs parameter in the Closed event handler of
FolksTechInformationForm.
FChange a property of the System.EventArgs parameter in the Leave event handler of
FolksTechInformationForm.
Answer: D

QUESTION: 4
You develop a Windows-based application that enables users to update customer contact
information. Your application uses a DataSet object to maintain the customer data while users are
reviewing and editing it. When a user finishes updating the data, your application uses the
DataSet.WriteXml method to create an XML data file. The tag name of the root element of the
XML data file must be <FolksTechCustomerInfo>. You need to add code to your application to
ensure that this tag name is set correctly. Which code segment should you use?
A dsCustomer.Namespace = “FolksTechCustomerInfo”
B dsCustomer = New DataSet(“FolksTechCustomerInfo”)
C dcCustomer.Prefix = “FolksTechCustomerInfo”
D dsCustomer.WriteXml(“FolksTechCustomerInfo”)
Answer: A
QUESTION: 5
You use Visual Studio .NET to develop a Windows-based application named dvocate Resource
Assistant (ARA): ARA contains a class named Client. The Client lass is defines by the following
code segment:
namespace FolksTech..Buslayer {
public class Client {
public string GetPhone(int ClientID) {
// More code goes here.
}
// Other methods goes here.
}
}
The client class is invoked from ARA by using the following code segment:
Client client = new Client();
TxtPhone.Text = client.GetPhone(426089);
When you try to build your project, you receive the following error message: “Type Client’ is not
defined”. What are two possible ways to correct this problem? (Each orrect answer presents a
complete solution. Choose two)
A Fully qualify the Client class with the FolksTech.BusLayer namespace.
B Fully qualify the Client class with the ARA namespace.
C Add a using statement for the FolksTech.BusLayer namespace in the ClientForm class.
D Inherit the FolksTech.BusLayer namespace in the ClientForm class.
Answer: A, C

Vous aimerez peut-être aussi