Posts Tagged ‘4.0’

ASP.NET 4.0 Features

Wednesday, May 19th, 2010

ASP.NET 4.0 provides rich features and powerful enhancements. Here is a brief summary on some of the newest features.

auto-start feature – In some cases, application needs to perform bulk jobs or load data just before serving to the first HTTP request. This is now achieved by using auto-start feature, which starts worker process and initiates an application to manage this.

Browser capabilities – HttpBrowserCapabilities object determines whether the type and version of the current browser supports a particular version of JavaScript or not and also to determine whether the request initiated from a mobile device or not.

Caching improvements – Output caching has been extended and capable of to store HTML contents to local/remote disks, cloud storage and distributed cache engines. There is a new assembly System.Runtime.Caching.dll has been introduced to make caching available for all the applications.

CDN feature – The Microsoft Ajax Content Delivery Network allows to add ASP.NET Ajax and jQuery scripts to Web applications by adding a <script> tag to a page that references to Ajax.microsoft.com

ClientIDMode feature – ClientIDMode property of a control provides these settings: AutoID (same as used in earlier versions), Static (value will be the same without concatenating the ID of parent containers), Predictable (this is for data controls that use repeating templates) and Inherit (ID is the same as its parent)

jQuery support – The Visual Studio templates for Web Forms and MVC include the open-source jQuery library.

Page metadata support – Page.Keywords and Page.MetaDescription tags allow to enter Meta keywords and description of a page dynamically.

Performance monitoring feature – In aspnet.config file, if you set appDomainResourceMonitoring enabled=”true” then you can get the information on resource utilization of individual applications running in a single worker process.

Project templates enhancement – There is empty web application template has been introduced. There is also a change in Web Application Project as it includes more files to support membership functionality thus it helps in quickly getting start a new project.

RedirectPermanent feature – It helps search engines to index a website properly. Search engines recognize permanent redirects and will store the new URL that is associated with the content and which eliminates the unnecessary round trip made by the browser for temporary redirects.

Routing feature – It allows you to define SEO friendly web page URL by using the new MapPageRoute method of the Route class.

Session state enhancement – In Web.Config file, if you set compressionEnabled = “true” then the serialized session state gets compressed and which results reductions in the size of serialized session-state data.

targetFramework feature – There is a new attribute in the compilation element of the Web.Config file which allows you to target the .NE T Framework 4 and later.

URL support – There are three new elements in Web.Config file: maxRequestPathLength (to increase/decrease limit of URL), maxQueryStringLength (to set length of a query string) and requestPathInvalidChars (to define characters those are to be used in URL)

ViewStateMode feature – Web server controls include a ViewStateMode property that allows you to disable view state by default and then enable it only for the controls those require it in the page.

Web.Config changes – Web.Config file has become clean and simple. The main sections like AJAX, Routing etc… have been moved to the Machine.Config file. However, you can add elements as per your need.