What is ASP.NET ? - Part 1

ASP.NET is a Web Application Framework developed by Microsoft to build dynamic data-driven Web applications and Web Services supported by browsers. 
  • ASP.NET is a successor to Classic ASP(Active Server Pages)
  • ASP.NET is a subset of .NET Framework.
  • It allows Programmers/Developers/Organizations to build dynamic web sites using major languages like C# & VB.NET.
  • ASP.NET is Compiled, not Interpreted.
  • ASP.NET can be used to develop desktop web applications, mobile and tablet applications as well.
  • ASP.NET is object-oriented, multi-language, multi-device and multi-browser that runs inside the Common Language Runtime(CLR) of .NET Framework.

Other Technologies used to build web applications ?
  • Ruby on Rails,
  • Java/J2EE,
  • CGI/Perl,
  • Macromedia,
  • LAMP(Linux, Apache, MySQL, PHP).

What is a Web Application ?
  • A Web Application is an application that is accessed by users using web browsers.
  • Type of Web Browsers:
    1. Microsoft Internet Explorer,
    2. Google Chrome,
    3. Mozilla Firefox,
    4. Netscape Navigator.

Types of Web Applications ?
  • Customer-facing applications are known as eCommerce or B2C sites and use the internet. These typically present a customer with choices of products or services to buy using a shopping cart and payment method. Examples are travel reservations, http://www.amazon.com and http://www.ebay.com. This market has really taken off. 
  • Employee-facing applications use the intranet in a company. One example is a company's accounting application. Another might be employee expense reporting. A third might be the ERP (enterprise requirements planning) system. These applications previously operated on an internal client-server network. They are now web-enabled to make them easier to use and deploy. Disparate applications, such as an ERP and CRM (Customer Relationship Management) systems are now being integrated using XML and web services.
  • Customer-Supplier facing applications are known as B2B (Business to Business) sites and use the extranet, (an extension of an intranet that allows outside companies to work in a password-protected space). B2B sites provide a secure means for sharing selected information. One example is supply chain software that allows all suppliers to see demand and inventory in the supply chain. Another example is procurement software that allows a customer to send RFQs(Request For Quotations) and receive quotes over the web. A third example is collaboration software that allows companies to share product development and project management information.
Advantages of Web Applications ?
  • ASP.NET drastically reduces the amount of code required to build large applications.
  • With built-in Windows authentication and per-application configuration, your applications are safe and secured.
  • It provides better performance by taking advantage of early binding, just-in-time compilation, native optimization, and caching services right out of the box.
  • The ASP.NET framework is complemented by a rich toolbox and designer in the Visual Studio integrated development environment. WYSIWYG editing, drag-and-drop server controls, and automatic deployment are just a few of the features this powerful tool provides.
  • Provides simplicity as ASP.NET makes it easy to perform common tasks, from simple form submission and client authentication to deployment and site configuration.
  • The source code and HTML are together therefore ASP.NET pages are easy to maintain and write. Also the source code is executed on the server. This provides a lot of power and flexibility to the web pages.
  • All the processes are closely monitored and managed by the ASP.NET runtime, so that if process is dead, a new process can be created in its place, which helps keep your application constantly available to handle requests.
  • It is purely server-side technology so, ASP.NET code executes on the server before it is sent to the browser.
  • Being language-independent, it allows you to choose the language that best applies to your application or partition your application across many languages.
  • ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.

What is GAC ? - Part 13

Global Assembly Cache(GAC) :

  • GAC stands for Global Assembly Cache and contains strong named assemblies.
  • Assembly in the GAC can be shared by all assemblies without having to copy the assembly locally.
  • Basically, it is recommended to install an assembly into GAC, only when required and shared by applications, otherwise they should be kept private.

How to install an assembly into GAC :

There are two ways to install an assembly into GAC,
  • Drag and Drop through Windows Explorer,
  • Using Gacutil.exe(GAC Utility Tool)
To install an assembly using gacutil, use the following command:

gacutil -i C:\DemoProject\Demo.dll

Above command installs Demo.dll into the GAC.

To uninstall an assembly from GAC, use the following command:

gacutil -u DemoLibrary


What is CLS ? - Part 12

Today, we will discuss Common Language Specification, which is a subset of CTS.

Common Language Specification(CLS) :
  • It defines a set of rules and guidelines that every language must follow which runs under .NET Framework. The languages which follow these set of rules are considered CLS Compliant.
  • CLS enables cross-language integration.
  • Example, C# doesn't support multiple inheritance but C++ does support, so when you try to implement C++ code in C# code, it is not possible.

What is CTS ? - Part 11

Today, we will discuss CTS which is the one of the most important component of .NET Framework. Since, .NET is language independent and supports more than 25+ languages, developers need to code according to the datatypes in their own programming language.

Common Type System(CTS):

  • Common Type System defines how types are declared, used and managed in Common Language Runtime and is also an important of the runtime's cross language integration.
    • e.g an integer variable in c# is written as int, whereas in VB, it is written as Integer. In .NET framework, it is assigned to only single class that is System.Int32.
  • It establishes a framework which performs cross language integration, type-safety and high performance code execution.
  • Provides an object-oriented model that supports the complete integration of many programming languages.
  • Defines protocols that languages must follow which helps us to ensure that objects written in different languages can interact with each other.
  • CTS is classified as a single rooted hierarchy with System.Object as the base type from which all other types are derived.
  • CTS supports two different kinds of types:
    • Value Types: It contains a value that need to be stored directly on the stack or allocated in-line in structure.
    • Reference Types: It is stored as a reference to the values memory address and allocated on heap.

What is CLR ? - Part 10

Today, we will talk about the most important component of .NET Framework.

Common Language Runtime(CLR):

  • It is a core runtime and managed execution environment for Microsoft's .NET Framework. It manages the execution of code in different supported languages.
  • CLR transforms the source code into native code or byte code and then the program gets executed.
  • It works as a layer between Operating Systems and Applications written in .NET languages that conforms to Common Language Specification.
  • CLR Component JIT Compiler converts the IL code to native code on demand at application run-time.
  • The language compilers stores metadata that describes the members, references and types in the compiled code. The CLR uses the metadata to layout instances in memory, locate and load classes, enforce security, set runtime context boundaries and generate native code.
  • It provides services such as memory management, thread management, security management, code verification, compilation and other services.

Architecture of CLR:


Base Class Library:
  • It provides class libraries support to an application when IL code is converted to an Native code.
  • Conversion is done through JIT compiler and its end result is Portable Executable(PE) File.

Thread Support:
  • Thread is basically a light-weight processes responsible for multi-tasking within Single/Multiple Applications.
  • Threads are managed through CLR and it maintains parallel code execution.

COM Marshaller:
  • It enables communication between application and COM objects.

Type Checker:
  • CLR manages code execution by converting source code to IL code through language compilers which in turn converts IL code to native code.
  • IL code is also called managed code because CLR manages the code.

Exception Manager:
  • It allows us to perform debugging at application run time.

Common Language Specification(CLS):
  • CLS defines the rules and standards to which languages must adhere in order to be compatible with other .NET languages. 
  • It allows C# to inherit classes defined from different languages.

Common Type System(CTS):
  • It allows CLR to determine datatypes defined in two different languages to communicate with common base system.

Type Checker:
  • It allows CLR to verify types used in the application with CLR or CTS standards, to ensure type-safety.

Exception Manager:
  • Exception Manager will handle exceptions thrown by application while executing try/catch block provided by an exception.
  • In "Try" block where a part of code expects an error.
  • Whereas "Catch" block throws an exception caught from Try block, if there is no catch block, it will terminate application.

Security Engine:
  • It enforces security permissions at code-level security, folder-level security, and machine-level security using .NET Framework setting and tools provided.

Garbage Collector:
  • It handles automatic memory management and it releases memory of unused objects in an application.

Common .NET Framework Tools - Part 9

Let us discuss the various command line tools available within .NET Framework. These tools comes with .NET Framework and it should be used through Developer Command Prompt for Visual Studio.


Assembly Linker - Al.exe 
  • Al tool can create an assembly or resource file with the manifest in a separate file out of modules.
  • Syntax: al [source] [options]
  • This tool allows us to create multi-file assembly outside .NET. A multi-file assembly is useful to combine modules developed under different .NET languages into a single application.

Global Assembly Cache - Gacutil.exe
  • It allows you to view and modify contents of GAC. It maintains assembly versions and their dependency's.
  • Syntax: gacutil [options] [assemblyname | assemblypath | assemblyListFile]

IL Assembler - Ilasm.exe 
  • When we compile managed code, the code is converted into MSIL code; this is CPU independent language which is converted to native code.
  • We can use Ilasm tool to generate a portable executable (PE) file from the MSIL code. The resulting executable file is performance optimized, where the Ilasm tool does not create intermediate object file
  • Syntax: Ilasm [source] filename [options]
  • We can specify multiple source files to produce a single PE file.

IL Disassembler - Ildasm.exe 
  • Ildasm tool is used to view PE file contains that is nothing but the MSIL code as a parameter and creates the text file that consists of managed code.
  • Syntax: ildasm [options] [PEfilename] [options]

Code Access Security Policy Tool - Caspol.exe 
  • Caspol is nothing but Code Access Security Policy tool, which allows us to grant and modify permissions granted to code groups at the user-policy, machine-policy, and enterprise-policy levels. Etc...
  • Syntax: caspol [options]

Installer Tool - InstallUtil.exe

  • It is a command-line utility tool that allows you to install and uninstall server resources by executing the installer components in specified assemblies.
  • It works in addition with classes in System.Configuration.Install namespace.
  • Syntax: installutil [/u[ninstall]] [options] assembly [[options] assembly]

Strong Name Tool - Sn.exe
  • It helps sign assemblies with strong versions name.
  • It provides options for key management, signature generation and signature verification.
  • Syntax: sn [-quiet][option [parameter(s)]]

How to check which version of .NET Framework is installed on your machine ? - Part 8

Today, we will discuss about how to check which version of .NET framework is installed on your machine (mine is Windows 7).

3 Steps to find which version is installed on your machine:
  • Using Command Prompt
  • Using Windows Explorer
  • Using Registry

Using Command Prompt:
  • Open Command Prompt from start menu and execute following command,
    wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version
    Copy the above command and open the command prompt, right+click on title bar of command prompt, select Edit -> Paste, the above command.
  • Hold on for few seconds it will show the list of all .NET framework versions installed on your Windows 7 machine,


          
Using Windows Explorer:  

  • Open Run window using Windows+R Keyboard short-cut or directly using Windows Explorer.
  • Copy the below command in above run window and hit Enter,
  • %windir%\Microsoft.NET\Framework\
  •  It will open the directory as shown in below screenshot, and you will see different .NET versions installed on your machine.


Using Registry:  

  • Type regedit into Run Window or Start searchbox and hit Enter, it will open Registry Editor.
  • Go to ->
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
  •  In below screenshot, we will see separate keys for each .NET Framework versions installed on your system,

I hope you would have enjoyed reading the above tutorial, to quickly check which version of .NET framework is installed on your machine.

What is Framework Class Library ? - Part 7

Let us discuss the .NET Framework Class Library and its system functionality which is designed to be the foundation of .NET Framework applications, components and controls.

Framework Class Library:
  • .NET Framework Class Library consists of a series of reusable classes, interfaces and value types that can be used to develop applications and provide access to system functionality.
  • Framework Class Library is classified in hierarchical tree groupings which is itself divided into namespaces. Namespaces is a logical grouping of types, classes and interfaces. Grouping is basically done to avoid conflicts between one or more classes.
  • Classes are accessed by namespaces which resides within assemblies. System namespace is the root of all Namespaces.
  • FCL is based on Common Type System(CTS). It allows framework to operate with multiple languages within managed runtime.
  • A Namespace describes its basic purpose. Example, third party developers usually follow company standards for defining namespace i.e <Company Name>.<Operations>.<Functions>, secondly, System.Data.SqlClient is a fully qualified namespace.

Role of FCL:
  • System.Windows.Forms - Create rich graphical user interface applications.
  • System.Web - Creating Dynamic web-based applications ASP.NET.
  • System.IO - Perform input/output operations.
  • System - Access data-typesevent-handlers and exceptions.
  • System.Reflection - Accessing information within assemblies dynamically.
  • Access and modify data into various formats - System.Data.SqlClient, System.Data, System.Xml
  • System.Security - Performing Security checks.
  • All class types in FCL are Common Language Specification(CLS) compliant.



Managed Code and Un-Managed Code in .NET - Part 6

Today, we will talk about Managed and Un-Managed code in .NET Runtime Environment. In previous tutorials we have seen how .NET code execution process is implemented.

Managed Code:

  • In simple words, the code that is developed within .NET Framework or code whose execution is managed by CLR is termed as "Managed Code".
  • Apart from Managed code execution, CLR also handles other responsibilities such as automatic memory management, run-time type checking, type safety.
  • Managed code is a piece of code developed in high level programming languages such as C#, VB, F# run on top of .NET platform. When you compile the source code generated by these language compilers is converted in Intermediate language(IL) code. Machine code is generated by CLR by converting IL code.
  • By using managed code, we avoid many typical programming errors which can lead to security bugs and flaws.
  • C++ is one of the exceptions to the managed code execution process, as it produces unmanaged code that runs on Windows.
  • Managed Code runs inside the Application Domain.

Un-Managed Code:
  • The code which compiles directly to machine code and in-turn it is executed by OS is termed as "Un-Managed Code".
  • It is targeted to specific architecture and it will only run under the executed platform. So, If anyone wants to run the Un-Managed Code on other environment it needs to be compiled under that platform.
  • Un-Managed code consists like binary image which is directly loaded into memory. It results into faster code execution, but it is time consuming to rectify errors.
  • Code compiled by legacy Borland C/C++ compilers, COM Components, ActiveX interfaces, and Win32 API functions are examples of Un-Managed Code.
  • C# is only language that allows you to use unmanaged constructs such as pointers directly in code by utilizing what is known as unsafe context whose execution is not managed by CLR.
  • Un-Managed Code runs as a process on Operating system.

Overview of JIT Compilation - Part 5

In today's digital world, programming languages such as C#, VB employ a user-friendly syntax which is not interpreted by computers. Before a computer can execute the source code(i.e. user friendly syntax), special tools like compiler must rewrite it into machine language known as object or binary code. This compilation process can be compiled implicitly or explicitly.

Explicit Compilation:

Explicit compilation converts the higher level language to lower level language(binary code or object code) ahead of program execution.Every line of code is interpreted and executed such that machine hardware understands easily.

Implicit Compilation:

Implicit compilation follows a 2-step process. The first step is converting the source code(C#) to intermediate language(IL) by language specific compiler(C# Compiler). The second step is converting the IL to machine instructions. The main difference between explicit compilation is that only executed fragment of IL code are compiled into machine code, at runtime.For Example, .NET framework, which follows similar compilation process with the help of Just-In-Time(JIT) Compilation.

Just-In-Time Compilation:

The JIT compiler is part of Common Language Runtime. The CLR manages the execution of .NET applications. As depicted in below diagram, the source code is compiled to .exe or .dll by the language specific compiler. The JIT compiler processes the IL code to machine specific code for an environment. JIT compiler calls only those methods called at runtime. It also keeps track of any variable or parameter passed through methods which enforces type-safety in runtime environment.


There are 3 different types of JIT Compilation:

  • Normal JIT CompilationWith Normal JIT compiler, methods are compiled when called at runtime, where as after execution these methods are stored in memory and no compilation is required next time for these methods. The next time the method is called at runtime, it is accessed directly from memory cache.
  • Econo-JIT Compilation: With Econo-JIT Compiler, it compiles methods when called at runtime and removes them from memory after execution.
  • Pre-JIT Compilation: With Pre-JIT Compiler, it compiles the entire assembly instead of used methods. For example, Ngen.exe (Native Image Generator).
The .NET JIT Compiler optimizes the most used IL code for faster performance and I/O Operations.



Flow of .NET Program Execution - Part 4

As we all know, computer machines only understands binary or native code. Accordingly, when we execute a Non-Dotnet application(e.g C++ or VB6), the C++ or VB6 compilers will execute the respective language source code in binary code, which is then understood by operating system and terminal hardware for processing.

Non-Dotnet Application Program Execution:



Since, binary code is generated specific to operating system, if you copy and try to execute the compiled binary code on another operating system(e.g Unix), it will fail due to portability issues between platforms (Windows and Unix).

Now, we will understand how a .NET program is executed. Eventually, .NET can be used to create different types of applications such as Web, Windows, Console and Mobile applications. Every type of .NET applications executed undergoes the below steps:

  1. The .NET Application source code is compiled into Intermediate Language (IL) which is also referred as Microsoft Intermediate Language(MSIL) and Common Intermediate Language(CIL). Both .NET and Non-.NET applications generate an assembly. Assemblies have an extension of .dll and .exe. For example, if you compile an windows or Console application it generates an .exe, where as we compile a web or class library project we see a .dll
  2. The difference between a .NET and Non-.NET assembly is that .NET assembly is in Intermediate Language format where as Non-.NET is in binary code format.
  3. Non-.NET applications run directly on top of Operating system, where as .NET application run on top of Common Language Runtime (CLR) Environment which contains Just-In-Time(JIT) compiler which in-turn converts the IL code to binary code.
.Net Application Program Execution:


As we discussed before, .NET assemblies are converted into IL code and not binary code, they can be executed/portable on any platform provided we have target platform as CLR environment. Intermediate Language is also called as Managed Code, because CLR manages the code that runs inside IL. For example in C++ program, the developer is responsible for de-allocating the memory assigned to the object. If a programmer forgets to de-allocate the memory object, we may run into memory leakage problems resulting into runtime out of memory exceptions. On the other side of .NET, de-allocating the memory object is taken through CLR by automatically running garbage collection process. Since, CLR is managing and executing the Intermediate Language, IL is also referred to as Managed code.

.NET platform supports various programming languages like C#, VB and C++. C# can only generate IL managed code, whereas C++ can generate both Managed(IL) and Un-Managed(binary) code. Binary code is persistent only when the program is in execution environment, after the program is closed it gets destroyed.

Architecture of .NET 4.5 - Part 3

In this tutorial, we will discuss latest architecture of .NET framework 4.5 in Visual Studio 2012.



Components of .NET 4.5 Architecture:
  • Common Language Runtime: CLR acts as runtime environment for .NET framework which runs the code and provides services to make the development process much easier.    
  • Base Class Library: It provides a set of base class libraries which provides set of functions, interfaces, classes and features which can be used with any programming language which implements .NET framework.
  • Portable Class Library: It allows you to develop and build managed assemblies which enables you to work on multiple .NET Framework platforms.
  • Managed Extensibility Framework: It is a library for creating lightweight extensible applications. It also allows application developers to discover and use extensions with no configuration required. It enables extensions to be used across applications as well.
  • Dynamic Language Runtime: It provides runtime environment for execution of dynamic languages such as Ruby, Python etc. under full control of CLR.
  • WinRT: Windows Runtime APIs provides the user interface elements for building Windows Store Apps and provides access to Windows 8 or Windows RT OS features.
  • ASP.NET: It is used to build rich interface web enabled applications.
  • Windows Store Apps: It is an application that runs on Windows 8 devices and can take advantage of WinRT APIs.
  • Desktop Apps(Windows Forms): It is a traditional Windows App running and developed for Windows XP, Windows  Vista, Windows 7 and Windows 8. Examples include Office Products, Notepad etc.
  • Windows Presentation Foundation (WPF): It is used to create applications with rich user experience. It includes UI, 2D graphics, 3D graphics and multimedia taking advantage of modern graphics card.
  • Silver Light: It allows designers and developers to build Rich Internet Applications (RIA) embedded in web pages.
  • ADO.NET: It is used to create data access layer to query and manipulate data from underlying data source like SQL Server,Oracle etc.
  • Language Integrated Query (LINQ): It allows you to query data from various data sources(like Collections, Generics, SQL Databases, Datasets) using a SQL query like syntax with .NET framework languages like C# and VB.
  • ADO.NET Entity Framework: It is Object Relational Mapping(ORM) framework which is used to query and store data in relational databases like SQL Server, Oracle etc.
  • Parallel Extension: It allows you to distribute your work code across multiple processors to take advantage of hardware.
  • Windows Communication Foundation (WCF): It is used for building and developing services based on WS-* Standards.
  • ASP.NET Web API: It is a framework for building HTTP services that can be consumed by a broad range of clients such as mobiles, browsers, iPhone and tablets.
  • Signal R: It is a library that simplifies the process of adding real time web functionality to applications. Real-time web functionality means the ability to push server side content to connected clients instantly as it becomes available, rather than having the server wait for the client to request new data.
  • Windows Work Flow(WF): It is a process to design and structure business oriented process workflow and rules engine.
  • Visual Studio 2012: This IDE offers a set of tools that help you to write and modify the code for your programs, also detect any bugs, correct errors, and building your project solutions. You can build Mobile apps, Desktop apps, Windows Store apps, ASP.NET web apps, communication services and web services.

.NET Version History - Part 2

In this section, we will discuss the brief history of .NET evolution over the past decade and overview of its core features at the end of below illustrated diagram:

Version History of .NET Framework ?


.NET Version
Integrated Development Environment(IDE) Version
Features Detail
4.5.1
Visual Studio 2013
1.   Expanded support for Windows store apps
2.   Support for automatic binding redirection
3.   Expanded Support for Portable class libraries
4.   Improvements in performance and debugging improvements
5.   Expanded support for Parallel Computing
6.   Expanded support for WCF, WPF,  & WWF.
7.   Support for Parallel computing
4.5
Visual Studio 2012
1.   Extended Support for CLR 4.0
2.   Async Support.
3.   Expanded support for Windows store apps
4.   Improvements in performance and debugging improvements
5.   Expanded support for Parallel Computing
6.   Expanded support for WCF, WPF,  & WWF.
 4.0
Visual Studio 2010
1.   Introduced CLR 4.0
2.   Managed Extensibility framework(MEF)
3.   Dynamic Language Runtime(DLR)
4.   Task Parallel Library
5.   Big Integer and Complex Numbers
6.   Tuples
7.   Covariance and Contra- variance
3.5
Visual Studio 2008
1.   Built-In Ajax Support
2.   LINQ
3.   Dynamic Data
4.   Extension Methods
5.   Multi-targeting framework support
3.0
Visual Studio 2005
1.   Lambda Expressions
2.   Windows Communication Foundation(WCF)
3.   Windows Presentation Foundation(WPF)
4.   Windows Workflow Foundation(WWF)
5.   Windows Card-space
6.   Auto-Implemented
7.   Implicitly typed local variable and arrays
8.   Anonymous Types
9.   Object and Collection Initializers
2.0
Visual Studio 2005
1.   Introduced CLR 2.0
2.   Generics and generics collections
3.   Partial Classes
4.   Nullable types
1.1
Visual Studio .NET 2003
1.   Enhancement to ASP.NET and ADO.NET 2.0
2.   IPv6 Support
3.   Support for mobile ASP.NET controls
4.   Support for ODBC and Databases
5.   Security Enhancement
6.   .NET Remoting
7.   Support for XML

1.0
Visual Studio .NET
1.   Introduced CLR 1.0
2.   Support for Object oriented application development
3.   Support for class libraries


In-depth features overview of .NET Framework

.Net Framework 2.0 Features

ADO.NET

New features in ADO.NET include support for user-defined types (UDT), asynchronous database operations, XML data types, large value types, snapshot isolation, and new attributes that allow applications to support multiple active result sets (MARS) with SQL Server 2005.

ASP.NET 

The Microsoft .NET Framework 2.0 includes significant enhancements to all areas of ASP.NET. For Web page development, new controls make it easier to add commonly used functionality to dynamic Web pages. New data controls make it possible to display and edit data on an ASP.NET Web page without writing code. An improved code-behind model makes developing ASP.NET pages easier and more robust. Caching features provide several new ways to cache pages, including the ability to build cache dependency on tables in a SQL Server database.

ASP.NET accommodates a wide variety of browsers and devices. By default, controls render output that is compatible with XHTML 1.1 standards. You can use device filtering to specify different property values on the same control for different browsers.

.NET Remoting 

.NET Framework Remoting now supports IPv6 addresses and the exchange of generic types. The classes in the System.Runtime.Remoting.Channels.Tcp namespace support authentication and encryption using the Security Support Provider Interface (SSPI). Classes in the new System.Runtime.Remoting.Channels.Ipc namespace allow applications on the same computer to communicate quickly without using the network. Finally, you can now configure the connection cache time-out and the number of method retries, which can improve the performance of network load-balanced remote clusters.

XML

The new System.Xml.XmlReaderSettings class allows specification of the type of verifications to be done when using a subclass of XmlReader to read XML data.

It is now possible to partially validate a DOM tree loaded within an instance of XmlDocument.

It is now possible to modify a DOM tree stored in an XmlDocument instance through the XPathNavigator cursor API.

.Net Framework 3.0/3.5 Features

Windows Presentation Foundation (WPF)

Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications. The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware.

WPF extends the core with a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and 3-D graphics, animation, styles, templates, documents, media, text, and typography. WPF is included in the Microsoft .NET Framework, so you can build applications that incorporate other elements of the .NET Framework class library.

To support some of the more powerful WPF capabilities and to simplify the programming experience, WPF includes additional programming constructs that enhance properties and events: dependency properties and routed events.

Windows Communication Foundation (WCF) 

Windows Communication Foundation (WCF) is Microsoft's unified programming model for building service-oriented applications. WCF allows you to build many kinds of distributed applications including "traditional" Web Services so that your services support SOAP and will therefore be compatible with older .NET (and other) technologies. WCF is not just about pure SOAP over the wire - you can work with an Info set, and create a binary representation of your SOAP message that can then be sent along with your choice of protocol. This is for those who are particularly concerned about performance and have traditionally turned to .NET remoting.

Windows Workflow Foundation (WWF) 

Windows Workflow Foundation, a core component of .NET Framework 3.0, provides a programming model, run-time engine, and tools for building workflow applications.

A workflow is created and maintained by the workflow run-time engine. There can be several workflow engines within an application domain, and each workflow engine can support multiple workflows running concurrently. The run-time enables idle workflows to be unloaded from memory, persisted to a store, and reloaded whenever input is received.

Workflows can be authored in code, XAML markup, or a combination of both, known as code-separation, which is similar to the ASP.NET mode.

Windows CardSpace (WCS)

Windows CardSpace (InfoCard) is a Digital Identity to online services. Digital Identity is how a user will be electronically represented. Such as for a debit/credit card, each card has a digital identity and password. If any user uses the site on internet then he enters their username and password, for identity, but this is not secure. WCS reduces these types of problems. 

WCS (originally called Info Card) helps people keep track of their digital identities as distinct information cards. If a Web site accepts WCS logins, users attempting to log in to that site will see a WCS selection. By choosing a card, users also choose a digital identity that will be used to access this site. CardSpace and the new supporting technologies will change how you authenticate into an application, whether it sits on the Web, your phone, or your desktop.

Core New Features and Improvements

Some core new features and improvements are implemented in .Net 3.0/3.5; they are:
  1. Auto Implemented Property
  2. Implicit Typed local variable
  3. Implicitly Typed Arrays
  4. Anonymous Types
  5. Extension Methods
  6. Object and Collection Initializers
  7. Lambda Expressions
.Net Framework 4.0 Features

Application Compatibility and Deployment

The .NET Framework 4 is highly compatible with applications that are built with earlier .NET Framework versions, except for some changes that were made to improve security, standards compliance, correctness, reliability, and performance.

The .NET Framework 4 does not automatically use its version of the common language runtime to run applications that are built with earlier versions of the .NET Framework. To run older applications with .NET Framework 4, you must compile your application with the target .NET Framework version specified in the properties for your project in Visual Studio, or you can specify the supported runtime with the <supportedRuntime> Element in an application configuration file.

Core New Features and Improvements

The following sections describe new features and improvements provided by the common language runtime and the base class libraries.
  1. BigInteger and Complex Numbers
  2. Tuples
  3. Covariance and Contravariance
  4. Dynamic Language Runtime
Managed Extensibility Framework

The Managed Extensibility Framework (MEF) is a new library in the .NET Framework 4 that helps you build extensible and composable applications. MEF enables you to specify points where an application can be extended, to expose services to offer to other extensible applications and to create parts for consumption by extensible applications.

It also enables easy discoverability of available parts based on metadata, without the need to load the assemblies for the parts.

Parallel Computing

The .NET Framework 4 introduces a new programming model for writing multithreaded and asynchronous code that greatly simplifies the work of application and library developers. The new model enables developers to write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool. The new System.Threading.Tasks namespace and other related types support this new model.

Web

ASP.NET version 4 introduces new features in the following areas:
  • Core services, including a new API that lets you extend caching, support for compression for session-state data, and a new application preload manager (autostart feature).
  • Web Forms, including more integrated support for ASP.NET routing, enhanced support for Web standards, updated browser support, new features for data controls, and new features for view state management.
  • Web Forms controls, including a new Chart control.
  • MVC, including new helper methods for views, support for partitioned MVC applications, and asynchronous controllers.
  • Dynamic Data, including support for existing Web applications, support for many-to-many relationships and inheritance, new field templates and attributes, and enhanced data filtering.
  • Microsoft Ajax, including additional support for client-based Ajax applications in the Microsoft Ajax Library.
  • Visual Web Developer, including improved IntelliSense for JScript, new auto-complete snippets for HTML and ASP.NET markup, and enhanced CSS compatibility.
  • Deployment, including new tools for automating typical deployment tasks.
  • Multi-targeting, including better filtering for features that are not available in the target version of the .NET Framework
Windows Presentation Foundation (WPF) Features in 4.0

Windows Presentation Foundation (WPF) version 4 contains changes and improvements in the following areas:


  • New controls, including Calendar, Data Grid, and Date Picker.
  • VisualStateManager supports changing states of controls.
  • Touch and Manipulation enables you to create applications that receive input from multiple touches simultaneously on Windows 7.
  • Graphics and animation supports layout rounding, Pixel Shader version 3.0, cached composition, and easing functions.
  • Text has improved text rendering and supports customizing the caret color and selection color in text boxes.
  • Binding is supported on the Command property of an InputBinding, dynamic objects, and the Text property.
  • XAML browser applications (XBAPs) support communication with the Web page and support full-trust deployment.
  • New types in the System.Windows.Shell namespace enable you to communicate with the Windows 7 taskbar and pass data to the Windows shell.
  • The WPF and Silverlight Designer in Visual Studio 2010 has various designer improvements to help create WPF or Silverlight applications.
Windows Communication Foundation Features in 4.0

Windows Communication Foundation (WCF) provides the following improvements:
  • Configuration-based activation: Removes the requirement for having an .svc file.
  • System.Web.Routing integration: Gives you more control over your service's URL by allowing the use of extensionless URLs.
  • Multiple IIS site bindings support: Allows you to have multiple base addresses with the same protocol on the same Web site.
  • Routing Service: Allows you to route messages based on content.
  • Support for WS-Discovery: Allows you to create and search for discoverable services.
  • Standard endpoints: Predefined endpoints that allow you to specify only certain properties.
  • Workflow services: Integrates WCF and WF by providing activities to send and receive messages, the ability to correlate messages based on content, and a workflow service host.
Windows Workflow Foundation Features in 4.0

Windows Workflow Foundation (WF) provides improvements in the following areas:
  • Improved workflow activity model: The Activity class provides the base abstraction of workflow behavior.
  • Rich composite activity options: Workflows benefit from new flow-control activities that model traditional flow-control structures, such as Flowchart, TryCatch, and Switch<T>.
  • Expanded built-in activity library: New features of the activity library include new flow-control activities, activities for manipulating member data, and activities for controlling transactions.
.Net Framework 4.5 Features

.NET for Windows Store Apps

Windows Store apps are designed for specific form factors and leverage the power of the Windows operating system. A subset of the .NET Framework 4.5 is available for building Windows Store apps for Windows by using C# or Visual Basic.

Portable Class Libraries 

The Portable Class Library project in Visual Studio 2012 enables you to write and build managed assemblies that work on multiple .NET Framework platforms. Using a Portable Class Library project, you choose the platforms (such as Windows Phone and .NET for Windows Store apps) to target.

ASP.NET 4.5 

ASP.NET 4.5 includes the following new features:
  • Support for new HTML5 form types.
  • Support for model binders in Web Forms. These let you bind data controls directly to data-access methods, and automatically convert user input to and from .NET Framework data types.
  • Support for unobtrusive JavaScript in client-side validation scripts.
  • Improved handling of client script through bundling and minification for improved page performance.
  • Integrated encoding routines from the AntiXSS library (previously an external library) to protect from cross-site scripting attacks.
  • Support for WebSockets protocol.
Windows Presentation Foundation (WPF) Features in 4.5

In the .NET Framework 4.5, Windows Presentation Foundation (WPF) contains changes and improvements in the following areas:
  • The new Ribbon control, which enables you to implement a ribbon user interface that hosts a Quick Access Toolbar, Application Menu, and tabs.
  • The new INotifyDataErrorInfo interface, which supports synchronous and asynchronous data validation.
  • New features for the VirtualizingPanel and Dispatcher classes.
  • Improved performance when displaying large sets of grouped data, and by accessing collections on non-UI threads.
  • Data binding to static properties, data binding to custom types that implement the ICustomTypeProvider interface, and retrieval of data binding information from a binding expression.
  • Repositioning of data as the values change (live shaping).
  • Ability to check whether the data context for an item container is disconnected.
  • Ability to set the amount of time that should elapse between property changes and data source updates.
  • Improved support for implementing weak event patterns. Also, events can now accept markup extensions.
Windows Communication Foundation (WCF) Features in 4.5

In the .NET Framework 4.5, the following features have been added to make it simpler to write and maintain Windows Communication Foundation (WCF) applications:
  • Simplification of generated configuration files.
  • Support for contract-first development.
  • Ability to configure ASP.NET compatibility mode more easily.
  • Changes in default transport property values to reduce the likelihood that you will have to set them.
  • Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
  • Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
  • New asynchronous streaming support.
  • New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
  • Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
  • Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
  • Support for configuring services in code.
  • XML Editor tooltips.
Windows Workflow Foundation (WF) Features in 4.5

Several new features have been added to Windows Workflow Foundation (WF) in the .NET Framework 4.5. These new features include:
  • State machine workflows, which were first introduced as part of the .NET Framework 4.0.1 (.NET Framework 4 Platform Update 1). This update included several new classes and activities that enabled developers to create state machine workflows. These classes and activities were updated for the .NET Framework 4.5 to include:
  • The ability to set breakpoints on states.
  • The ability to copy and paste transitions in the workflow designer.
  • Designer support for shared trigger transition creation.