On This Page

This set of ASP.NET Multiple Choice Questions & Answers (MCQs) focuses on Aspnet Set 2

Q1 | How to implement authentication via web.config?
  • Include the authentication element.
  • Include the authorization element.
  • Include the identity element.
  • Include the deny element.
Q2 | You use the ASP.NET Web Site Administration Tool to configure ASP.NET membership with forms authentication. What should you name your login form so that you do not have to modify the Web.config file?
  • Login.aspx
  • LoginPage.aspx
  • Default.aspx
  • Auth.aspx
Q3 | Which of the following is the default authentication mode for IIS?
  • Anonymous
  • Windows
  • Basic Authentication
  • Data
Q4 | You need to programmatically configure page output caching. Which object would you use?
  • Request
  • Response
  • Application
  • Server
Q5 | Which of these data source controls do not implement Caching?
  • LinqDataSource
  • ObjectDataSource
  • SqlDataSource
  • XmlDataSource
Q6 | Which object data is included in bookmarks and e-mailed URLs?
  • ViewState
  • cookies
  • Query strings
  • session
Q7 | Which Session Mode Serialization is not required to store the data?
  • Off
  • InProc
  • StateServer
  • SQLServer
Q8 | Which object in ASP.NET provides a global storage mechanism for state data that needs to be accessible to all pages in a given Web application?
  • Session
  • Application
  • ViewState
  • cache
Q9 | Which file is used to write the code to respond to the Application_Start event?
  • Any ASP.NET web page with an .aspx extension
  • Web.config
  • Global.asax
  • Web.UI
Q10 | When a User’s Session times out which event should you respond to?
  • Application_Start
  • Session_End
  • Session_Start
  • Application_End
Q11 | Which Session Mode stores session Information in Current Application Domain?
  • InProc
  • StateServer
  • SQLServer
  • Off
Q12 | What are the client-side state management options that ASP.NET supports?
  • Application
  • Session
  • Querystring
  • schedule
Q13 | What type of data can Cookies store?
  • String
  • DateTime
  • System.Int32
  • Data
Q14 | From the following which is not a valid state management object?
  • Querystate
  • Cookies
  • Application state
  • Hidden form fields
Q15 | To kill a users session explicitly which of the following will you use?
  • Session.Close()
  • Session.End()
  • Session.Abondon()
  • Session.Discard()
Q16 | What ASP.NET object encapsulates the state of the client and the browser?
  • Application Object
  • Session Object
  • Response Object
  • Request Object
Q17 | Default Session data is stored in ASP.Net.
  • StateServer
  • Session Object
  • InProcess
  • Schedule object
Q18 | If you are using the DataSet and you have to display the data in sorted order what will you do?
  • Use Sort method of DataTable
  • Use Sort method of DataSet
  • Use DataViev object with each sort
  • Use datapaging and sort the data.
Q19 | How do you determine the actual SQL data type of a SqlParameter (the type expected by the SQL Server)?
  • It is the .NET Framework data type in your application that the parameter represents.
  • It is the type of column or data in SQL Server that the command expects.
  • It is the type of column in a DataTablethat it represents.
  • It is any type defined in the SqlDbDataTypeenumeration.
Q20 | What are the three primary kinds of parameters?
  • Input, Integer, String
  • Integer, String, DateTime
  • int, varchar, nvarchar
  • Input, Output, InputOutput
Q21 | Which SqlCommand execution returns the number of effected records in the table?
  • ExecuteNonQuery
  • ExecuteReader
  • ExecuteXmlReader
  • ExecuteScalar
Q22 | Which CommandType value is incorrect?
  • StoredProcedure
  • TableDirect
  • TableSchema
  • Text
Q23 | Which data provider gives the maximum performance from a connection to SQL Server?
  • The OLE DB data provider.
  • The JDBC data provider.
  • The SqlClient data provider.
  • The Oracle data provider
Q24 | In a SQL Statement while working with SqlCommand it returns a single value, at that time which method of Command Object will be used?
  • ExecuteNonQuery
  • ExecuteReader
  • ExecuteScalar
  • NonQuery
Q25 | You want to secure the connection strings contained within your Web.config file to ensure that no one can open the file easily and see the connection information. Which tool must you use to encrypt the connection strings?
  • ASPNET_WP.EXE
  • ASPNET_REGSQL.EXE
  • ASPNET_REGIIS.EXE
  • ASP.NET SYSTEM