Web.config File Refactoring
The Web.config file that contains configuration information for a Web application has grown considerably over the past few releases of the .NET Framework as new features have been added. In .the .NET Framework 4, the major configuration elements have been moved to the machine.config file, and applications now inherit these settings. This allows the Web.config file in ASP.NET 4 applications to be empty or to specify only which version of the framework the application is targeting
Extensible Output Caching
ASP.NET 4 adds extensibility to output caching that enables you to configure one or more custom output-cache providers. Output-cache providers can use any storage mechanism to persist HTML content. These storage options can include local or remote disks, cloud storage, and distributed cache engines.
The defaultProvider attribute for ASP.NET is AspNetInternalProvider. You can change the default output-cache provider used for a Web application by specifying a different provider name for defaultProvider attribute.
Auto start Web Application
A new auto-start feature is available when ASP.NET 4 runs on IIS 7.5 on Windows Server 2008 R2. The feature provides a controlled approach for starting up an application pool, initializing an ASP.NET application, and then accepting HTTP requests. It lets you perform expensive application initialization prior to processing the first HTTP request.
Permanently Redirecting a Page
ASP.NET 4 adds a RedirectPermanent helper method that makes it easy to issue HTTP 301 (Moved Permanently) responses, as in the following example:
RedirectPermanent("/newpath/foroldcontent.aspx");
This helps in search Engines urls.
Session State Compression
ASP.NET 4 introduces a new compression option for both kinds of out-of-process session state providers. By using this option, applications that have spare CPU cycles on Web servers can achieve substantial reductions in the size of serialized session state data.
You can set this option using the new compressionEnabled attribute of the sessionState element in the configuration file. When the compressionEnabled configuration option is set to true, ASP.NET compresses (and decompresses) serialized session state by using the .NET Framework GZipStreamclass.
Expanding the Range of Allowable URLs
ASP.NET 4 introduces new options for expanding the size of application URLs. Previous versions of ASP.NET constrained URL path lengths to 260 characters, based on the NTFS file-path limit. In ASP.NET 4, you have the option to increase (or decrease) this limit as appropriate for your applications
<httpRuntime maxRequestPathLength="260" maxQueryStringLength="2048" />
ASP.NET 4 always rejects URL paths that contain characters in the ASCII range of 0x00 to 0x1F, because those are invalid URL characters as defined in RFC 2396 of the IETF
jQuery Included with Web Forms and MVC
Jquery is now built in supported in .NET 4.0
No comments:
Post a Comment