ASP.NET MVC Interview Questions with answers :-
1 :- What is ASP .NET MVC Core ?
2 :- Differentiate between ASP .NET Webforms vs MVC vs MVC core
3 :- Explain MVC Architecture ?
4 :- Why do we have wwwroot folder ?
5 :- Explain the importance of appsettings.json ?
6 :- How to read configurations from appsettings.json ?
7 :- What is dependency injection ?
8 :- Why do we need dependency injection ?
9 :- How do we implement dependency injection ?
10 :- What is the use of Middleware ?
11 :- How to create a Middle ware ?
12 :- What does startup.cs file do ?
13 :- ConfigureServices vs Configure method ?
14 :- Explain the different Ways of doing DI?
15 :- Explain Scoped vs Transient vs Singleton ?
16 :- What is Razor ?
17 :- How to pass Model data to a View ?
18 :- What is the use of Strongly typed views ?
19 :- Explain the concept of ViewModel in MVC ?
20 :- What is Kestrel Web Server ?
21 :- Why Kestrel when we have IIS server ?
22 :- What is the concept of Reverse proxy ?
23 :- What are cookies ?
24 :- What is the need session management ?
25 :- What are the various ways of doing Session management in ASP.NET ?
26 :- What exactly is a session ?
27 :- Explain "HTTP is a stateless protocol" ?
28 :- What are various way of doing session management ?
29 :- Are sessions enabled by default ?
30 :- How to enable sessions in MVC core ?
31 :- Are sessions variables shared(global) between users ?
32 :- Do session variables use cookies ?
33 :- What is a cookie ?
34 :- Explain idle time out in sessions ?
35 :- What does a Context means in HTTP ?
36 :- When should we use viewdata ?<
37 :- How to pass data from controller to view ?
38 :- In same request can viewdata persist across actions ?
39 :- ViewData vs ViewBag
40 :- How does ViewBag work internally?
41 :- Explain ViewModel?
42 :- ViewBag vs ViewModel whats the best practice?
43 :- Explain tempdata ?
44 :- Can tempdata persist across action redirects ?
45 :- How is tempdata different from viewdata ?
46 :- If tempdata is read is it available for next request ?
47 :- How to persist tempdata ?
48 :- What does Keep do in tempdata ?
49 :- Explain Peek in tempdata ?
50 :- How is tempdata different from session variables ?
51 :- If i restart the server does tempdata,session stay ?
52 :- Is tempdata private to a user ?
53 :- ViewData vs ViewBag vs Tempdata vs Session variables?
54 :- What is WebAPI ?
55 :- What is the advantage of WebAPI ?
56 :- Explain REST and Architectural constraints of REST?
57 :- Can we use TCPIP protocol with Web API?
58 :- How WebAPI different from MVC controller ?
59 :- What is content negotiations in Web API ?
60 :- WebAPI vs WCF ?
61 :- WCF REST vs WebAPI REST ?
62 :- How to return HTTP status codes ?
63 :- For error which status code is returned ?
64 :- How did you secure your web API ?
65 :- How do current JS frameworks work with webAPI ?
66 :- How does Token based Authentication works?
67 :- Why is it called JWT Token?
68 :- Explain the 3 sections of JWT Token?
69 :- What are Identity and claims ?
70 :- Differentiate between Authentication VS Authorization ?
71 : Claims vs Roles ?
72 :- Principal vs Identity
73 :- Can we put critical information in JWT Token ?
74 :- How do you create JWT Token in MVC ?
75 :- What HTTP status code do you send for unauthorized access ?
76 :- Where is Token Checked in ASP.NET MVC ?
77 :- What is use of Authorize Attribute ?
78 :- How did you implement JWT token security ?
79 :- How do we send tokens from Client Side ?
80 :- From Javascript,Jquery,Angular etc , How is token passed ?
81 :- Increase UX experience in Mobile apps to avoid relogin ?
82 :- What are refresh tokens ?
83 :- How does Refresh token work ?
84 :- Access tokens vs Refresh Tokens ?
85 :- Whose expiry time is more Access tokens or Refresh tokens?
86 :- Explain revocation of Refresh token ?
87 :- How to extract Principal from a Token ?
88 :- What is the best practice to store tokens at client side?
89 :- If we store JWT in cookie how to save from XX attacks?
90 :- What OAUTH and OpenID ?
91 :- When should we use what?
92 :- What is Identity Server?
93 :- How to achieve single sign on ?
94 :- What are scopes in Identity Server ?