ASP.Net Core Interview Questions and Answers

Q.1 What does WebHost.CreateDefaultBuilder() do?

       A. Configure integration with IIS

       B. Configure the default service provider

       C. Configure logging to read from the Logging section of the appsettings.json file and log to the Console and Debug window.

       D. All of the above

Ans : All of the above

Q.2 What are technologies discontinued in .NET Core?

       A. Binary Serialization

       B. Remoting

       C. Sandboxing

       D. All of the above

Ans : All of the above

Q.3 What are the main characteristics of ASP.NET Core?

       A. There is no Global.asax – We have Startup.cs which is used to set up Middleware and services for DI Container

       B. There is no web.config. We now use an appsettings.json file in combination with other sources of configuration (command line args, environment variables, etc.)

       C. ASP.NET All meta package which improves development speed, and enables you to reference all Microsoft packages for ASP.NET Core and it will deploy only those that are being used by your code

       D. All of these

Ans : All of these

Q.4 Select all the methods that can be used to pass data from the controller to the view.

       A. By using the view’s helper methods

       B. By setting properties on the model that is passed to the view

       C. By setting properties on the web controls that the view contains

       D. By using ViewData dictionary

Ans : By using ViewData dictionary

Q.5 ASP.NET Core works with

       A. .NET framework

       B. .NET Core framework

       C. Both of these

       D. None

Ans : Both of these

Q.6 Which of the following object encapsulates the state of the client and the browser?

       A. Server object

       B. Response object

       C. Session object

       D. Request object

Ans : Session object

Q.7 Which one of the following is the fastest way to concat strings in ASP.NET?

       A. Substring method of the String object

       B. Plus sign operator to concatenate the strings

       C. Append method of the StringBuilder object

       D. Concat method of the String object

Ans : Append method of the StringBuilder object

Q.8 What are the various JSON files in ASP.NET Core?

       A. Global.json

       B. Appsettings.json

       C. Launchsettings.json

       D. All of the above

Ans : All of the above

Q.9 What is Startup.cs in Core?

       A. In Startup.cs file

       B. In Core,startup.cs is the entry point for your application

       C. The constructor loads the AppSettings.json file using ConfigurationBuilder class

       D. All of the above

Ans : All of the above

Q.10 ASP.Net was released on

       A. 2000

       B. 2006

       C. 2002

       D. 2005

Ans : 2002

Leave a Comment