Sunday, 4 December 2011

Difference between ASP.NET 4.0 and its previous versions

In Previous Versions
In ASP.Net 4.0
Output Cache Extensibility
Cached content always had to be stored in-memory.
Through Output-Cache Providers cache content can be stored to any persistence mechanism such as databases, disks, cloud storage and distributed cache engines.

Session State Compression
In the previous version session state has to be stored outside the web application worker process, so session data has to be serialized & how much information a developer saves in session state, the size of the serialized data can grow quite large.
In ASP.NET 4.0 this compression feature enabled user to reduce the time it takes for a web application in responding by reducing the size of session data by 97% approx.

View State Mode for individual control
In previous versions view state mode can be enabled only at page level not at the individuals controls.
Now view state mode can be enabled at the control level that is helpful in reducing the response time
Page.MetaKeyword and Page.MetaDescription properties

Initially we have to add these tags for each and every page manually
Now these properties can be set at run time, which enables to get the content from a database or other source, and set the tags dynamically to describe what a particular page is for.

Response.RedirectPermanent Method
It is temporary redirect initially.
Now this is a permanent method which eliminates the unnecessary round trip made by the browser for temporary redirects.
URLs are not very descriptive/meaningful
more descriptive/meaningful URLs that can be easily understandable by users and search engines

Increase URL character length
URLs were limited to 260 characters in length and were also limited to a fixed set of characters.
ASP.NET 4.0 has the option of increasing and decreasing the length of URLs.
Extensible HTML, URL, and HTTP Header Encoding
In previous .NET versions, Server.HtmlEncode() or HttpUtility.Encode() methods has been used for string encoding
ASP.NET 4.0 has new encoding syntax provides an easy and concise way of encoding a particular string.
Web.config Refactoring
In previous version it does not have some features like as routing, Ajax, IIS 7 and version compatibility.
With ASP.NET 4, most of the major elements have been moved to the machine.config file.
Predictable client ID
In previous versions there is no such facility of references the rendering elements.
Now client ID can be generate for each and every control.
Auto-Start ASP.NET Applications
In previous version initial data load or caching operations to be done before serving the client requests
Now Auto Start ASP.NET applications provides a facility of handling client request automatically.
Improvements on Microsoft Ajax Library
In previous version there are unnecessary subsequent requests to the server in scrip loader and cannot build asynchronous data-driven applications easily.
ASP.NET 4.0 comes with a functionality of reducing unnecessary subsequent request to the server

Extensible Request Validation
In previous version to make the XSS validation more aggressive resulted in too many false positives.
Intentionally relax XSS checks for specific pages or for specific types of requests.
Performance Monitoring for Individual Applications in a Single Worker Process
In previous version if multiple applications use a single shared worker process, it is difficult for server administrators to identify an individual application that is experiencing problems.
Now administrators have a more granular view into the resource consumption of individual applications running in a single worker process.

Multi targeting facility is not available in the previous versions.
Multi-targeting allows you to use and target multiple versions of .NET.

No comments:

Post a Comment