Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2nd Round Intrview

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Topic

General
Familiarity with the project they are currently working on. (Talk about overall
business case and their role)
Ability to articulate design decisions and technology used (Ask Why and How
questions)

Difference between Machine.config and Web.config


What is Global.asax used for?
Basic understanding of web services
AJAX / JQuery
Basic knowledge of Visual Studio – debugging, publishing
What are APP SETTINGS used for?
What is ASP.NET Cache. How do you use it?
ADO.NET / Entity Framework – Why do they exist and how to leverage them

ASP.NET Webforms
State Management in ASP.Net (include ViewState / SessionState)
Page lifecycle (see if the candidate can talk details about PostBack)
User controls (How to create one ?)
Custom Controls

Why MVC? What are the benefits?


What is Routing? How is it achieved?
What are ActionFilters?
Difference between “ActionResult” and “ViewResult”
Difference between TempData, ViewData, and ViewBag
What are Partial Views and why do we use them?
What are Sections?
What is scaffolding? How do I create one?
How to prevent a CSRF attack in MVC?

Managed and Unmanaged code


MSIL/JIT
Finalize/Dispose
Garbage collection
Private and shared assemblies
Threading
App Domain

General Programming fundamentals


Function overriding and overloading
Virtual functions/Inheritance
Abstract Class and Interfaces
Thread Synchronization

OS and Networking fundamentals


Process/thread
Memory Management / Paging
User mode/ Kernel mode differences
TCP/IP protocol and creation of socket (IP-Port pair, 3-way handshake etc)
What is the difference between HTTP/HTTPS
What happens when a client tries to browse a website? (DNS lookup, Proxy etc)
Network load balancing – Level 3/4,7
Networking tools they are aware of (Nslookup, Ping, ipconfig and Tracert)
What is the concept of NAT-ing?
OSI Model (at least be able to talk about there being 7 layers)

Azure / Cloud Fundamentals


IaaS / PaaS / SaaS and differences
Fault Domains and Update Domains
Questions on Azure features used.

1. Difference between Machine.config and Web.config ?

The web.config files specify configuration settings for a particular web application, and
are located in the application's root directory; the machine.config file specifies
configuration settings for all of the websites on the web server, and is located in
$WINDOWSDIR$\Microsoft.Net\Framework\Version\Config.

The web. config files specify configuration settings for a particular web application, and are located in the
application's root directory; the machine. config file specifies configuration settings for all of the websites
on the web server, and is located in $WINDOWSDIR$Microsoft.NetFrameworkVersionConfig

2. What is Global.asax used for?

The Global.asax file is used to handle high level application events,


such as:
 Application start
 Application error
 Session start
 Session end
The Global.asax, also known as the ASP.NET application file, is used to serve application-
level and session-level events
2. Basic understanding of web services

What are Web Services?

 A web service is any piece of software that makes itself available over the internet
and uses a standardized XML messaging system. ...
 Web services are self-contained, modular, distributed, dynamic applications that
can be described, published, located, or invoked over the network to create
products, processes, and supply chains. ...
 Web services are XML-based information exchange systems that use the Internet
for direct application-to-application interaction. These systems can include
programs, objects, messages, or documents.
 A web service is a collection of open protocols and standards used for exchanging
data between applications or systems. ...

AJAX / JQuery

 AJAX is a technique used for making requests from the browser to the server for various purposes
such as the retrieval of assorted content including data, HTML, XML, posting form values and so
on. Requests are initiated from client script (usually JavaScript) once the page has already been
loaded in the browser. Traditionally, the browsers' built in XMLHttpRequest object i…

JSON is an open standard file format and data interchange format that uses human-readable text to store
and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with
diverse uses in electronic data interchange, including that of web applications with servers.

What is a JSON file and how to edit it?


A JSON file is a file that stores simple data structures and objects in JavaScript Object
Notation (JSON) format, which is a standard data interchange format. It is primarily used for
transmitting data between a web application and a server. JSON files are lightweight, text-
based, human-readable, and can be edited using a text editor.

Basic knowledge of Visual Studio – debugging, publishing


Debugging is the process of finding and correcting bugs (errors) in your
programs. Finding errors can be quite a daunting task, especially if you do not
know what tools are your disposal and how to use them. There are three types of
errors:

 Syntax errors
 Run-time errors
 Logic errors

Publishing creates the set of files that are needed to run your application, and
you can deploy the files by copying them to a target machine.

What are APP SETTINGS used for?

What is app settings in asp net?


The <appSettings> element of a web. config file is a place to store connection
strings, server names, file paths, and other miscellaneous settings needed by
an application to perform work.

Global. asax is an optional file which is used to handling higher level application events such as
Application_Start, Application_End, Session_Start, Session_End etc. It is also popularly known as
ASP.NET Application File. This file resides in the root directory of an ASP.

.
What is Caching?
Caching is a technique of storing frequently used data/information in memory, so
that, when the same data/information is needed next time, it could be directly
retrieved from the memory instead of being generated by the application.
Caching is extremely important for performance boosting in ASP.NET, as the pages
and controls are dynamically generated here. It is especially important for data
related transactions, as these are expensive in terms of response time.
Caching places frequently used data in quickly accessed media such as the random
access memory of the computer. The ASP.NET runtime includes a key-value map
of CLR objects called cache. This resides with the application and is available via
the HttpContext and System.Web.UI.Page.
In some respect, caching is similar to storing the state objects. However, the storing
information in state objects is deterministic, i.e., you can count on the data being
stored there, and caching of data is nondeterministic.
The data will not be available in the following cases:

 If its lifetime expires,


 If the application releases its memory,
 If caching does not take place for some reason.

ADO.NET provides a bridge between the front end controls and the back end database. The
ADO.NET objects encapsulate all the data access operations and the controls interact with
these objects to display data, thus hiding the details of movement of data.

ASP.NET Webforms
State Management in ASP.Net (include ViewState / SessionState)

ASP.NET Webforms:
ASP.NET is an open-source, server-side web-application framework designed for web development to produce
dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites,
applications and services.

What Is Web Form


 A Web Form, or HTML form, is an online page that allows user input.
 It is an interactive page, where users fill out particular fields.
 Web forms are rendered in browsers using HTML and other web-oriented
languages like CSS, javascript.

What is View State in ASP.NET?

View State is one of the methods of the ASP.NET page framework used to preserve and store
the page and control values between round trips. It is maintained internally as a hidden field
in the form of an encrypted value and a key.

In ASP.NET session is a state that is used to store and retrieve values of a user.
It helps to identify requests from the same browser during a time period (session).
It is used to store value for the particular time session. By default, ASP.NET
session state is enabled for all ASP.NET applications.
Page lifecycle (see if the candidate can talk details about PostBack)

Some parts of the life cycle occur only when a page is processed as a postback. For postbacks, the
page life cycle is the same during a partial-page postback (as when you use an UpdatePanel control)
as it is during a full-page postback. The page request occurs before the page life cycle begins.
PostBack is the name given to the process of submitting all the information that
the user is currently working on and send it all back to the server. Postback is
actually sending all the information from client to web server, then web server
process all those contents and returns back to client. A postback originates from
the client side browser.
What is custom control?
CustomControl is a loosely coupled control w.r.t code and UI while UserControl
is a tightly coupled control

How to create a user control in Visual Studio?


For example if you want to create a user control that would have a label and a textbox
together, then you can create a new project using the Visual Studio .Net and select the option
of Web Control Library. This would create the .ascx file needed for creating the user control.

Custom Controls:
Custom controls are deployed as individual assemblies. They are compiled into a
Dynamic Link Library (DLL) and used as any other ASP.NET server control. They
could be created in either of the following way:

 By deriving a custom control from an existing control


 By composing a new custom control combing two or more existing controls.
 By deriving from the base control class.
To understand the concept, let us create a custom control, which will simply render
a text message on the browser. To create this control, take the following steps:
Create a new website. Right click the solution (not the project) at the top of the tree
in the Solution Explorer.
Why MVC? What are the benefits?
MVC, short for M odel, V iew, and C ontroller, is a methodology or architectural pattern used for
efficiently relating the user interface to underlying data models and organizing to relate the
application code.
USES:

 Development of the application becomes fast.


 Easy for multiple developers to collaborate and work together.
 Easier to Update the application.
 Easier to Debug as we have multiple levels properly written in the application
What is routing?
Routing is the process of selecting a path for traffic in a network or between or across multiple networks.
Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the
public switched telephone network (PSTN), and computer networks, such as the Internet.
Routing means navigation between pages. It enables developers to build a Single
Page Application (SPA) with multiple views and allow navigation between views.

ViewData
1. ViewData is a dictionary object that is derived from ViewDataDictionary
class.
2. public ViewDataDictionary ViewData { get; set; }

3. ViewData is a property of ControllerBase class.


4. ViewData is used to pass data from controller to corresponding view.
5. It’s life lies only during the current request.
6. If redirection occurs then it’s value becomes null.
7. It’s required typecasting for getting data and check for null values to
avoid error.

ViewBag
1. ViewBag is a dynamic property that takes advantage of the new dynamic
features in C# 4.0.
2. Basically it is a wrapper around the ViewData and also used to pass data
from controller to corresponding view.
3. public Object ViewBag { get; }

4. ViewBag is a property of ControllerBase class.


5. It’s life also lies only during the current request.
6. If redirection occurs then it’s value becomes null.
7. It doesn’t required typecasting for getting data

TempData
1. TempData is a dictionary object that is derived from TempDataDictionary
class and stored in short lives session.
2. public TempDataDictionary TempData { get; set; }

3. TempData is a property of ControllerBase class.


4. TempData is used to pass data from current request to subsequent
request (means redirecting from one page to another).
5. It’s life is very short and lies only till the target view is fully loaded.
6. It’s required typecasting for getting data and check for null values to
avoid error.
7. It is used to store only one time messages like error messages, validation
messages. To persist data with TempData refer this article: Persisting Data
with TempData
What are Partial Views and why do we use them?
What is partial view in ASP NET?
A partial view is a Razor markup file (. cshtml) that renders HTML output within another
markup file. Partial view is not a complete view. Partial view is used for reusability of the
HTML markup. ASP.NET MVC Folder And File Structure.
What is Scaffolding in MVC Framework?

Scaffolding is an excellent way of kick-starting model-view-controller (MVC)


framework development. Visual Studio’s MVC Scaffolding uses templates
to generate the routine code that is common to all ASP.NET MVC builds,
such as data access and Web API. It allows the developer to concentrate
on what is unique to the application.

How is Scaffolding working till Entity Framework


6.0?
 There is an option of ADO.NET Model. When we select our database
class and table that time-based on that connection its scaffold all
entities of tables and stored procedure.

How to prevent a CSRF attack in MVC?


Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF
(sometimes pronounced sea-surf) or XSRF, is a type of malicious exploit of a website where unauthorized
commands are submitted from a user that the web application trusts. There are many ways in which a malicious
website can transmit such commands; specially-crafted image tags, hidden forms, and JavaScript
XMLHttpRequests, for example, can all work without the user's interaction or even knowledge

How to implement CSRF security in MVC?


In order to implement CSRF security in MVC, first, we need to use HTML helper
@Html.AntiForgeryToken () in view. It should be placed inside the BeginForm () method in
view.

Diference Managed and Unmanaged code?

 Unmanaged Code. The unsafe code or the unmanaged code is a code block that
uses a pointer variable. The unsafe modifier allows pointer usage in unmanaged
code.
 Example
 Managed Code. Managed code is a code whose execution is managed by Common
Language Runtime. It gets the managed code and compiles it into machine code.
Managed Code Unmanaged Code

It is executed by managed runtime


environment or managed by the It is executed directly by the
CLR. operating system.

It provides security to the application It does not provide any security to


written in .NET Framework. the application.

Memory buffer overflow does not


occur. Memory buffer overflow may occur.

It provide runtime services like It does not provide runtime services


Garbage Collection, exception like Garbage Collection, exception
handling, etc. handling, etc.

The source code is compiled in the


intermediate language known as IL The source code directly compiles
or MSIL or CIL. into native languages.

It does not provide low-level access It provide low-level access to the


to the programmer. programmer.

MSIL/JIT

 The Microsoft Intermediate Language (MSIL) also goes by the name Common Intermediate
Language (CIL). It is typically a set of platform-independent instructions created from source code
by a language-specific compiler. It is produced by a variety of compilers (C#, VB,.NET, and so
on). The ILDasm (Intermediate Language Disassembler) software included in the.NET
Framework SD…
 What is a JIT compiler?
 The JIT compiler then converts the Microsoft Intermediate Language (MSIL) into the
machine code that is specific to the computer environment that the JIT compiler runs
on. The MSIL is converted into the machine code on a requirement basis i.e. the JIT
compiler compiles the MSIL as required rather than the whole of it.

What is Finalize/Dispose?

Difference between Dispose & Finalize Method


What is Garbage collection?

computer science, garbage collection (GC) is a form of automatic memory management. The garbage
collector attempts to reclaim memory which was allocated by the program, but is no longer referenced—
also called garbage.

What is Private and shared assemblies?

 Private Assembly: It is accessible only to the application, it is installed in the


installation directory of the application.
 Shared Assembly: It can be shared by multiple applications, it is installed in the
GAC.

What is a Thread?

The execution of process code by tracking the instructions one after the other in the
process is called threads. Threads control the process and each thread represents
the control of the code. The tasks are run in parallel and it is the subset of the
process.

Information such as code and data related and the open files are shared between
threads. When changes are made in one thread, the alterations are seen by other
threads as well. Threads in the same process share the memory space and address
space.

What is application domain?


An application domain is a mechanism (similar to a process in an operating system) used within the Common
Language Infrastructure (CLI) to isolate executed software applications from one another so that they do not
affect each other. Each application domain has its own virtual address space which scopes the resources for the
application domain using that address space.

Function overriding and overloading

Overloading
 No keyword is used during overloading.
 The prototype differs only based on the number or type of parameter.
 It happens during compile time.
 Constructors can be overloaded.
 Destructor can’t be overloaded.
 It can be used to achieve early binding.
 The version of function being called is determined by the number or type of
parameter being used.
 The functions would be redefined with the same name, different number or
type of parameters.

Overriding
 The prototype remains same throughout.
 It occurs at runtime.
 Virtual functions can’t be overridden.
 Destructor can be overridden.
 Overriding is also known as late binding.
 The function that would be overridden is preceded by the ‘virtual’ keyword in
the base class.
 The address of the class’s object is assigned to the pointer whose function is
called by the pointer.
 When the function is defined, it is preceded by ‘virtual’ keyword in main class.
 The same function is redefined in derived class using ‘out’ keyword.
What is virtual function ?

A virtual function is a special form of member function that is declared within a base class
and redefined by a derived class. The keyword virtual is used to create a virtual function,
precede the function's declaration in the base class. If a class includes a virtual function and
if it gets inherited, the virtual class redefines a virtual function to go with its own need.
What is inheritance?
Inheritance is an Object Oriented Programming (OOP) feature that allows the properties of an object
to be used by different objects.

What is abstract class?


A class which contains the abstract keyword in its declaration is known as abstract
class.

 Abstract classes may or may not contain abstract methods, i.e., methods without
body ( public void get(); )
 But, if a class has at least one abstract method, then the class must be declared
abstract.
 What is an interface?

When referring to software, an interface is a program that allows a user to interact computers
in person or over a network. An interface may also refer to controls used in a program that
allow the user to interact with the program.
What is thread synchronization?

Thread synchronization is the concurrent execution of two or more threads that share critical
resources. Threads should be synchronized to avoid critical resource use conflicts. Otherwise,
conflicts may arise when parallel-running threads attempt to modify a common variable at the same
time.

Serial
No IP address Port Number
Internet Protocol address (IP
address) used to identify a host Port number is used to identify an
01. in network. processes/services on your system

IPv4 is of 32 bits (4 bytes) size


and for IPv6 is 128 bits (16
02. bytes). The Port number is 16 bits numbers.

IP address is the address of the Port number is the address of the layer-4
03. layer-3 IP protocol. protocols.

IP address is provided by admin


of system or network Port number for application is provided
04. administrator. by kernel of Operating System.

netstat command can be used to find


ipconfig command can be used Network Statistics Including Available
05. to find IP address . TCP Ports.

06. IP address identify a Port numbers are logical interfaces used


host/computer on a computer
network. by communication protocols.

192.168.0.2, 172.16.0.2 are 80 for HTTP, 123 for NTP, 67 and 68 for
07. some of IP address examples. DHCP traffic, 22 for SSH etc.

You might also like