Refactored web.config

The web.config file has been refactored by taking all the complicated configuration statements into the machine.config. This has been done so that all the complex and major settings stored in the machine.config file can be easily inherited by the application and run without much difficulty. This makes the new version of the web.config file is either empty or has just the basic specification of Visual Studio Framework the application is going to target.

Auto-start web application

In the earlier versions of ASP.NET what we used to do to implement advanced initialization processes is that we would run the initialization code in the Application_Load method which is written inside the Global.asax file. In this new version we have a new feature called auto-start which turns out to be a possible solution for this problem. This feature is available when we will use ASP.net 4.0 with IIS 7.5.

For this feature  you need to configure  ‘Application-Pool‘ worker process and that is done by setting the  ‘startMode’  attribute to ‘AlwaysRunning’ inside the file named ‘applicationHost.config‘ located at “C:\Windows\System32\inetsrv\config\applicationHost.config”


length Page Redirection in ASP.NET 4.0

I think we are very familiar with the Response.Redirect() method that we use to forward request to a new URL. Many may not know that internally it was a temporary redirect i.e. HTTP 302 which results in an extra HTTP round trip. A new ‘RedirectPermanent‘ helper method is introduced in the new ASP.NET4.0. This is a permanent redirect that uses HTTP 301 and thus avoids the HTTP round trip.


Allowable URL range/length

Earlier versions of the ASP.NET allowed only a maximum of 260 characters in the URL path. In the new ASP.NET 4.0 you can have support for the increased URL Size With the help of httpRuntime configuration attribute.

Extensibility of Output Cache

One way to improve performances of web-applications is Caching which stores the controls, page outputs & HTTP responses in the memory. This approach helps to serve content quickly as it retrieves output from memory, but has some limitations like heavy traffic and memory requirements for the output caching.

In ASP.NET 4.0, extensibility is given to output caching by using Output cache providers or by configuring one more custom output cache providers which allows to use any storage mechanism like cloud storage, local/remote disks, etc.

Compression / Shrinking of Session State

In ASP.net session data can be stored not only in the process (IN PROCEESS )but also in outside process i.e. in SQL server (OUT OF PROCESS) and for that you have to serialize data.

Problem comes when the amount of data is large which also increase size of serialized data. To keep this problem in mind, ASP.NET 4.0 introduced a new feature of compression of session state used when session is stored in out of process.

To enable this make compressionEnable to true inside web.config file.

Refactored web.config :

The web.config file has been refactored by taking all the complicated configuration statements into the machine.config. This has been done so that all the complex and major settings stored in the machine.config file can be easily inherited by the application and run without much difficulty. This makes the new version of the web.config file is either empty or has just the basic specification of Visual Studio Framework the application is going to target.

Auto-start web application

In the earlier versions of ASP.NET what we used to do to implement advanced initialization processes is that we would run the initialization code in the Application_Load method which is written inside the Global.asax file. In this new version we have a new feature called auto-start which turns out to be a possible solution for this problem. This feature is available when we will use ASP.net 4.0 with IIS 7.5.

Page redirection is ASP.NET 4.0

I think we are very familiar with the Response.Redirect() method that we use to forward request to a new URL. Many may not know that internally it was a temporary redirect i.e. HTTP 302 which results in an extra HTTP round trip. A new RedirectPermanent helper method is introduced in the new ASP.NET4.0. This is a permanent redirect that uses HTTP 301 and thus avoids the HTTP round trip.

Allowable URL range/length

Earlier versions of the ASP.NET allowed only a maximum of 260 characters in the URL path. In the new ASP.NET 4.0 you can have support for the increased URL Size With the help of httpRuntime configuration attribute.