wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ASP.NET Core

Total questions: 83

Worksheet time: 1hrs 2mins

Name
Class
Date
1.

 In which of the following stages of an ASP .NET page, the Request and Responseobjects are set?

a)

 Page initialization

b)

 Page load

c)

Starting of page lifecycle

d)

Page request

2.

Which of the following event is connected with the PostBack Event Handling phase?

a)

RaisePostDataChangedEvent

b)

RaisePostBackEvent

c)

Page_PreRender

d)

 LoadPostData

3.

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?

a)

Rendering

b)

PreRendering

c)

Disposing

d)

Loading

4.

Since,______ developers can utilize both the Package Manager Console and the NuGet Package Manager for installing and configuring frameworks and libraries.

a)

Visual Studio 2011

b)

Visual Studio 2009

c)

Visual Studio 2012

d)

Visual Studio 2010

5.

ASP.NET Core allows the application to be coded in languages such as C#, Visual Basic.NET, Jscript, and J#. (State True/False)

a)

True

b)

False

6.

A Web Forms page is composed of which of these two components?

a)

JavaScript and AJAX

b)

HTML and ASPX

c)

CASPX and code-behind- file

d)

Code-behind-file and

HTML

7.

How does an Event occur?

a)

A mouse click

b)

A key press

c)

System-generated notification

d)

All of these

8.

Which is the correct attribute for the CheckedChanged control?

a)

OnClick

b)

OnCommand

c)

OnSelectedIndexChanged

d)

OnCheckedChanged

9.

Which Web server control displays a clickable image?

a)

Button

b)

Image

c)

ImageButton

d)

Hyperlink

10.

Which of the following are server controls?

a)

HTML Server Controls

b)

Web Server Controls

c)

Validation Server

Controls

d)

All of these

11.

 Which of the following statements are true about ADO.NET?

a)

It is the successor of DAO

b)

Allows access to database without the necessity to implement database.

c)

It is based on XML.

d)

ADO.NET is a set of classes

12.

AEF uses _____ that are then translated to database specific queries.

a)

LINQ queries

b)

SQL queries

c)

JSON data

d)

XML data

13.

Which of the following objects is better to work with for manipulating data?

a)

SqlConnection object

b)

SqlCommand object

c)

SqlDataReader object

d)

DataSet object

14.

Using Entity Framework (EF), the model or entity is designed first in which of these methods?

a)

Code-first

b)

Model-first

c)

Database-first

d)

None of these

15.

 Which of the following components act as bridge between DataSet object and data source?

a)

DataAdapter

b)

Command

c)

DataReader

d)

Connection

16.

Which of the following is a consequence of using Dependency Injection?

a)

Loosely coupled

b)

Modular and extensible

c)

Complex code

d)

Readable code

17.

When is a client-side validation used?

a)

If the input has to be validated by the browser

b)

If the input has to be validated by the server

c)

If no input has to be validated by the browser

d)

If no input has to be validated by the server

18.

 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.

a)

c, b, a, d, e

b)

b, d, a, c, e

c)

c, a, d, e, b

d)

b, a, d, c, e

19.

 Which of the following advantage of SPA over multiple page applications?

a)

SPAs are fast as most resources are loaded only once

b)

Development is simplified and streamlined

c)

Easy to debug with Chrome

d)

All of these

20.

When the request matches the pattern, which of the following defines a URL pattern and a handler to use?

a)

Annotations

b)

Routing

c)

Dependency Injection

d)

None of these

21.

RequireHtppsAttribute is an example for which type of filter?

a)

Result

b)

Authentication

c)

Action

d)

Authorization

22.

 During execution of actions or filters, immediate attention is drawn by which type of filter?

a)

Authentication

b)

Exception

c)

Action

d)

Result

23.

 Configuring a filter at which level would allow access to all the controllers in the ASP.NET domain?

a)

Common

b)

Action

c)

Controller

d)

Global

24.

What is the correct definition of Output cache?

a)

It is a Result filter which works on the result of caching action

b)

It is an Action filter which

controls duration of caching for an output of a controller action

c)

It is a data delivery function

d)

It is an Exception filter

25.

What is 'OnResultExecuting'?

a)

A method type in custom

action filter implementation

b)

An attribute of Result filter

c)

A kind of class definition in ASP.NET MVC

d)

A process in ASP.NET framework

26.

Which templated helper provides a read-only view of the defined model property?

a)

Editor

b)

DisplayFor

c)

Display

d)

EditorFor

27.

Which of the following are types of MVC Helpers?

a)

Inline HTML Helpers

b)

Built-in HTML Helper

c)

Custom HTML Helpers

d)

All of these

28.

Which one of the following options is not an Action selector attribute?

a)

ActionName

b)

NonActionName

c)

NonAction

d)

ActionVerbs

29.

Which of the following option is used to establish the identity of the user with the Internet?

a)

No authentication

b)

Individual user accounts

c)

Work and school accounts

d)

Windows authentication

30.

 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)

a, b, c

b)

a, c, e

c)

a, b, c, e

d)

b, c, d

31.

Which of the following Helper method in ActionResult returns a user-defined content type?

a)

Content

b)

RedirectToAction

c)

Redirect

d)

PartialView

32.

Which of the following Action Result communicates the file contents to the response?

a)

EmptyResult

b)

FilePathResult

c)

FileResult

d)

ContentResult

33.

Which of the following has the extension *.cshtml?

a)

Model

b)

View

c)

Controller

d)

None of these

34.

A ____ can be defined as a .NET component that can attach itself to the application lifecycle and offer functionality.

a)

Action method

b)

View

c)

Module

d)

Controller

35.

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?

a)

 Action method

b)

Business logic

c)

Model binding

d)

None of these

36.

Which of the following format is not returned while using REST?

a)

XML

b)

HTML

c)

GET

d)

JSON

37.

Which of the following is the best way to utilize HTTP method?

a)

POST

b)

DELETE

c)

GET

d)

RESULT

38.

For which of the following the data associated with the model can be used to render controls?

a)

ViewData

b)

ViewBag

c)

TempData

d)

Strongly typed view

39.

Which of the following are the file extensions in the Razor view?

a)

.vbhtml

b)

.cshtml

c)

html.cs

d)

None of these

40.

Which class allows structural content management?

a)

JsonDocument

b)

JsonElement

c)

JSonSerialiser

d)

JsonReader

41.

Over ____ percent of the assemblies in the ASP.NET 5 base class library are fully marked for nullable reference types.

a)

90

b)

70

c)

80

d)

20

42.

Which of the following commands are used for exception handling in Razor code?

a)

try

b)

catch

c)

Inherits

d)

using

43.

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)

a)

True

b)

False

44.

Which is the entry point of the application in the ASP.NET Core, where the execution starts?

a)

CreateHostBuilder

b)

ASP.NET

c)

Main

d)

Build()

45.

Which is the internal Web server included by default in the.NET Core application?

a)

Kestrel

b)

OWIN

c)

REST API

d)

All of these

46.

Which of these was created to make ASP.NET more modular by reducing dependencies and creating a loosely linked framework?

a)

Kestrel

b)

OWIN

c)

RESTful API

d)

All of these

47.

____ is an architectural approach for establishing standards among Web-based applications, allowing them to communicate more easily.

a)

Kestrel

b)

OWIN

c)

REST API

d)

RESTful API

48.

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?

a)

Kestrel

b)

OWIN

c)

REST API

d)

RESTful API

49.

Which problems of traditional architecture does the Onion Architecture address?

A Tight Coupling

B Loose Coupling

C Concern Partition

D None of these

a)

A and B

b)

A and C

c)

B and C

d)

A, B, and C

50.

The Onion Architecture's layered design helps to build better applications in terms of ____

a)

Testability

b)

Practicality

c)

Consistency

d)

Integrity

51.

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____

a)

Model-View Controller

b)

Tight Coupling

c)

Concern Partition

d)

Loose Coupling

52.

Which layer is the core of the Onion Architecture?

a)

Domain Entity Layer

b)

Repository Layer

c)

Service Layer

d)

UI Layer

53.

Which layer consists of exposable APIs in the Onion Architecture?

a)

Domain Entity Layer

b)

Repository Layer

c)

Service Layer

d)

UI Layer

54.

Which layer helps in creating database tables?

a)

Domain entities layer

b)

Repository layer

c)

Service layer

d)

UI layer

55.

The repository layer also contains the ____ class

a)

UserRepository

b)

UserProfile

c)

DBContext

d)

None of these

56.

Under which folder is the user class created?

a)

A Entity Framework

b)

 Domain Entities

c)

Repository

d)

Models

57.

What is the infrastructure layer also called ?

a)

Domain entities layer

b)

Repository layer

c)

Service layer

d)

UI layer

58.

 Which is the exterior layer of the Onion Architecture?

a)

Domain entities layer

b)

Repository layer

c)

Service layer

d)

UI layer

59.

Where are the database mappings, the default schema, DB functions, additional data annotation properties, and entities to be omitted from mapping configured?

a)

CRUD

b)

Model

c)

Entity

d)

Properties

60.

____is a tool that helps to map CLR classes to database

schemas. It is the main class, where all domain classes are set up.

a)

DbModelBuilder

b)

DbContext

c)

Context

d)

Customer

61.

Which mapping is used to configure attributes for each property and map the properties of your domain classes using Fluent API?

a)

CLR

b)

Model

c)

Entity

d)

Properties

62.

Which class is used to provide the specifications for Customer to implement CRUD operations?

a)

Controller

b)

Customer

c)

CRUD

d)

Create

63.

Which method is used to fetch the record that matches the CustomerId in contrast to the id passed to this method?

a)

Action

b)

DbContext

c)

Details

d)

Controller

64.

____can call the methods within a class of a given assembly programmatically.

a)

Reflection

b)

AutoMapper

c)

IMapper

d)

IEnumerable

65.

Any set of classes can be mapped with AutoMapper, but the properties of the classes must have____ names.

a)

Few

b)

Many

c)

Same

d)

Different

66.

What does AutoMapper use to retrieve a type of existing object and invoke its methods or access its fields and attributes?

a)

IMapper

b)

Reflection

c)

mapper.Map()

d)

None of these

67.

 Which of the following is used to map two items during mapping in an ASP.NET application?

a)

IMapper

b)

Reflection

c)

AutoMapper

d)

None of these

68.

The mapper.Map() function is available in AddAutoMapper() method in ConfigureServices.

a)

True

b)

False

69.

Token-based authentication is ___ in mobile used with and SPAs

a)

Classes

b)

Objects

c)

Attributes

d)

APIs

70.

Tokens can be validated only as a ____

a)

Classes

b)

Text

c)

String

d)

Number

71.

Metadata can be retrieved from the authorization server using ___middleware.

a)

JwtBearer

b)

UseOAuthAuthorizationServer

c)

JwtSecurityTokenHandle

d)

None of these

72.

While symmetric encryption uses the ___ key to encrypt and decrypt, asymmetric encryption uses ___ keys.

a)

 Same, Same

b)

Same, Different

c)

Different, Same

d)

Different, Different

73.

Which of the following contains the token's claim, that is, identity created based?

a)

SecurityTokenDescriptorn

b)

Claimsldentity

c)

SigningCredentials

d)

CreateToken

74.

 The repository pattern serves as an intermediary layer between Controller layer and which of these layers?

a)

DbContext

b)

Controller

c)

Database

d)

None of these

75.

 Which approach is used to define database actions relating to a specific entity within a separate class?

a)

Non-Generic Repository

b)

Generic Repository

c)

MVC

d)

MVVM

76.

Which approach is used to provide common database activities?

a)

Non-Generic Repository

b)

Generic Repository

77.

What combines all CRUD transactions?

a)

DbContext

b)

Entity Framework

c)

Unit of work

d)

Controller

78.

The database states are managed by the UoW pattern.

a)

True

b)

False

79.

Which of the following options can be used to deploy an application on IIS Web Server?

a)

Azure

b)

IIS

c)

Web Deploy

d)

 Command line

80.

To configure and create Web hosts, ASP.NET Core uses___.

a)

WebHostBuilder

b)

UseKestrel

c)

UseIISIntegration

d)

None of these

81.

ASP.NET Core projects create a ___ file to deploy an application to IIS and register the AspNetCoreModule as an HTTP handler.

a)

Web.Host

b)

web.config

c)

IISIntegration

d)

Json

82.

Which of the following Web server that operates on the Windows OS ASP.NET framework is used to host ASP.NET Core apps?

a)

IIS

b)

Apache TomCat

c)

JBoss

d)

None of these

83.

Which of the following options are used to publish an ASP.NET Core/MVC application on Microsoft Cloud?

a)

Azure

b)

IIS

c)

Web Deploy

d)

All of these