Pages

Monday, 21 September 2015

ADO.Net Online Quiz Questions And Answers

31. Which statement about the Web.Config file is the most accurate 
A. The Web.Config file can be only placed in the root of a Web Site to override settings in theMachine.Config file for all applications in a particular Web Site
B. The Web.Config file can only be placed in the root of a particular virtual directory
C. The Web.Config file can be placed in the root of the Web Site and the root of a virtual directory. The settings from the file in the virtual directory overrides the settings from the file in the Web Site
D. The Web.Config file can be placed in the root of the Web Site and the root of a virtual directory and in any subdirectory of an application. The settings from a file at a particular level override the settings from the ones above it.
Ans: D

32. The settings in the Web.Config file are case-sensitive
A. True
B. False
Ans:

33. The settings in the Web.Config file can be configured to apply to
A. An application
B. An application or a particular directory
C. An application or a particular directory or even an individual file
D. The Web.Config file always applies to all pages in the current directory and its subdirectories
Ans: C

34. Is there a way to prevent configuration settings in a Web.Config file from being overridden by aWeb.Config file located below it
A. Yes, you can use the allowOverride attribute in the <location> tag to prevent configuration settings in a Web.Config file from being overridden by a Web.Config file located below it
B. Yes, you can use the <PreventOverride> tag to prevent configuration settings in aWeb.Config file from being overridden by a Web.Config file located below it
C. If a Web.Config file exist at a particular level then all settings in the Web.Config file located above it are always ignored
D. You cannot have more than one Web.Config file in an ASP.NET application
Ans: A

35. If you have an ASP.NET application with cookieless sessions enabled, which statement among the
A. You cannot use relative URL's with cookieless sessions
B. You cannot use absolute URL's with cookieless sessions
C. Cookieless sessions have no relation with URL's
D. You cannot have cookieless sessions with an ASP.NET application
Ans: B

36. You are part of a team that is using Visual Studio .NET to develop a Web application. You have placed a number of configuration settings for the application in the server's Machine.config file. You learn in a meeting that one of your co-workers has created a Web.config file to store these settings, though in comparing notes you realize that you and your co-worker have used different settings. 
Which of the following describes what will happen when you execute the application
a. The application will run correctly and will use the settings in the Web.config file, ignoring theMachine.config settings
b. The application will run correctly and will use the settings in the Machine.config file, ignoring the Web.config settings
c. The application will not run correctly until you either remove the Web.config file or delete the settings from the Machine.config file
d. The application will run correctly, using only the settings that are identical in the Web.configand Machine.config files
e. The application will not run correctly until you modify either the Web.config file or theMachine.config file so that the application settings are identical
Ans: A

37. You are preparing to deploy an ASP.NET Web application. You are currently creating the deployment project. You have started the Web setup project, which is namedAccountManagerDeploy, and added the application output to the project, and now you need to set the directory on the Web server to which the application will be installed. Which of the following procedures should you use to do so (Choose two. Each correct answer presents part of the solution.)
A. Set the VirtualDirectory property in the Properties window.
B. Select the Web Application Folder in the File System Editor.
C. Select the AccountManagerDeploy project in the Solution Explorer.
D. Set the Folder property in the Properties window.
E. Select the Primary output from AccountManagerDeploy icon in the Solution Explorer.
Ans: A, B

38. You are part of a team that is using Visual Studio .NET to develop a Web application. You are looking through the files in the application, and you see the following files: 
createmembership.aspx
createmembership.aspx.vb
Which two of the following statements most accurately describe these two files (Select two.)
A. The createmembership.aspx.vb file is a Web form, which displays a user interface to the user
B. The createmembership.aspx file is a code file, which contains code that interacts with the user interface in the Web form
C. The createmembership.aspx file is an uncompiled file that will become createmembership.aspx.vb when it is compiled
D. The createmembership.aspx.vb file is a code file, which contains code that interacts with the user interface in the Web form
E. The createmembership.aspx file is a Web form, which displays a user interface to the user
F. The createmembership.aspx.vb file is the compiled version of createmembership.aspx
Ans: D, E

39. You are using Visual Studio .NET to develop a Web application. You are beginning to debug your application, and you would like to store debug messages in the Windows event log as you proceed with testing. Which of the following will allow you to do so
A. TextWriterTraceListener
B. DefaultTraceListener
C. EventLogTraceListener
D. TraceSwitch
Ans: C

40. You are using Visual Studio .NET to develop a Web application for a large video rental store. The titles, as well as other information about the store's videotapes, laser disks, DVDs, and audio books, are stored in a SQL Server 2000 database. 
The store wants to allow visitors to its Web site to browse the list of titles sorted in various ways, such as by medium (VHS, DVD, etc.), genre, director, and so on. You have created a number of stored procedures to facilitate the different ways of presenting the data. 
Given an existing DataSet named dsVids and a Connection named conn, which of the following code examples illustrates the correct way to call the stored procedure named ListDVDTitles that returns the list of DVD titles
A. Dim daDVDList as New SqlDataAdapter()
daDVDList.SelectCommand = New SqlCommand()
daDVDList.SelectCommand.Connection = conn
daDVDList.SelectCommand.CommandText = "ListDVDTitles"
daDVDList.SelectCommand.CommandType = CommandType.StoredProcedure
daDVDList.Fill(dsVids, "Titles")

B. Dim daDVDList as New SqlDataAdapter()
daDVDList.SelectCommand = New StoredProcedure()
daDVDList.SelectCommand.Connection = conn
daDVDList.SelectCommand.CommandText = "ListDVDTitles"
daDVDList.SelectCommand.CommandType = CommandType.SQLCommand
daDVDList.Fill(dsVids, "Titles")

C. Dim daDVDList as New SqlDataAdapter()
daDVDList.SelectCommand = New SqlCommand()
daDVDList.SelectCommand.Connection = "ListDVDTitles"
daDVDList.SelectCommand.CommandType = CommandType.StoredProcedure
daDVDList.Fill(dsVids, "Titles")

D. Dim daDVDList as New SqlDataAdapter()
daDVDList.SelectCommand = New SqlCommand()
daDVDList.SelectCommand.CommandText = "ListDVDTitles"
daDVDList.SelectCommand.CommandType = CommandType.StoredProcedure
daDVDList.Fill(dsVids, "Titles")
Ans: A

More Questions & Answers:-
Page1 Page2 Page3 Page4 Page5 Page6 Page7

No comments:

Post a Comment