Microsoft.NET Interview Questions And Answers

Download Microsoft.NET Interview Questions and Answers PDF

Prepare comprehensively for your Microsoft.NET interview with our extensive list of 31 questions. Each question is crafted to challenge your understanding and proficiency in Microsoft.NET. Suitable for all skill levels, these questions are essential for effective preparation. Secure the free PDF to access all 31 questions and guarantee your preparation for your Microsoft.NET interview. This guide is crucial for enhancing your readiness and self-assurance.

31 Microsoft.NET Questions and Answers:

Microsoft.NET Job Interview Questions Table of Contents:

Microsoft.NET Job Interview Questions and Answers
Microsoft.NET Job Interview Questions and Answers

1 :: Explain How does assembly versioning work?

An assembly is a collection of one or more files grouped together to form a logical unit. The term ?files? in this context generally refers to managed modules, but assemblies can include files that are not managed modules. Most assemblies contain just one file, but assemblies can and sometimes do include multiple files. All the files that make up a multifile assembly must reside in the same directory. When you use the C# compiler to produce a simple EXE, that EXE is not only a managed module, it?s an assembly. Most compilers are capable of producing managed modules that aren?t assemblies and also of adding other files to the assemblies that they create. The .NET Framework SDK also includes a tool named AL (Assembly Linker) that joins files into assemblies.
Read More

2 :: What is Difference between static page and dynamic page?

Static Pages
Quick and easy to put together, even by someone who doesn't have much experience.
Ideal for demonstrating how a site will look.
Cache friendly, one copy can be shown to many people.

Dynamic Pages
Offers highly personalized and customised visitor options.
Database access improves the personalized experience (as opposed to using just client side cookies)
Scripts can read in data sources and display it differently depending on how it is run.
Can create the illusion of being updated regularly using time and date sensitive routines (or even randomisers) to display pre-written text.
Read More

3 :: Explain CLR, CTS and CLS?

CLR
See definition for common language runtime.
CLS
See definition for Common Language Specification.
common type system
The specification that determines how the common language runtime defines, uses, and manages types.
common language runtime
The engine at the core of managed code execution. The runtime supplies managed code with services such as cross-language integration, code access security, object lifetime management, and debugging and profiling support.
Common Language Specification (CLS)
A subset of language features that is supported by a broad set of compliant tools. CLS-compliant components and tools are guaranteed to interoperate with other CLS-compliant components and tools. See also: CLS-compliant.
Read More

4 :: Explain SOAP and XML?

SOAP, Simple Object Access Protocol is the standard format for requesting web services.

XML, Extensible Markup Langage is the format for exchanging data between Internet Application.
Read More

5 :: What is .NET architecture and framework?

NET framework is a foundation calss on which you can build robust applications .This framework comprises of web forms,window forms andconsole applications..NET framework is basically a collection of services and classes.This exists as a layer between .NET applications and underlying operating systems.
Read More

6 :: What is ISAPI?

ISAPI stands for Internet ServerApplication Programming Interface, is a specification that allows developers to extend IIS by writing components that proces raw HTTP requests.

An ISAPI components ends up as DLL that IIS directs all requests and responses through.

In ASP.Net ISAPI component has been evovled into httpHandler.

ISAPI can be written only in C++, wherein httpHandler can be written using any .Net compatible language.
Read More

7 :: Explain What platforms does the .NET Framework run on?

The .Net Framework runs on
Windows XP,
Windows Server 2003,
Windows 2000, NT Server 4.0,
Windows 98, or Windows ME, a
lthough ASP.NET runs only on the first 3.
Read More

8 :: Explain ASP.NET?

ASP.NET is the latest version of Microsoft's Active Server Pages technology (ASP).

ASP.NET is a part of the Microsoft .NET framework, and a powerful tool for creating dynamic and interactive web pages.
Read More

9 :: What is the difference between .Net2000 and .Net2005(features)? Which one is better?

.net 2005 is better as it has many additional functionalities.in .net 2000,there was not the login control...but in 2005 it is.similarly many more functions is added in 2005.
Read More

10 :: Explain How do assemblies find each other?

If the assemblies is private means doesn't worry about it. The assembly name is unique. Whereas the assemblies is like shared assembly find the name and versioning number of the assembly.
Read More

11 :: What is .net3.0 and .net3.5?

.net 3.0 is the framework and .net 3.5 is also framework with some extra features than 3.0 framework.
Read More

12 :: Explain the difference between a private assembly and a shared assembly?

The .NET Assemblies Part1

This online presentation about .NET assemblies helps the webmasters to know about the three tier architecture and about .NET assemblies. The author describes the real need of the three-tier architecture. The author divides the application into three layers named as Presentation, Business Logic and Database. This article describes each with its pictorial representation given.

The .NET Assemblies Part 2

The author defines the assemblies and highlights the benefits of .NET assemblies. The author also discusses about the two developments - Code behind and Custom controls. The author tells that by generating the pre-compiled libraries of IL, the users could improve the performance of their applications. This gives a solution to the beginners thirst to know about .NET assemblies.

The .NET Assemblies Part 3

This article deals with assemblies and their implementation in .NET. The main content of this article is about implementing a simple .NET assembly. In ASP.NET web applications, the users might employ many pre-built assemblies. The author helps by teaching the method of creating their own assemblies. One such creation of the component which would facilitate the users with some options to be viewed as a message or information on the screen. The sample source code is given along with this article.
Read More

13 :: Explain What is the Difference between web application and enterprise application?

Web applications are stored on a server and delivered to users over the Internet. A Web application is usually a three-tier structure, comprising a User Service tier (allowing user access to the application), a Business Service tier (allowing the user to carry out complex activities) and a Data Service tier (which allows data storage and retrieval).
An application that conforms to the Java 2 Platform Enterprise Edition specification.
Read More

14 :: Explain What is an Application Domain?

Operating systems and runtime environments provide some form of isolation between applications. This isolation is necessary to ensure that code running in one application cannot adversely affect other, unrelated applications
Read More

15 :: Explain What is reflection in Microsoft .NET Context?

Net Reflection :

The REFLECTION is used to read the metadata information like(type, reference and methods). Which is derived from system.assembly.reflection class object.

The simple meaning is to read assembly information by using this system.assembly.reflection class.
Read More

16 :: Explain garbage collection?

The automatic memory management scheme employed by the .NET Framework (CLR) is called garbage collection.
Unused memory is automatically reclaimed by garbage collection without interaction with the application
The garbage collector is a low-priority thread that always runs in the background of the application under normal circumstances. It operates when processor time is not consumed by more important tasks. When memory becomes limited, however, the garbage collector thread moves up in priority. Memory is reclaimed at a more rapid pace until it is no longer limited, at which point the priority of garbage collection is again lowered.

in c# memory is divided in five blocks stack,heap,Global,static,& the code block..all the objects created in the heap block(the total size of heap block is 64 mb)whn the heap block is about to full the gc(garbaze collector)automatically invokes & it deletes all those objects which are not in use or not pointing anywhere..in other words we can say dat the GC free the memory by deleting the unused objects or references.
a user never know when GC runs or invokes becz it runs automatically when d heap memory is going to full..
GC takes cares of heap block not stack block so it is good for the user to create any number of objects without care of memory. c# launches new features of garbage collection before c# (in any languages like c or c#)whn a user create a object it thinks first about memory and after dat its user responsibility to free d memory bt this is not d case in c# bcoz GC automatically takes cares of MEMORY MANAGMENT
Read More

17 :: Explain What does managed mean in the .NET context?

The executed by the CLR environment it is called Managed Code, which can provide security, Exception Handling and Memory Management (Garbage Collection). Provide Type Safe.

It becomes light weighted code.

The code which are all run under the CLR(Common Language Runtime) is called managed code.
The code which starts with unsafe doesn't run under CLR, called unmanaged code.

managed code is the safe code that couldnot make any harmful activities knowingly or unknowingly to the developer.

managed code is the secured harmless code without the developers knowledge.
Read More

18 :: How to customize the trace output?

the tracing output's target by adding TraceListener instances to or removing instances from the Listeners collection.
Read More

19 :: What languages does the .NET Framework support?

Commonly used languages are

ASP.NET with C#sharp
ASP.NET with VB.NET
visual C++
Visual J#
Read More

20 :: What is the difference between asp.net and asp?

There are a number of striking differences between ASP.NET and ASP. For some of these differences, the benefits will be immediately obvious. For others. We?ll have to get used to new ways of thinking about dynamic web Pages. Among the changes are:

ASP.NET pages are complied, not interpreted. A binary executable is compiled upon the first request to the page. This image is stored in an in-memory cache on the web server, and subsequent request to this page use this executable to service the request.

The Framework provides a very clean separation of code from content. With ASP, because the HTML is generated as the page is interpreted, your page logic must be embedded into the page at the location where you want the HTML generated by this logic to be output. With ASP.NET, no HTML is generated until all of the code in your page has finished executing. The entire task of HTML generation is done in the page?s rendering step, which uses the properties for all of us who consider script writing and HTML generation a poor substitute to sitting down and writing real code.



ASP.NET Framework maintains state for you. Do you ever have to post of the server to apply validation logic to a data entry HTML form? When there?s a problem, you must write code to repopulate every input on your HTML form. You must also execute script inline to add validation messages next to the fields that have errors. The resulting code is often a tangled mess. If the business logic changes, that?s a tough page to maintain. With the ASP.NET Framework, this state maintenance is done for you. The fields maintain their value without a single line of code written by you. This applies not only to simple text inputs but also to SELECT lists, check boxes, radio buttons, and other input types on your form. Built-in validation controls allow you to enforce your business logic by adding a single tag to your page and simply checking the Page. Is Valid property when it posts to the server.



ASP.NET runs events on the server. In ASP, because of the amount of script that must be mixed with the HTML, it?s common to split a single functional area across several pages. One page may collect data from a user, whereas another accepts the HTTP post and updates your relational data, telling your user the result of the operation. Although its possible to put this functionality into a single ASP page you do so at the risk of needing to maintain a garbled mess of code over the long haul. Breaking these functions into separate pages causes the number of files in your web site to balloon. With ASP.NET, you can set up server side event traps



ASP.NET provides a consistent event model. With ASP, script is executed on the page in a top-down manner. Although it?s possible to put your script within functions that you call from the page body, there?s no event model that fires at specific points in the lifecycle of your page. With ASP.NET, this event model has been added. Most importantly, there?s an event fired whenever your page. With ASP.NET, this event your page begins to load. This is very much like the from_Load event in VB. The page load event can be trapped in a script tag or from your code behind the page. This gives you a consistent model for setting up your output.

script is executed on the page in a top-down manner. Although it?s possible to put your script within functions that you call from the page body, there?s no event model that fires at specific points in the lifecycle of your page. With ASP.NET, this event model has been added. Most importantly, there?s an event fired whenever your page
Read More

21 :: Explain serialization?

SERIALIZATION: It is the process of converting the objects into stream of bytes which is used for Web Services or Remoting. There are 2 types of serializers present

1 XML Serializer:- used for web services

2Binary Formatter:-used for remoting

searialization means we can do changes in a class object & these changes are saved somewhere means this object state is saved smwhere in memory now whnever another object of dis class is created by d user dis new object automatically receives all the values of the previous object becoz previous object(state) value are already stored somewhere
Read More

22 :: What is Code Access Security (CAS)?

Identity permissions control code access from one assembly to another. You can use identity permissions, which are a subset of code access permissions, either declaratively or imperatively

CAS is a part of .NET security model that determines whether a piece of code is allowed to run and what resources it can use while running,eg:CAS will allow a application to be read but cannot delete it.
Read More

23 :: Explain What languages does the .NET Framework support?

1. ASP.NET Web applications: These include dynamic and data driven browser based applications.

2. Windows Form based applications: These refer to traditional rich client applications.

3. Console applications: These refer to traditional DOS kind of applications like batch scripts.

4. Component Libraries: This refers to components that typically encapsulate some business logic.

5. Windows Custom Controls: As with traditional ActiveX controls, you can develop your own windows controls.

6. Web Custom Controls: The concept of custom controls can be extended to web applications allowing code reuse and modularization.

7. Web services: They are ?web callable? functionality available via industry standards like HTTP, XML and SOAP.

8. Windows Services: They refer to applications that run as services in the background. They can be configured to start automatically when the system boots up.
Read More

24 :: How to spawn a thread?

Threads are processed differently depending on IIS5. or IIS 6 is used. For each request that comes in, a new instance of the appropriate HttpApplication-derived class is created, as are the associated modules for that app. To avoid reallocating apps and modules too often, each AppDomain maintains a pool of apps and modules. The maximum size of the app pool is the same as the size of the thread pool, so by default, up to 25 requests per worker process can be processed concurrently, each with its own app and module set.
Read More

25 :: How to redirect tracing to a file?

TextWriterListener will redirect the tracing output to an instance of the TextWriter or to any object of stream class such as log file, network stram or Console.
Read More