We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 24
= ScholarHat Membership ¥ Batches Tutorials = ]
So ASP.NET Core Course
@SeitPaced Courses | [ BHands-On Labs | { @ interview Q&A
ASP.NET Interview Question &
Answers: An Overview
ASP.NET is an Open-Source web framework for building fast,
secure web apps & services with .Net. ASP.NET is also a cross-
platform framework that has the biggest draw that means, which can
run on any operating system so this allows you to build your ASP.NET
web apps using HTML, CSS, Javascript, or Jquery. This Tutorial
contains ASP.NET Interview Questions and Answers. ASP.NET
training & asp.net interview question answer pdf allow you to build
web API that can be consumed with any other third party resources
like Microsoft, Facebook, or Google.
Q1. What is ASP.NET?
ASP.NET Framework is a part of the NET framework used to create a
dynamic website, web application, and web services. It is a server-
side technology that uses all NET compatible languages such as C#,
VB.NET, J#, etc. which are compiled to Microsoft Intermediate
Language (MSIL). ASP.NET uses server control to develop a rapid
and interactive application in an easy way.
Any ASP.Net applications would also be written in multiple choice of
Net languages that include C#, VB.Net, and J# and it provides
multiple development modes, that help to develop an application in an
easy and better way.
Features of ASP.NET:
+ Ituses C# and VB.NET languages to build the website.
We use cookies to make interactions with our websites and
services easy and meaningful. Please read our Privacy Policy for
more details.
‘Accept cookies & close this= ScholarHat — Membership v Batches Tutorials = ]
umereneranespaue:
+ ASP.NETpages are compiled, not interpreted.
+ ASP.NET is a request processing engine. It takes an incoming
request and passes it through its internal pipeline to an endpoint
where a developer can attach code to process that request.
Q2. What is the difference between
Web Site and a Web Application?
There are the following differences between these two
Web Site
+ Onawebsite, you cannot add multiple projects.
There is no project file (.csproj or .vbproj). All the files in a folder
structure are automatically included on the site.
By default, compilation produces multiple assemblies.
The website is easy to create and deploy.
You can use different NET languages on a single web site such
as VB.NET pages and C# pages can be used on a single website.
You can edit a single page/file after deployment recompilation is
not required
Choose a website where one developer will responsible for
creating and managing an entire website. Since decoupling is not
possible on the website,
You cannot establish dependencies on the website.
We use cookies to make interactions with our websites and
services easy and meaningful. Please read our Privacy Policy for
more details.
‘Accept cookies & close this= ScholarHat — Membership v Batches Tutorials = ]
+ It has a Visual Studio project file (.csproj or .vbproj) stores
information about the project like as the list of files that are
included in the project, and any project-to-project references.
+ By default, compilation of code files (excluding .aspx and .ascx
files) produces a single assembly.
Itis easy to develop compared to the website.
You cannot use different .NET languages in a Web Application
such as C#and VB.NET both cannot be used in a web application
You cannot edit a single file. Recompilation is required.
The right choice for enterprise environments where multiple
developers work for creating, testing, and deployment. Different
groups work on various components independently like one group
work on the domain layer, other work on the UI layer hence,
decoupling is possible here
You can establish dependencies in a Web Application
Q3. What is a round trip?
The trip of a Web page from the client to the server and then back to
the client is known as a round trip. In ASP.NET Response.Redirect()
causes a round trip.
In other words, any web page that travels from the client-side to the
server-side will get processed on the server and travels back to the
client, this whole process is called a round trip.
Q4. What is a Global.asax file?
The Global.asax file has been derived from the HttpApplication class.
The Global.asax file is used to add application-level logic and
We use cookies to make interactions with our websites and
services easy and meaningful. Please read our Privacy Policy for
more details.
Accept cookies & close this<> ScholarHat — Membership v Batches Tutorials
Application_Start
Application_End
Session_Start
Session_End
Following are the important aspect of the use of the
Global.asax file.
@ ASP.NET Core Certification BU)
Oo ae EOL
ee ee ee eee
rere one
The code in the Global.asax is compiled when the web application
is built for the first time.
Session level code and variables can be declared in the
Application_Start event.
Application level events are for the entire application and may be
used by any user.
Session level events are user-specific for the length of a session
Q5. What is the difference between
Web.config and Machine.config file?
Both files are used to define configurations for your ASP.NET
application. There are the following differences between these two
configuration files
We use cookies to make interactions with our websites and
services easy and meaningful. Please read our Privacy Policy for
more details
‘Accept cookies & close thisSScholarHat Membership ¥ Batches Tutorials «wf )
+ If any setting is not specified in Web.config it inherits from
Machine.config by default.
+ Web.config is an XML-based configuration file for an ASP.NET
application that includes the setting for Data Connection,
Customizing Security, State Management, Memory Management,
Error Handling, and much more
It is sometimes called an application and session level
configuration file.
You can have more than one Web.config file in your ASP.NET
application
Machine.config
+ This file is at the highest level in the configuration hierarchy.
* You can find it at \config\machine.config
Machine.config is used for defining server level settings.
It defines the supported configuration file section and ASP.NET
work process
It registers providers that can be used for advanced features such
as profiles membership and role-based security.
It is automatically installed while installing Visual Studio.NET.
Itis sometimes called a machine level configuration file.
Only one Machine.config file can be at the machine level.
Q6. How to define a connection string
We use cookies to make interactions with our websites and
services easy and meaningful. Please read our Privacy Policy for
more details.
‘Accept cookies & close this= ScholarHat — Membership v Batches Tutorials = ]
SUL SeIveruatavase: