WorksheetsASP.NET Core
Total questions: 83
Worksheet time: 1hrs 2mins
In which of the following stages of an ASP .NET page, the Request and Responseobjects are set?
Page initialization
Page load
Starting of page lifecycle
Page request
Which of the following event is connected with the PostBack Event Handling phase?
RaisePostDataChangedEvent
RaisePostBackEvent
Page_PreRender
LoadPostData
In the lifecycle of a page when a new request is placed, the server generates the related HTML tag for the control in which of the following stages?
Rendering
PreRendering
Disposing
Loading
Since,______ developers can utilize both the Package Manager Console and the NuGet Package Manager for installing and configuring frameworks and libraries.
Visual Studio 2011
Visual Studio 2009
Visual Studio 2012
Visual Studio 2010
A Web Forms page is composed of which of these two components?
JavaScript and AJAX
HTML and ASPX
CASPX and code-behind- file
Code-behind-file and
HTML
How does an Event occur?
A mouse click
A key press
System-generated notification
All of these
Which is the correct attribute for the CheckedChanged control?
OnClick
OnCommand
OnSelectedIndexChanged
OnCheckedChanged
Which Web server control displays a clickable image?
Button
Image
ImageButton
Hyperlink
Which of the following are server controls?
HTML Server Controls
Web Server Controls
Validation Server
Controls
All of these
Which of the following statements are true about ADO.NET?
It is the successor of DAO
Allows access to database without the necessity to implement database.
It is based on XML.
ADO.NET is a set of classes
AEF uses _____ that are then translated to database specific queries.
LINQ queries
SQL queries
JSON data
XML data
Which of the following objects is better to work with for manipulating data?
SqlConnection object
SqlCommand object
SqlDataReader object
DataSet object
Using Entity Framework (EF), the model or entity is designed first in which of these methods?
Code-first
Model-first
Database-first
None of these
Which of the following components act as bridge between DataSet object and data source?
DataAdapter
Command
DataReader
Connection
Which of the following is a consequence of using Dependency Injection?
Loosely coupled
Modular and extensible
Complex code
Readable code
When is a client-side validation used?
If the input has to be validated by the browser
If the input has to be validated by the server
If no input has to be validated by the browser
If no input has to be validated by the server
Identify the sequence of steps occurring in the server-side validation.
a. Updates the ModelState.
b. Renders the ViewModel, if required again.
c. The user enters data.
d. Verifies the ModelState.
e. Saves the entered data.
c, b, a, d, e
b, d, a, c, e
c, a, d, e, b
b, a, d, c, e
Which of the following advantage of SPA over multiple page applications?
SPAs are fast as most resources are loaded only once
Development is simplified and streamlined
Easy to debug with Chrome
All of these
When the request matches the pattern, which of the following defines a URL pattern and a handler to use?
Annotations
Routing
Dependency Injection
None of these
RequireHtppsAttribute is an example for which type of filter?
Result
Authentication
Action
Authorization
During execution of actions or filters, immediate attention is drawn by which type of filter?
Authentication
Exception
Action
Result
Configuring a filter at which level would allow access to all the controllers in the ASP.NET domain?
Common
Action
Controller
Global
What is the correct definition of Output cache?
It is a Result filter which works on the result of caching action
It is an Action filter which
controls duration of caching for an output of a controller action
It is a data delivery function
It is an Exception filter
What is 'OnResultExecuting'?
A method type in custom
action filter implementation
An attribute of Result filter
A kind of class definition in ASP.NET MVC
A process in ASP.NET framework
Which templated helper provides a read-only view of the defined model property?
Editor
DisplayFor
Display
EditorFor
Which of the following are types of MVC Helpers?
Inline HTML Helpers
Built-in HTML Helper
Custom HTML Helpers
All of these
Which one of the following options is not an Action selector attribute?
ActionName
NonActionName
NonAction
ActionVerbs
Which of the following option is used to establish the identity of the user with the Internet?
No authentication
Individual user accounts
Work and school accounts
Windows authentication
Which of the following statements about partial views are true?
a) Partial view is an exclusive view capable of rendering a portion of the view content.
b) Partial views can be reused in multiple views.
c) Code duplication can be reduced using partial view.
d) The ViewDictionary object is used to instantiate the partial view.
e) To render any related data in a partial view, which is part of the model, one should ensure to Use the RenderPartial method.
a, b, c
a, c, e
a, b, c, e
b, c, d
Which of the following Helper method in ActionResult returns a user-defined content type?
Content
RedirectToAction
Redirect
PartialView
Which of the following Action Result communicates the file contents to the response?
EmptyResult
FilePathResult
FileResult
ContentResult
Which of the following has the extension *.cshtml?
Model
View
Controller
None of these
A ____ can be defined as a .NET component that can attach itself to the application lifecycle and offer functionality.
Action method
View
Module
Controller
Which of the following is the process of generating .NET objects with the help of the data transmitted by the browser in an HTTP request?
Action method
Business logic
Model binding
None of these
Which of the following format is not returned while using REST?
XML
HTML
GET
JSON
Which of the following is the best way to utilize HTTP method?
POST
DELETE
GET
RESULT
For which of the following the data associated with the model can be used to render controls?
ViewData
ViewBag
TempData
Strongly typed view
Which of the following are the file extensions in the Razor view?
.vbhtml
.cshtml
html.cs
None of these
Which class allows structural content management?
JsonDocument
JsonElement
JSonSerialiser
JsonReader
Over ____ percent of the assemblies in the ASP.NET 5 base class library are fully marked for nullable reference types.
90
70
80
20
Which of the following commands are used for exception handling in Razor code?
try
catch
Inherits
using
In an ASP.NET MVC application, a model class directly manages any input from the browser and will provide HTML output to the browser. (State True/False)
True
False
Which is the entry point of the application in the ASP.NET Core, where the execution starts?
CreateHostBuilder
ASP.NET
Main
Build()
Which is the internal Web server included by default in the.NET Core application?
Kestrel
OWIN
REST API
All of these
Which of these was created to make ASP.NET more modular by reducing dependencies and creating a loosely linked framework?
Kestrel
OWIN
RESTful API
All of these
____ is an architectural approach for establishing standards among Web-based applications, allowing them to communicate more easily.
Kestrel
OWIN
REST API
RESTful API
Which of these is a lightweight, maintainable, and scalable service that exposes API from an application to the calling client in a secure, standardized, and stateless manner?
Kestrel
OWIN
REST API
RESTful API
Which problems of traditional architecture does the Onion Architecture address?
A Tight Coupling
B Loose Coupling
C Concern Partition
D None of these
A and B
A and C
B and C
A, B, and C
The Onion Architecture's layered design helps to build better applications in terms of ____
Testability
Practicality
Consistency
Integrity
When a class is strongly tied to a concrete dependency, any kind of alterations in one object leads to modifications in several other objects, it is called____
Model-View Controller
Tight Coupling
Concern Partition
Loose Coupling
Which layer is the core of the Onion Architecture?
Domain Entity Layer
Repository Layer
Service Layer
UI Layer
Which layer consists of exposable APIs in the Onion Architecture?
Domain Entity Layer
Repository Layer
Service Layer
UI Layer
Which layer helps in creating database tables?
Domain entities layer
Repository layer
Service layer
UI layer
The repository layer also contains the ____ class
UserRepository
UserProfile
DBContext
None of these
Under which folder is the user class created?
A Entity Framework
Domain Entities
Repository
Models
What is the infrastructure layer also called ?
Domain entities layer
Repository layer
Service layer
UI layer
Which is the exterior layer of the Onion Architecture?
Domain entities layer
Repository layer
Service layer
UI layer
Where are the database mappings, the default schema, DB functions, additional data annotation properties, and entities to be omitted from mapping configured?
CRUD
Model
Entity
Properties
____is a tool that helps to map CLR classes to database
schemas. It is the main class, where all domain classes are set up.
DbModelBuilder
DbContext
Context
Customer
Which mapping is used to configure attributes for each property and map the properties of your domain classes using Fluent API?
CLR
Model
Entity
Properties
Which class is used to provide the specifications for Customer to implement CRUD operations?
Controller
Customer
CRUD
Create
Which method is used to fetch the record that matches the CustomerId in contrast to the id passed to this method?
Action
DbContext
Details
Controller
____can call the methods within a class of a given assembly programmatically.
Reflection
AutoMapper
IMapper
IEnumerable
Any set of classes can be mapped with AutoMapper, but the properties of the classes must have____ names.
Few
Many
Same
Different
What does AutoMapper use to retrieve a type of existing object and invoke its methods or access its fields and attributes?
IMapper
Reflection
mapper.Map()
None of these
Which of the following is used to map two items during mapping in an ASP.NET application?
IMapper
Reflection
AutoMapper
None of these
The mapper.Map() function is available in AddAutoMapper() method in ConfigureServices.
True
False
Token-based authentication is ___ in mobile used with and SPAs
Classes
Objects
Attributes
APIs
Tokens can be validated only as a ____
Classes
Text
String
Number
Metadata can be retrieved from the authorization server using ___middleware.
JwtBearer
UseOAuthAuthorizationServer
JwtSecurityTokenHandle
None of these
While symmetric encryption uses the ___ key to encrypt and decrypt, asymmetric encryption uses ___ keys.
Same, Same
Same, Different
Different, Same
Different, Different
Which of the following contains the token's claim, that is, identity created based?
SecurityTokenDescriptorn
Claimsldentity
SigningCredentials
CreateToken
The repository pattern serves as an intermediary layer between Controller layer and which of these layers?
DbContext
Controller
Database
None of these
Which approach is used to define database actions relating to a specific entity within a separate class?
Non-Generic Repository
Generic Repository
MVC
MVVM
Which approach is used to provide common database activities?
Non-Generic Repository
Generic Repository
What combines all CRUD transactions?
DbContext
Entity Framework
Unit of work
Controller
The database states are managed by the UoW pattern.
True
False
Which of the following options can be used to deploy an application on IIS Web Server?
Azure
IIS
Web Deploy
Command line
To configure and create Web hosts, ASP.NET Core uses___.
WebHostBuilder
UseKestrel
UseIISIntegration
None of these
ASP.NET Core projects create a ___ file to deploy an application to IIS and register the AspNetCoreModule as an HTTP handler.
Web.Host
web.config
IISIntegration
Json
Which of the following options are used to publish an ASP.NET Core/MVC application on Microsoft Cloud?
Azure
IIS
Web Deploy
All of these
