CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Tuesday, March 11, 2008

IIS 7.0 New features

Wondering what the new features in IIS 7.0 going to be? Here you go! you can get a glimpse of IIS 7.0 in this article.
     IIS7 will ship with both Windows Vista and Windows Longhorn Server. It's obvious that Microsoft has put a lot of time and effort into this release and you can expect IIS7 to be the platform of choice as soon as people can get their servers upgraded. It includes a several new functionalities with very rich integration with ASP.NET.

Feature 1: HttpModules and HttpHandlers can participate in all the requests i.e we can have a ASP.NET HttpModule for a JSP or PHP page even. Building HTTPmodules for authentication, authorization, logging, url-rewriting, auditing now will be very easy with .NET.

Feature 2: ASP.NET configuration can be integrated with IIS. IIS now uses the same web.config configuration model, which means you can have both configure ASP.NET and IIS in a single web.config file. You can now set things like default pages, IIS security, logging, etc within a web.config file and xcopy/ftp it to a server.

Feature 3: This has an integrated Admin UI tool that can manage both IIS and ASP.NET settings. Rich GUI supports settings for Membership, Roles and Profile providers. This tool also supports remote delegated admin over http -- which means you can point the rich-client admin tool at a shared host server and manage your users/roles/profile settings remotely over http.

Feature 4: It provides better request auditing and error debugging. A new functionality called "Failed Request Event Buffering" (affectionately known as "FREB") is introduced. This allows administrators to configure applications to automatically save request information anytime an error occurs during a request, or if a request takes longer than a specified amount of time to complete. This allows us to analyze what exactly happened during a request failure and what errors or exceptions have occurred. This can capture tracing messages generated within ASP.NET or within any component or class library that uses System.Diagnostics -- which makes it much easier for developers and admins to instrument and analyze what is going on with systems at runtimes.

Feature 5: It provides better configuration APIs and command-line tools. In addition to new config and admin APIs, we now have a great command-line admin story that you can use to set/modify/retrieve all configuration information as well as manage the server (start/stop individual apps, lookup their health state, register new apps, refresh SSL certs, etc). The class hierarchy in brief can be figured as:

IIS7.0_New_Features1


A code snippet uses the new .NET APIs to query IIS7 to list the active worker processes on the computer. It also lists the Requests and other details about the request like Url, Clinet IP address ..etc.

ServerManager iisManager = new ServerManager();
foreach(WorkerProcess w3wp in iisManager.WorkerProcesses)
{
Console.WriteLine("W3WP ({0})", w3wp.ProcessId);
foreach (Request request in w3wp.GetRequests(0))
{
Console.WriteLine("{0} - {1},{2},{3}",
request.Url,
request.ClientIPAddr,
request.TimeElapsed,
request.TimeInState);
}
}









Feature 7: Let us examine the new management UI. Here's what the new IIS Manager looks like:







IIS7.0_New_Features2




The first thing to notice is the new "Features View" which is shown above. While you can still use the "Content View" to show the files that make up your Web Site in the main pane of the tool, most of the time you'll be using the "Features View" to change site and application settings.







IIS7.0_New_Features3


Feature 8: "Actions" pane is a task-based pane shows you the most common tasks that are related to the currently selected object. For example, here's a close up of the "Actions" pane as it looks when the "Default Web Site" is the currently selected object.







IIS7.0_New_Features4



The contents of the "Actions" pane will naturally change as the selected object changes, but this pane is where you'll generally find links that lead you through most of your common admin tasks.






Feature 9: Modular Architecture


Unless you've been living under a rock somewhere for the past few years, you've heard about all the problems that IIS has had when it comes to security. In earlier versions of IIS, it was either installed or it wasn't. If IIS was installed then all the features were installed. In an attempt to minimize potential vulnerability, in IIS 6, the majority of features were disabled by default, but they still got installed. This time around Microsoft has taken the next logical step. IIS7 is almost completely modular. Take a look at the installation screen:






IIS7.0_New_Features5


Now granted, I've installed everything to play around with it all, but on a production server, you now have the flexibility to install only the features you need. That way if you don't use CGI, then you don't need to worry about some new bug that someone finds in the CGI handler. You also won't need to install a patch and reboot, because the affected code was never even installed on your server so there's nothing to patch!

Post a Comment