|TechTip: IIS 6.0 Best Practices to Improve Performance of ASP.NET Applications|
|Tips & Techniques - Microsoft|
|Written by Joydip Kanjilal|
|Friday, 05 February 2010 00:00|
Leverage IIS 6.0's built-in features, including MetaBase auditing, file expiration, HTTP compression, and more.
Internet Information Services (IIS) is a flexible, scalable, easy to use and manage Web server that can be used to host your Web sites and run applications on the Web seamlessly.
Wikipedia states, "Internet Information Services (IIS) - formerly called Internet Information Server - is a set of Internet-based services for servers created by Microsoft for use with Microsoft Windows. It is the world's second most popular Web server in terms of overall websites behind the industry leader Apache HTTP Server. As of April 2009, it served 29.27% of all websites according to Netcraft. The services provided currently include FTP, FTPS, SMTP, NNTP, and HTTP/HTTPS."
Web sites deployed on IIS 6.0 execute on separate worker processes and threads. These are not only independent of each other, but also independent of the IIS WWW Service process. Note that the WWW service is one of the most important services in IIS. It reads information from the IIS Admin service at the time when it starts.
This isolation makes IIS 6.0 much more stable than any previous versions of IIS.
How Do I Get IIS 6.0?
IIS 6.0 is tightly integrated with the Windows Server 2003. IIS 6.0 offers better reliability, robust security, easier manageability, and improved performance and scalability compared to its earlier counterparts. You can download a copy of the IIS 6.0 Resource Kit here.
Managing IIS: Tips and Techniques
You can enable HTTP compression in IIS 6.0 using the IIS snap-in. To do this, follow these steps:
You can also enable compression by using the following statements at the command line:
cscript C:InetpubAdminScriptsadsutil.vbs set w3svc/site#/root/DoStaticCompression True
cscript C:InetpubAdminScriptsadsutil.vbs set w3svc/site#/root/DoDynamicCompression True
You just need to replace the site# with the site ID you would like to change.
To enable centralized logging, you may use this statement:
cscript adsutil.vbs set w3svc/CentralW3CLoggingEnabled 1
If you would like to enable IIS MetaBase auditing, use this statement at the command prompt:
cscript iiscnfg.vbs /enableaudit / /r
Note that before you make any changes to the IIS MetaBase, you can take a backup of it. To create a backup of the IIS 6.0 MetaBase, open the IIS snap-in and then select All Tasks > Backup/Restore Configuration. The remaining steps are simple. The IIS MetaBase is present in the file called MetaBase.xml in your WINDOWSsystem32inetsrv directory in your system. You can take a look at this article for information on how to take IIS 6.0 MetaBase backup: http://www.visualwin.com/IIS-Backup/
Here is a list of some other best practices that you can follow to improve the performance of applications deployed on IIS 6.0:
You can also test the load time of the Web pages of your application by using network bandwidth measuring tools like network monitors, load simulators, etc. This will give you an idea of how much time is being spent to load a particular Web page in your application. Accordingly, you can take steps to reduce the load time of pages that are frequently used but take a longer time to load. Actually, there isn't any particular rule or methodology that fits every scenario. You should plan and set some objectives and then check whether your development cycle conforms to the objectives and standards you set.
Here are links to some good references on this topic for further study:
In this article, we have examined some of the best practices that can be followed to improve application performance of applications that are deployed in IIS. You can find out more about how to efficiently enhance application performance of ASP.NET applications in my latest book, ASP.NET 4.0 Programming (McGraw-Hill/Osborne Media).
|Last Updated on Friday, 05 February 2010 00:00|