IIS 7
I attended an MSDN event the other day - the topic IIS 7. For those of you running Vista you have IIS 7 now. The team has been fixing a few bugs and the new updated version will ship as part of Windows 2008, and as service pack for Vista.
My conclusion - I can't wait to upgrade my web servers to IIS7 - which unfortunately means an OS upgrade as well from 2003 to 2008. Why I am so excited - 2 features, but I will get to that…
First the server is very robust and production ready - 79 of the 80 web servers that are Microsoft.com are IIS7 and have been for a while.
You can build the server you need, not the one Microsoft ships. If you don't need FTP support or windows authentication…don't load the code that provides those features. This means patches can be built quicker, and new features added out of the cycle of the general OS release.
The server now has an integrated pipeline, what does this mean? Well for a start .Net is no longer invoked as an ISAPI extension, in fact .Net is integrated into the pipeline. So you can extend the web server, adding your own Modules and Handlers written in .Net. This allows you to do things like build your own authentication provider which is executed at the beginning of the pipeline. You no longer need to write your own ISAPI filters etc to do low level web server operations.
The Metabase has gone! It has been replaced with a new completely XML file. Another cool feature is that the file can be located via a UNC share. So if you have large numbers of web servers and want to make sure they are all configured exactly the same - have them point to the same configuration file. I have spent so many hours checking things like this when building and upgrading web farms.
A whole new management UI - gone are the tabs - a more MMC approach has been used. This can also be easily extended - new APIs to allow you to build and configure your own web server extensions.
If you build WCF web services and the client was .Net and you wanted to use the TCP bindings or Pipes, but did not want to write a service which had it's own start stop and recycling UI and multi threading support, IIS 7 is for you. IIS7 can host WCF web services which net.TCP and net.PIPE bindings.
There is now a command line interface that allows you to pretty much do anything to IIS7 you would need to do. For example creating a new site, deleting a site. For more information in getting started with APPCMD.EXE see http://www.iis.net/articles/view.aspx/IIS7/Use-IIS7-Administration-Tools/Using-the-Command-Line/Getting-Started-with-AppCmd-exe
For those of you who use Powershell - there is Powershell support for IIS 7. One day I must start digging into this.
So now for the 2 big reasons I want to move to IIS7….
Error logging has been improved, think trace.axd on steroids. Have you ever been in the situation where someone says - "yeah customer had a failed request yesterday, no idea what they were doing.". Well if you use System.Diagnostics namespace and write tracing code etc, then you are in luck. You can now configure IIS 7 to report failed requests - what's a failed request - what you define. You can on a URL basis specify rules on what you consider a failure. So even though a request may complete, it maybe too slow for your SLA. You can create a rule that records the trace output for that request to a disk file. Then you can dig into what went on in the request after the effect.
Now for the #1 reason… Ever wondered "Why is my web server running so slow right now", or "whats running on my server". How many times have you sifted through weblogs after a production issue, to try and work out what requests were causing problems. Well now you can - from a command line:
Appcmd list requests
It will dump for you the URL, along with query string parameters, of every request currently executing on the server and how long it has been running.
IIS 7 has it's own website, the team looked at what other teams in Microsoft have done and wanted in - so check out http://www.iis.net for an enormous amount of information.