ASP.NET MVC Interview Questions Part-1

 
1. What is ASP .NET MVC?
  • ASP .NET MVC is a web application framework to develop websites which can run on MAC, Linux or on any platform. 
  • It is developed by microsoft that implements or provides a model-view-controller architecture. 
  • The MVC is used for user interface(view), data(model) and application logic(controller) which helps to achieve separation of concerns.

//The ASP .NET creates a project with some default folders.

                                                 

2. Why do we need Appsettings.json?

  • The appsetting.json file is an application configuration file used to store configuration settings such as connection string, version number.

3. What is JSON?

  • JSON stands for JavaScript Object Notation. 
  • The JSON is standard text-based format(like name and value, version and number) and used for data transformation in web application i.e sending data from server to client and vice-versa.

4. What kind of things go in to wwwroot?
  • In wwwroot folder all the static files of project are present. 
  • It is the root of our web. 
  • Their are different types of static files such as JavaScript, CSS, HTML etc.

5. What does Program.cs?

  • The Program.cs is application host.
  • As we know the execution starts from public static void main(), in MVC Program.cs file is the entry point of execution which has public static void main(). 
  • When the application runs this file executed first.

6. What does ConfigureService and Configure in Startup.cs?

  • a) The Startup.cs file is executed after program.cs file. The Startup.cs file is used for registering services and injection of modules in HTTP pipelines. The Startup.cs contains the ConfigureService and Configure. The ConfugureService method gets call before Configure method. 
  • b) The ConfigureServices method is used to add services in DI(Dependency Injection) container.
  • c) The Configure method is used to configure HTTP request and services.


Thank You!!!

For more understanding watch below video :

Comments

Popular posts from this blog

Day 3 : JavaScript

SQL Concepts-1

ASP .NET Session Management