<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Tobin Titus Blog : IIS 7</title><link>http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx</link><description>Tags: IIS 7</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>IIS Security – Past and Present</title><link>http://blogs.iis.net/tobintitus/archive/2009/04/28/iis-security-past-and-present.aspx</link><pubDate>Tue, 28 Apr 2009 08:24:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:3122704</guid><dc:creator>TobinTitus</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=3122704</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=3122704</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2009/04/28/iis-security-past-and-present.aspx#comments</comments><description>&lt;p&gt;This topic has been covered many times both by Microsoft and non-Microsoft employees. However, I’ve recently been asked what the main features of IIS 7 are and have seen a great deal of misinformation about IIS security on twitter, blog posts and forums. &lt;/p&gt;  &lt;p&gt;I think, therefore, the issue deserves yet another look. In this post, I’m going to go over security in the past for IIS and then move on to talk about security features in IIS 7. These are not in any particular order. This post is not meant to diminish the many thoughtful works already created by others – both complimentary and critical. This is just meant to bring the subject back up for discussion again in hopes that you can be properly equipped with the decision making information you may need.&lt;/p&gt;  &lt;h2&gt;Ghosts of IIS Security Past&lt;/h2&gt;  &lt;p&gt;The reason for so much misinformation about the current state of security in IIS is likely due to the earned reputation the product had in versions previous to IIS 6.0. A quick search on the web for &lt;a href="http://search.live.com/results.aspx?q=IIS+5+security+vulnerability&amp;amp;src=IE-SearchBox&amp;amp;Form=IE8SRC" target="_blank"&gt;IIS 5 security vulnerabilities&lt;/a&gt; may be like a walk down memory lane for some of the more veteran administrators and IT staff across the globe. The search results are littered with critical vulnerabilities related to buffer overflows, ISAPI extensions, exploits on rarely-used features, or features that were available by a default installation. We are haunted by names like “&lt;a href="http://en.wikipedia.org/wiki/Code_Red_(computer_worm)" target="_blank"&gt;Code Red&lt;/a&gt;” and “&lt;a href="http://en.wikipedia.org/wiki/Nimda" target="_blank"&gt;Nimda&lt;/a&gt;”. I don’t know about you, but those very names send shivers down my spine. I was consulting as a developer and web administrator for a very large property management company when these hit. We were lucky enough to avoid these as we had patched our services. That said, many whom I did business with on a regular basis were not very happy. So, to be clear, I feel the misinformation that is spread today is built on an element of experience with previous versions. Secunia reports &lt;a href="http://secunia.com/advisories/product/39/" target="_blank"&gt;16 advisories and 6 vulnerabilities&lt;/a&gt; with IIS 5.&amp;#160; And so started the reputation , perhaps deservedly so, that IIS was not secure unless you really knew what you were doing with security.&lt;/p&gt;  &lt;p&gt;Bill Gates was apparently visited by the ghosts of security past, present and future when he laid his head on his pillow January 14th, 2002. I say that because on January 15th, 2002 Mr. Gates sent out the &lt;a href="http://www.wired.com/techbiz/media/news/2002/01/49826" target="_blank"&gt;now-famous trustworthy computing memo&lt;/a&gt; to every employee at Microsoft.&amp;#160; This set off a major revamp of products from the ground up. Standards were set for test planning and testing. Writing Secure Code was mandatory reading for every Microsoft developer and tester. The results have been staggering.&lt;/p&gt;  &lt;p&gt;Security drastically improved in Microsoft products over the years, and IIS was definitely no exception to this. IIS 6 saw &lt;a href="http://secunia.com/advisories/product/1438/" target="_blank"&gt;5 security advisories and 4 vulnerabilities&lt;/a&gt; reported since 2003. Not to get ahead of myself, but IIS 7 has &lt;a href="http://secunia.com/advisories/product/17543/" target="_blank"&gt;exactly 1 advisor and 1 vulnerability&lt;/a&gt; from Secunia. Compare this against Apache 2.0.x which has had &lt;a href="http://secunia.com/advisories/product/73/" target="_blank"&gt;39 advisories and 23 vulnerabilities&lt;/a&gt; (4 of which are still unpatched as of this writing) and Apache 2.2.x which has had &lt;a href="http://secunia.com/advisories/product/9633/" target="_blank"&gt;10 advisories and 16 vulnerabilities&lt;/a&gt; (2 of which are still unpatched as of this writing) in the same period.&amp;#160; Now I have seen attempts (&lt;a href="http://googleonlinesecurity.blogspot.com/2007/06/web-server-software-and-malware.html" target="_blank"&gt;[1]&lt;/a&gt;, &lt;a href="http://blog.washingtonpost.com/securityfix/2007/05/cyber_crooks_hijack_activities_1.html" target="_blank"&gt;[2]&lt;/a&gt;) to quantify or otherwise explain these numbers further. You can read those articles for yourself and determine how much weight you want to give them. However you skew it, the facts should speak for themselves – IIS has dramatically improved and taken a leadership roll in security in IIS 6 and 7. Our ghost of IIS past still haunts the product’s reputation today, despite obvious strides taken. Even if you feel you like Apache better I think it is only fair to give credit where it is due. &lt;/p&gt;  &lt;h2&gt;Improvements in IIS 6&lt;/h2&gt;  &lt;p&gt;The IIS team took the four tenants of Microsoft’s Trustworthy Computing initiative to heart: Secure by Design, Secure by Default, Secure in Deployment and Secure Communication. Since we are already on the next version, I won’t spend a great deal of time talking about the security improvements in the last version other than a brief overview so you know how they relate to changes in our current version, IIS 7. &lt;/p&gt;  &lt;p&gt;IIS 6 took vast strides to improve security. During upgrade installations, IIS 6 was disabled by default if the previous server had not been secured by the &lt;a href="http://blog.washingtonpost.com/securityfix/2007/05/cyber_crooks_hijack_activities_1.html" target="_blank"&gt;IIS lockdown tool&lt;/a&gt;. The architecture was completely revamped to separate kernel-mode HTTP listening from user-mode application execution. Changes were made to application pools, authentication, access control, encryption and certificate handling, auditing, logging and patch management that made the product far superior to its predecessors. You can find a detailed list of these features on &lt;a href="http://technet.microsoft.com/en-us/library/cc736369.aspx" target="_blank"&gt;TechNet&lt;/a&gt;.&amp;#160; SecurityFocus did a comparison of these features in &lt;a href="http://www.securityfocus.com/infocus/1765" target="_blank"&gt;March of 2004&lt;/a&gt;.Server Watch wrote an article in &lt;a href="http://www.serverwatch.com/tutorials/article.php/3294371" target="_blank"&gt;December of 2003&lt;/a&gt;. By most accounts, everything accomplished in IIS 6 was a huge step in the right direction.&lt;/p&gt;  &lt;p&gt;Despite the massive steps already taken in IIS6, IIS 7 took these all a bit further. Let’s go ahead and investigate these now.&lt;/p&gt;  &lt;h2&gt;Improvements in IIS 7.x&lt;/h2&gt;  &lt;h3&gt;Customizable Installation&lt;/h3&gt;  &lt;p&gt;Continuing with the tenant of being secure in deployment, IIS 7 has made installation a wonder to behold. In IIS 6, you could reduce your attack surface by disabling features native to web server. However, these features were still loaded into the process. This carried not only a security factor, but also a performance and memory footprint issue.&amp;#160; IIS 7 has a completely modular architecture. That means that features which you do not want are not only NOT loaded into the process, you can leave the bits for those features off of your disk completely. &lt;/p&gt;  &lt;h3&gt;Limitable Attack Surface&lt;/h3&gt;  &lt;p&gt;This is a bit dubious and is essentially part of the customizable installation. By reducing the modules that are available on disk or loaded into a process, you significantly reduce the attack surface for your specialized web servers. If all you intend to do is serve static content with caching and no default documents, you can simply install the static file handler and caching module and leave the rest of the IIS modules off of your server. Additional controls and limitations will also reduce your attack surface and I’ll cover those below.&lt;/p&gt;  &lt;h3&gt;IUSR account&lt;/h3&gt;  &lt;p&gt;Anyone who has tried to migrate an IIS installation from one machine to another or attempted to recover your installation on a new machine, previous to IIS 7, has likely run into an issue with the local “IUSR_&amp;lt;machine_name&amp;gt;” account.&amp;#160; IIS 7 now uses a built-in IUSR account that allows you to easily copy your security settings from one machine to the next. This is great news for those using distributed configuration in web farms, recovery, restoration, or replication.&lt;/p&gt;  &lt;h3&gt;IIS_IUSRS group&lt;/h3&gt;  &lt;p&gt;IIS 6 introduced the IIS_WPG group. Application pool security identities had to be assigned to this group in order to host the w3wp.exe process. Like the IUSR account, IIS 7 now creates a built-in security group (IIS_IUSRS) and assigns application pool identities to the group automatically. You can find more information about the built-in user and built-in group for IIS 7 on IIS.NET (&lt;a href="http://learn.iis.net/page.aspx/140/understanding-the-built-in-user-and-group-accounts-in-iis-7/." target="_blank"&gt;Understanding the Built-In User and Group Accounts in IIS 7.0&lt;/a&gt;). &lt;/p&gt;  &lt;h3&gt;ASP.NET / IIS Unified Security Architecture&lt;/h3&gt;  &lt;p&gt;Previous versions of IIS did not provide a unified approach to security with ASP.NET. The IIS 7 unified request pipeline that supports both Windows and non-Windows principals and provides one place to do all authentication and authorization. Apart from simplification and performance improvements, this also reduces the attack surface and allows for greater flexibility in authentication / authorization scenarios with custom modules.&lt;/p&gt;  &lt;h3&gt;Request Filtering / URL Rewriting&lt;/h3&gt;  &lt;p&gt;IIS 7.0 includes a request filtering module that is based on the URLScan ISAPI Filter for IIS 6.0. The module helps you tighten security of your Web servers. &lt;/p&gt;  &lt;p&gt;The IIS team has also released an add-on URL rewrite module for IIS 7.0, which provides functionality for rule-based URL manipulation. Even though the primary purpose of the URL rewrite module is to rewrite URL paths for requests, the rewrite module can also be used as a security enforcement tool that helps prevent access to Web site content.&lt;/p&gt;  &lt;h3&gt;Application Pool Identities&lt;/h3&gt;  &lt;p&gt;On top of Application Pool Isolation, IIS introduces a new security feature in Service Pack 2 of Windows Server 2008 and Windows Vista. It's called Application Pool Identities. Application Pool Identities allows you to run Application Pools under an unique account without having to create and manage domain or local accounts. The name of the Application Pool account corresponds to the name of the Application Pool. &lt;/p&gt;  &lt;h3&gt;Kernel mode SSL&lt;/h3&gt;  &lt;p&gt;The implementation of SSL has changed from IIS 6.0 to IIS 7.0.&amp;#160; On Windows Server 2003, all SSL configuration was stored in the IIS metabase and encryption/decryption happened in user mode (required a lot of kernel/user mode transitions).&amp;#160; On Windows Vista and Windows Server® 2008, HTTP.sys handles SSL encryption/decryption in kernel mode, resulting in up to 20% better performance for secure connections.&amp;#160; &lt;/p&gt;  &lt;h3&gt;Configuration Improvements&lt;/h3&gt;  &lt;p&gt;IIS 7.0 allows locking and unlocking configuration settings in various levels and scopes. Locking down configuration means that it cannot be overridden (or set at all) at lower levels in the hierarchy. Unlocking configuration can only be done at the level where it was locked. This is useful, for example, when creating different configuration for different sites or paths, and only some of sites and paths are allowed to override it. Locking can be done at the section level or for specific elements, attributes, collection elements and collection directives within sections.&lt;/p&gt;  &lt;h3&gt;Dynamic IP Restriction&lt;/h3&gt;  &lt;p&gt;IIS 7 provides a new module that allows dynamic, temporary IP address restriction. This module prevents brute force attacks and HTTP clients that make unusually high number of concurrent requests or a large number of requests over a short period of time.&lt;/p&gt;  &lt;h2&gt;Summary&lt;/h2&gt;  &lt;p&gt;A verbose list of security features in IIS 6 and IIS 7 might be nearly impossible. Apart from the obvious features, there were numerous improvements to code made over these two versions that make the product far more secure than IIS 5 and earlier. That said, this should give you a summary start on information. I’ve listed some reference documents that may help you understand these features better.&amp;#160; In general, I would encourage you to ask questions of the product team and or other users on the &lt;a href="http://forums.iis.net/" target="_blank"&gt;IIS.NET forums&lt;/a&gt; if you hear something that sounds negative regarding IIS. If the feedback is true, the product team has the benefit of improving the next release. If the feedback is unfounded, the product team has the benefit of helping you find the information you need to make an informed decision. &lt;/p&gt;  &lt;h2&gt;See Also&lt;/h2&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/scobleizer/Brent-Hill-and-Roger-Grimes-Chatting-about-IIS-7s-security/"&gt;&lt;strong&gt;Brent Hill and Roger Grimes - Chatting about IIS 7's security&lt;/strong&gt;&lt;/a&gt; (From Sept. 2005)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://channel9.msdn.com/shows/TechNet+Radio/TechNet-radio-Learn-about-the-IIS7-Security-features-and-benefits/" target="_blank"&gt;&lt;strong&gt;TechNet radio: Learn about the IIS7 Security features and benefits&lt;/strong&gt;&lt;/a&gt;&amp;#160;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.gartner.com/DisplayDocument?doc_cd=125453" target="_blank"&gt;&lt;strong&gt;Management Update: IIS Is No Longer the Problem in Web Server Security&lt;/strong&gt;&lt;/a&gt; (Gartner)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=568&amp;amp;PUID=00034001826C5CC7" target="_blank"&gt;&lt;strong&gt;IIS 7 Security: Less Exposure, Greater Control&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc731278.aspx" target="_blank"&gt;&lt;strong&gt;TechNet: Configure Web Server Security&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://learn.iis.net/page.aspx/88/configuring-security/" target="_blank"&gt;&lt;strong&gt;IIS.NET : Configuring Security&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://learn.iis.net/page.aspx/139/iis7-security-improvements/" target="_blank"&gt;&lt;strong&gt;IIS.NET : IIS Security Improvements&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://learn.iis.net/page.aspx/548/using-dynamic-ip-restrictions/" target="_blank"&gt;&lt;strong&gt;Using Dynamic IP Restrictions&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering" target="_blank"&gt;&lt;strong&gt;IIS.NET Configuration Reference: Request Filtering&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=3122704" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Installation/default.aspx">Installation</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Application+Pools/default.aspx">Application Pools</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+5.1/default.aspx">IIS 5.1</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+6/default.aspx">IIS 6</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/configuration/default.aspx">configuration</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Logging/default.aspx">Logging</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/URL+Rewriter/default.aspx">URL Rewriter</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Security/default.aspx">Security</category></item><item><title>Installing CakePHP on IIS 7</title><link>http://blogs.iis.net/tobintitus/archive/2009/04/03/installing-cakephp-on-iis-7.aspx</link><pubDate>Fri, 03 Apr 2009 14:15:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:3050460</guid><dc:creator>TobinTitus</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=3050460</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=3050460</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2009/04/03/installing-cakephp-on-iis-7.aspx#comments</comments><description>&lt;P&gt;Recently I spoke with someone on Twitter who was having issues running &lt;A href="http://cakephp.org/" mce_href="http://cakephp.org/"&gt;CakePHP&lt;/A&gt; on IIS. With all the talk about ASP.NET MVC on IIS, folks forget that the MVC pattern works in other languages as well. CakePHP provides MVC&amp;nbsp; development on PHP. That said, I wanted to dive in and see what the issues were involved in getting this project up and running on IIS 7. I managed to get it installed pretty quickly, but it does take a little tweaking to get you up and running. I've chronicled my adventures with CakePHP below in case anyone else is having issues. That said, I must first say that I am not an expert working with CakePHP. This was my first experience with the project, so this information is provided "as-is" and should be taken with a grain of salt. With this demo, I’ll be walking through the "&lt;A href="http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial" target=_blank&gt;Cake Blog Tutorial&lt;/A&gt;” offered on cakephp.org, and modifying it as needed to work with IIS 7. That said, let's get started.&lt;/P&gt;
&lt;H2&gt;Prerequisites&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Install: IIS 7 on Windows 2008 Server or Windows Vista&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Install: &lt;A href="http://php.iis.net/" target=_blank&gt;PHP&lt;/A&gt; for IIS 7.0. Use the &lt;A href="http://www.microsoft.com/web/downloads/platform.aspx" mce_href="http://www.microsoft.com/web/downloads/platform.aspx"&gt;Web Platform Installer&lt;/A&gt; for easiest experience.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Install: &lt;A href="http://www.iis.net/extensions/URLRewrite"&gt;URL Rewriter&lt;/A&gt; module. Use the &lt;A href="http://www.microsoft.com/web/downloads/platform.aspx" mce_href="http://www.microsoft.com/web/downloads/platform.aspx"&gt;Web Platform Installer&lt;/A&gt; for easiest experience.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Install: A database &lt;A href="http://book.cakephp.org/view/308/Installing-CakePHP" target=_blank&gt;supported by CakePHP&lt;/A&gt;. This post uses MySQL.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Download: &lt;A href="http://cakephp.org/"&gt;CakePHP&lt;/A&gt; source code&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Unzip: CakePHP (entire contents) to the intended path&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Yes, there ARE a lot of Prerequisites, but these are pretty typical for any MVC app on any platform.&lt;/P&gt;
&lt;H2&gt;Assumptions / Conventions&lt;/H2&gt;
&lt;P&gt;For the purposes of this post, I will use the convention/assumption that you have unzipped CakePHP to c:\inetpub\CakePHP\ . You should have the following paths now:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;c:\inetpub\CakePHP\&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;\app&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;\cake&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;\vendors&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;.htaccess&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;index.php&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;version.txt&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I will also use the assumption that this is being installed on the "Default Web Site". This is unlikely what you are doing, so you'll want to replace the "Default Web Site" instances in the steps below with your site or application path.&lt;/P&gt;
&lt;P&gt;Lastly, I will assume that you are using and have already installed MySQL. You may use another database if you please, but this blog will reference MySQL.&lt;/P&gt;
&lt;H2&gt;&lt;B&gt;Installing the Blog Sample&lt;/B&gt;&lt;/H2&gt;
&lt;H3&gt;&lt;B&gt;Pointing IIS to the cake document root&lt;/B&gt;&lt;/H3&gt;
&lt;P&gt;First, you'll need to configure your website to point to the correct location. Using the assumptions above, the correct location would be c:\inetpub\CakePHP\app\webroot\ . &lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Creating a Blog Database&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Second, configure your database connection. To do this, you’ll need to create a blog database, and then point your configuration to that new catalog.&lt;/P&gt;
&lt;P&gt;Start by creating a new MySQL Catalog using your favorite tool. I used &lt;A href="http://dev.mysql.com/downloads/gui-tools/5.0.html" target=_blank&gt;MySQL Administrator&lt;/A&gt;. Simply right click in the catalogs and click “create new schema.”&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://tobint.com/timgs/cakephp/mysql-createschema.jpg" width=599 height=480&gt; &lt;/P&gt;
&lt;P&gt;Create a schema named “CakeBlog”. Once the schema is created, click on the “Tools” menu and select “MySQL Query Browser” and execute the following script:&lt;/P&gt;
&lt;DIV class=code&gt;&lt;FONT color=#006400&gt;/* First, create our posts table: */&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;CREATE&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;TABLE&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;posts&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;id&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;UNSIGNED&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;AUTO_INCREMENT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;PRIMARY&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;KEY&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;title&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;VARCHAR&lt;/FONT&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;FONT color=#800000&gt;50&lt;/FONT&gt;&lt;FONT color=#000000&gt;),&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;body&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;TEXT&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;created&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;DATETIME&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;DEFAULT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;NOT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;NULL&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;modified&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;DATETIME&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;DEFAULT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;NOT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;NULL8.)&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#006400&gt;/* Then insert some posts for testing: */&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INSERT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INTO&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;posts&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(title,body,created)&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;VALUES&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;FONT color=#808080&gt;'The title'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'This is the post body.'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;NOW())&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INSERT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INTO&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;posts&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(title,body,created)&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;VALUES&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;FONT color=#808080&gt;'A title once again'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'And the post body follows.'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;NOW())&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INSERT&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INTO&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;posts&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(title,body,created)&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;VALUES&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;FONT color=#808080&gt;'Title strikes back'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'This is really exciting! Not.'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;NOW())&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;DIV class=code&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=code&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=code&gt;&lt;EM&gt;* This SQL code copied verbatim from tutorial found here: &lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=code&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;A title=http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial href="http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial"&gt;&lt;EM&gt;http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;P&gt;You’ve now created your database and a blog posts table with some default posts. Time to configure CakePHP to read from the database:&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Cake Database Configuration&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;We’ll need to let CakePHP know where the database is. Copy &lt;STRONG&gt;database.php.default&lt;/STRONG&gt; in c:\inetpub\CakePHP\app\config\ to &lt;STRONG&gt;database.php&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Open c:\inetpub\cakephp\app\config\database.php and change the $default variable to point to your database: &lt;BR&gt;&lt;FONT color=#0000ff&gt;var&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;$&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;default&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;array(&lt;/FONT&gt;&lt;FONT color=#808080&gt;'driver'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'mysql'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'connect'&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'mysql_connect'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'host'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'localhost'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'login'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'CakeBlog'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'password' &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'c4ke-1z-k00l'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'database' &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; 'CakeBlog'&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'prefix'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt; ''&lt;/FONT&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt; &lt;/P&gt;
&lt;DIV class=code&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=code&gt;&lt;EM&gt;* This PHP code copied nearly verbatim from tutorial found here: &lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=code&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;A title=http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial href="http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial"&gt;&lt;EM&gt;http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;P&gt;You should not be able to open your browser to your application and see the default cake configuration page.&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Setting up Rewriting Rules&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;CakePHP uses mod_rewrite, but also provides the ability to use Cake’s built-in ‘pretty URLs’. We’ll be importing the mod_rewrite rules from the .htaccess files from the default cakephp installation into the IIS URL Rewrite module. We’ll then have to modify those rules.&lt;/P&gt;
&lt;P&gt;Start this process by opening the IIS Management Console. Open your application path. In this instance, we are using “Default Web Site”. &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Click on the “&lt;STRONG&gt;Default Web Site&lt;/STRONG&gt;” &lt;/LI&gt;
&lt;LI&gt;Open the “&lt;STRONG&gt;URL Rewrite&lt;/STRONG&gt;” module &lt;/LI&gt;
&lt;LI&gt;Click on “&lt;STRONG&gt;Import Rules…&lt;/STRONG&gt;” in the &lt;STRONG&gt;Actions&lt;/STRONG&gt; pane &lt;BR&gt;&lt;IMG src="http://tobint.com/timgs/cakephp/mod-rewrite.jpg" width=563 height=480&gt; &lt;/LI&gt;
&lt;LI&gt;Click the “&lt;STRONG&gt;…&lt;/STRONG&gt;” button next to the “Configuration file” textbox. &lt;/LI&gt;
&lt;LI&gt;Select the c:\inetpub\cakephp\.htaccess file and click “&lt;STRONG&gt;OK&lt;/STRONG&gt;” &lt;/LI&gt;
&lt;LI&gt;Click the “&lt;STRONG&gt;Import&lt;/STRONG&gt;” button &lt;/LI&gt;
&lt;LI&gt;Click the “&lt;STRONG&gt;Apply&lt;/STRONG&gt;” button in the “&lt;STRONG&gt;Actions&lt;/STRONG&gt;” pane &lt;/LI&gt;
&lt;LI&gt;Repeat steps 4, 5, 6 and 7 for c:\inetpub\cakephp\app\.htaccess and c:\inetpub\cakephp\app\webroot\.htaccess files. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The rules are imported, but now you’ll need to edit the rules.&lt;/P&gt;
&lt;OL start=start&gt;
&lt;LI&gt;Click the “&lt;STRONG&gt;Back to Rules&lt;/STRONG&gt;” button in the “&lt;STRONG&gt;Actions&lt;/STRONG&gt;” pane&lt;/LI&gt;
&lt;LI&gt;Edit the two rules with the action starting with “&lt;STRONG&gt;webroot/&lt;/STRONG&gt;”&lt;/LI&gt;
&lt;LI&gt;Remove the “&lt;STRONG&gt;webroot&lt;/STRONG&gt;” portion of the “Rewrite URL”. Your paths should now look as follows: &lt;BR&gt;&lt;IMG src="http://tobint.com/timgs/cakephp/mod-rewrite2.jpg"&gt; &lt;/LI&gt;&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Creating your MVC Application&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;The remainder of your application setup should follow the steps found in the original “&lt;A href="http://book.cakephp.org/view/326/The-Cake-Blog-Tutorial" target=_blank&gt;Cake Blog Tutorial&lt;/A&gt;”. There is nothing different between IIS and Apache at this point, so copying the steps would be a bit redundant. Start with the step named “&lt;STRONG&gt;&lt;U&gt;Create a Post Model&lt;/U&gt;&lt;/STRONG&gt;”. Much like ASP.NET MVC, Cake provides an MVC pattern for developing PHP applications. &lt;/P&gt;
&lt;P&gt;Once you have completed the steps, you should have a default site that looks something like the following:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://tobint.com/timgs/cakephp/completed.jpg" width=640 height=396&gt; &lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Summary&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Installing CakePHP on IIS is actually not much different from installing on Apache. The main difference lies in the implementation of mod_rewrite on Apache vs URL Rewriter in IIS. Obviously the installation of PHP differs from Apache. IIS makes the installation of PHP simple with Web Application Installer. If you are using CakePHP on IIS, I would be interested to hear if your experience was different than mine.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=3050460" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/PHP/default.aspx">PHP</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/configuration/default.aspx">configuration</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/URL+Rewriter/default.aspx">URL Rewriter</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/CakePHP/default.aspx">CakePHP</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/mod_5F00_rewrite/default.aspx">mod_rewrite</category></item><item><title>IIS logging UI module sample added to CodePlex</title><link>http://blogs.iis.net/tobintitus/archive/2008/10/03/iis-logging-ui-module-sample-added-to-codeplex.aspx</link><pubDate>Fri, 03 Oct 2008 19:21:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2662091</guid><dc:creator>TobinTitus</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=2662091</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=2662091</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2008/10/03/iis-logging-ui-module-sample-added-to-codeplex.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;For those of you that remember that far back, I released a sample that also filled a need for Windows Vista. Since the original version of Windows Vista did not ship with a user interface for managing logging, and&amp;nbsp;we needed samples of how to build UI modules available to the public, I released the Logging UI module. For some time, I've been hosting that downloadable release on my private web site (&lt;A href="http://tobint.com/" mce_href="http://tobint.com"&gt;tobint.com&lt;/A&gt;). As I plan to make some major changes to my personal site over the next few months, I wanted to make sure the release was still reliably available. That said, I've now added the source code to &lt;A href="http://codeplex.com/" mce_href="http://codeplex.com"&gt;CodePlex&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;You may find the project at &lt;A href="http://www.codeplex.com/iis70loggingui"&gt;http://www.codeplex.com/iis70loggingui&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;I have worked with our source asset management team and made this available under the &amp;lt;a href="http://www.codeplex.com/iis70loggingui/license"&amp;gt;MS-PL&amp;lt;/a&amp;gt;. I hope that this makes the download reliably available. I'm looking forward to developing more samples that&amp;nbsp;I will also be releasing in the same manner. &lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2662091" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/UI+Module/default.aspx">UI Module</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/extensibility/default.aspx">extensibility</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/vista/default.aspx">vista</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/iis+7.0/default.aspx">iis 7.0</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Logging/default.aspx">Logging</category></item><item><title>Enabling VS.NET 2008 to work with IIS 7.0</title><link>http://blogs.iis.net/tobintitus/archive/2008/09/22/enabling-vs-net-2008-to-work-with-iis-7-0.aspx</link><pubDate>Mon, 22 Sep 2008 06:08:14 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2636096</guid><dc:creator>TobinTitus</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=2636096</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=2636096</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2008/09/22/enabling-vs-net-2008-to-work-with-iis-7-0.aspx#comments</comments><description>&lt;p&gt;This is likely old ground for some, but I thought I’d cover it again just in case. As you may know Visual Studio allows you to create a new web site on IIS. However, there are some minor steps that you need to complete before it will work appropriately.&lt;/p&gt;  &lt;p&gt;Let’s walk through this. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open Visual Studio .NET 2008&lt;/li&gt;    &lt;li&gt;Go to &lt;strong&gt;File&lt;/strong&gt; | &lt;strong&gt;Web Site…&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Click the &lt;strong&gt;Browse&lt;/strong&gt;… button to choose a &lt;strong&gt;Location&lt;/strong&gt;      &lt;br /&gt;&amp;#160;&lt;a href="http://blogs.iis.net/blogs/tobintitus/1%20-%20vs08-newwebsite-sm_21C7C2CC.jpg"&gt;&lt;img title="1 - vs08-newwebsite-sm" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="392" alt="1 - vs08-newwebsite-sm" src="http://blogs.iis.net/blogs/tobintitus/1%20-%20vs08-newwebsite-sm_thumb_5F74AA88.jpg" width="607" border="0" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Click on the &lt;strong&gt;Local IIS&lt;/strong&gt; button on the left      &lt;br /&gt;&lt;a href="http://blogs.iis.net/blogs/tobintitus/2%20-%20vs08-iis-sm_4866294C.jpg"&gt;&lt;img title="2 - vs08-iis-sm" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="401" alt="2 - vs08-iis-sm" src="http://blogs.iis.net/blogs/tobintitus/2%20-%20vs08-iis-sm_thumb_1F7B1443.jpg" width="503" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;You’ll notice the IIS 6 Metabase and IIS Configuration Compatibility need to be installed as well as ASP.NET.&amp;#160; The next steps we’ll go through will enable this for you.&lt;/li&gt;    &lt;li&gt;Go to &lt;strong&gt;Start&lt;/strong&gt; | &lt;strong&gt;Control Panel&lt;/strong&gt; and click on the &lt;strong&gt;Programs and Features&lt;/strong&gt; applet&lt;/li&gt;    &lt;li&gt;Click on the &lt;strong&gt;Turn Windows features on or off&lt;/strong&gt; button on the left&lt;/li&gt;    &lt;li&gt;From the &lt;strong&gt;Windows Features&lt;/strong&gt; window, select the &lt;strong&gt;IIS Metabase and IIS 6 configuration compatibility&lt;/strong&gt; option under &lt;strong&gt;IIS 6 Management Compatibility&lt;/strong&gt; as well as &lt;strong&gt;ASP.NET&lt;/strong&gt; under &lt;strong&gt;Application Development Features&lt;/strong&gt;      &lt;br /&gt;&lt;a href="http://blogs.iis.net/blogs/tobintitus/3%20-%20vs08-features-sm_526AA4AA.jpg"&gt;&lt;img title="3 - vs08-features-sm" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="450" alt="3 - vs08-features-sm" src="http://blogs.iis.net/blogs/tobintitus/3%20-%20vs08-features-sm_thumb_0245466C.jpg" width="343" border="0" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; and wait as Windows configures the service      &lt;br /&gt;&lt;a href="http://blogs.iis.net/blogs/tobintitus/4%20-%20vs08-configuring_26F65DE3.jpg"&gt;&lt;img title="4 - vs08-configuring" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="188" alt="4 - vs08-configuring" src="http://blogs.iis.net/blogs/tobintitus/4%20-%20vs08-configuring_thumb_0596B847.jpg" width="370" border="0" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Once Windows is done configuring IIS, it may ask you to restart. Click &lt;strong&gt;Restart Now&lt;/strong&gt;.      &lt;br /&gt;&lt;a href="http://blogs.iis.net/blogs/tobintitus/5%20-%20vs08-restart_0B0528EB.jpg"&gt;&lt;img title="5 - vs08-restart" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="178" alt="5 - vs08-restart" src="http://blogs.iis.net/blogs/tobintitus/5%20-%20vs08-restart_thumb_3BB83096.jpg" width="370" border="0" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;/p&gt;      &lt;p&gt;&lt;/p&gt;      &lt;p&gt;&lt;/p&gt;      &lt;p&gt;&lt;/p&gt;      &lt;p&gt;&lt;/p&gt;      &lt;p&gt;&lt;/p&gt;      &lt;p&gt;After rebooting, you should be able to walk through steps 1-4 again and create a Web site with the &lt;strong&gt;Local IIS&lt;/strong&gt; option.        &lt;br /&gt;&lt;a href="http://blogs.iis.net/blogs/tobintitus/6%20-%20vs08-working-sm_4845DDB2.jpg"&gt;&lt;img title="6 - vs08-working-sm" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="401" alt="6 - vs08-working-sm" src="http://blogs.iis.net/blogs/tobintitus/6%20-%20vs08-working-sm_thumb_6D63281E.jpg" width="503" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This should be all you need to do to enable Local IIS integration with VS.NET 2008.&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2636096" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Installation/default.aspx">Installation</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/vista/default.aspx">vista</category></item><item><title>IIS 7.0 Error Support</title><link>http://blogs.iis.net/tobintitus/archive/2008/09/21/iis-7-0-error-support.aspx</link><pubDate>Sun, 21 Sep 2008 04:48:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2635010</guid><dc:creator>TobinTitus</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=2635010</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=2635010</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2008/09/21/iis-7-0-error-support.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;I know that most of you reading the blogs on this site have already seen how handy the errors are in IIS 7.0 as compared to previous error conditions. This weekend, I was playing with &lt;A class="" href="http://www.dotnetblogengine.net/" mce_href="http://www.dotnetblogengine.net/"&gt;BlogEngine.NET&lt;/A&gt; and thought I'd put it on my personal site (&lt;A class="" href="http://tobint.com/" mce_href="http://tobint.com"&gt;tobint.com&lt;/A&gt;)&amp;nbsp;to try it out. I downloaded the software and tried setting it up on my server. After following the brief instructions, I hit an error:&lt;/P&gt;
&lt;DIV style="COLOR: #ff0000"&gt;&lt;STRONG&gt;HTTP Error 500.22 - Internal Server Error&lt;/STRONG&gt;&lt;BR&gt;An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. &lt;/DIV&gt;
&lt;P mce_keep="true"&gt;In previous versions of IIS, this might have been all that I had to go on. I'd then search one or several search engines for that exact error and read through blog posts, forums, knowledge base articles and FAQ's before I found what I needed. In IIS 7.0, I found the friendly error page awaiting me:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="Error 500.22" style="WIDTH: 583px; HEIGHT: 697px" alt="Error 500.22" src="http://tobint.com/community/images/tobint-error-sm.jpg" align=middle border=2 mce_src="http://tobint.com/community/images/tobint-error-sm.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;I looked at the "Things you can try" and a picked the first "fix" on the list. Since my application was not in the Default Web Site, I ran the appcmd for my application in "tobint.com/".&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title=AppCmd style="WIDTH: 668px; HEIGHT: 331px" height=331 alt=AppCmd src="http://tobint.com/community/images/tobint-error-cmd.jpg" width=668 align=middle border=2 mce_src="http://tobint.com/community/images/tobint-error-cmd.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;As you can see, the error page correctly identified that my configuration needed to be migrated, and gave me the steps I needed to migrate it effectively. No searching the web. No trying to trace the problem down. No turning on tracing for ASP.NET pages.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;I love this feature. It's a huge time saver and I don't think it gets bragged on enough.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2635010" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/errors/default.aspx">errors</category></item><item><title>Accessing Custom Configuration at Runtime with Microsoft.Web.Administration</title><link>http://blogs.iis.net/tobintitus/archive/2008/06/13/accessing-custom-configuration-at-runtime-with-microsoft-web-administration.aspx</link><pubDate>Fri, 13 Jun 2008 19:07:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2423029</guid><dc:creator>TobinTitus</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=2423029</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=2423029</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2008/06/13/accessing-custom-configuration-at-runtime-with-microsoft-web-administration.aspx#comments</comments><description>I've been working on a series of posts and Webcasts in my "spare time" directed at some of the areas in which I am most frequently asked questions. I am currently working on developing topics dealing with IIS configuration. It seems logical that this...(&lt;a href="http://blogs.iis.net/tobintitus/archive/2008/06/13/accessing-custom-configuration-at-runtime-with-microsoft-web-administration.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2423029" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Microsoft.Web.Administration/default.aspx">Microsoft.Web.Administration</category></item><item><title>Silverlight and Expression and Bears, oh my!</title><link>http://blogs.iis.net/tobintitus/archive/2007/04/30/silverlight-and-expression-and-bears-oh-my.aspx</link><pubDate>Mon, 30 Apr 2007 16:53:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1688660</guid><dc:creator>TobinTitus</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1688660</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1688660</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2007/04/30/silverlight-and-expression-and-bears-oh-my.aspx#comments</comments><description>&lt;P&gt;I just watched some of the coolest demos I've seen in a while.&amp;nbsp; Ray Ozzie gave the opening keynote address for Mix 07. I hate to say it but he stated nothing more than the obvious direction of technology, IMHO.&amp;nbsp;Ray's address was quickly followed by Scott Guthrie who received a very warm greeting -- and rightly so! Scott was there to deliver the goodies which were also received very warmly.&amp;nbsp; There were plenty of announcements about Silverlight and the driection we are headed there. The big impressive thing we announced was our cross-platform CLR support and the integration of .NET into Silverlight as a programming model.&amp;nbsp; I loved watching the demo's of using Expression to create the user experience and Visual Studio to provide the remote debugging support -- on a Mac none-the-less!&lt;/P&gt;
&lt;P&gt;This is already all too cool for words. I can't wait to see what else is coming up next. Oh wait, that would be Bill Staples demonstration of IIS 7 for developers.&amp;nbsp; If you are at Mix, come join me in room 4101A to learn what IIS 7 has to offer developers.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1688660" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/MIX07/default.aspx">MIX07</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Expression/default.aspx">Expression</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Logging UI for Vista v1.1 Released</title><link>http://blogs.iis.net/tobintitus/archive/2007/02/01/logging-ui-for-vista-v1-1-released.aspx</link><pubDate>Thu, 01 Feb 2007 20:45:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1559745</guid><dc:creator>TobinTitus</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1559745</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1559745</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2007/02/01/logging-ui-for-vista-v1-1-released.aspx#comments</comments><description>&lt;P&gt;I have completed the final pieces of the Logging UI for Vista and posted them on the DownloadCENTER.&amp;nbsp; I've completed functionality to allow you to configure &lt;STRONG&gt;central binary logging&lt;/STRONG&gt;, &lt;STRONG&gt;central W3C logging&lt;/STRONG&gt;, and &lt;STRONG&gt;site defaults&lt;/STRONG&gt;.&amp;nbsp; I've modified the look and feel of some of the pages and I've even added &lt;STRONG&gt;tool tips&lt;/STRONG&gt; that show what configuration is being changed with each control.&lt;/P&gt;
&lt;P&gt;The source code for this project is also available in C#.&amp;nbsp; If I get a few more moments of time and/or many requests in the next few weeks, I may also port the source to VB.NET and C++/CLI.&lt;/P&gt;
&lt;P&gt;In the mean time, if you have any questions, feel free to contact me.&lt;/P&gt;
&lt;P&gt;You can find the download containing both the source code and the MSI here: &lt;A href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1328"&gt;http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1328&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt; You can find screenshots of the UI module here: &lt;A href="http://blogs.msdn.com/photos/tobint/category20627.aspx"&gt;http://blogs.msdn.com/photos/tobint/category20627.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1559745" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/UI+Module/default.aspx">UI Module</category></item><item><title>Logging UI for IIS 7.0 on Vista: Available for download</title><link>http://blogs.iis.net/tobintitus/archive/2007/01/30/logging-ui-for-iis-7-0-on-vista.aspx</link><pubDate>Tue, 30 Jan 2007 20:25:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1556061</guid><dc:creator>TobinTitus</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1556061</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1556061</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2007/01/30/logging-ui-for-iis-7-0-on-vista.aspx#comments</comments><description>&lt;P&gt;As many of you already know, the management console for IIS 7.0 on Windows Vista does not have a UI for logging.&amp;nbsp; Since this was a pain point for several customers, I decided to test out the extensibility APIs by creating a logging UI module.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I've posted a &lt;A class="" href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;i=1328&amp;amp;g=6"&gt;preview version&lt;/A&gt; of my logging UI on the newly opened &lt;A class="" href="http://www.iis.net/downloads/default.aspx?tabid=3"&gt;IIS Download Center&lt;/A&gt;. I will be releasing a few updates throughout the week with changes.&amp;nbsp; The module also contains the source code for my UI module under the &lt;A class="" href="http://www.microsoft.com/resources/sharedsource/licensingbasics/limitedpermissivelicense.mspx"&gt;Microsoft Permissive License&lt;/A&gt;.&amp;nbsp; This code will also be updated in future releases.&lt;/P&gt;
&lt;P&gt;You can find the download at: &lt;A href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;i=1328&amp;amp;g=6"&gt;http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;i=1328&amp;amp;g=6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If you have any questions, please feel free to &lt;A class="" href="http://blogs.iis.net/tobintitus/contact.aspx"&gt;contact me&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1556061" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/UI+Module/default.aspx">UI Module</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Download/default.aspx">Download</category></item><item><title>Extending Microsoft.Web.Administration through PowerShell  (Part II)</title><link>http://blogs.iis.net/tobintitus/archive/2006/12/01/more-on-iis-7-administration-with-powershell.aspx</link><pubDate>Fri, 01 Dec 2006 17:03:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1483181</guid><dc:creator>TobinTitus</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1483181</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1483181</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2006/12/01/more-on-iis-7-administration-with-powershell.aspx#comments</comments><description>&lt;P&gt;In my &lt;A class="" href="http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx"&gt;previous post&lt;/A&gt;, I showed you how easy it was to leverage your knowledge of the IIS 7 managed SDK in Windows PowerShell.&amp;nbsp; We loaded the IIS 7 managed assemblies and then traversed the object model to display site information and stop application pools.&amp;nbsp; While this in itself was pretty cool, I don't think I quite got my point across about how powerful IIS 7 and PowerShell are together. As such, I wanted to show you some more fun things to do with PowerShell in the name of easy IIS 7 administration.&lt;/P&gt;
&lt;P&gt;First, our examples still required a great deal of typing and piping and filtering.&amp;nbsp; Let's modify our profile script from my previous post by adding at least one new global variable that will give us access to the ServerManager without much typing.&amp;nbsp; Add the following line to your profile script from my previous post.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new-variable iismgr -value (New-Object Microsoft.Web.Administration.ServerManager) -scope "global"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(if you don't have a profile script yet, go back to my &lt;A class="" href="http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx"&gt;previous post&lt;/A&gt; to learn&amp;nbsp;how to create one).&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; If you signed your script before, you'll have to do it again after modifying the script&lt;/P&gt;
&lt;P&gt;Open a new instance of PowerShell and now you can access the site collection just by typing:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;$iismgr.Sites&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;That's considerably smaller than our previous examples.&amp;nbsp; But let's not stop there.&amp;nbsp; What happens if I want to search the site collection? PowerShell has some fun syntax for this as well. I simply pipe the output of my SiteCollection to a "Where-Object" cmdlet and then specify what site I'm looking for:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$iismgr.Sites | Where-Object {$_.Name -match "^Default*"}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is still&amp;nbsp;quite a bit of typing when all I really want to do is find the default website.&amp;nbsp;You may ask "Wouldn't it be easier if we could just add a "Find" method to the SiteCollection object?" Well I'm glad &lt;EM&gt;you&lt;/EM&gt; asked *cough*!&amp;nbsp; Next, we are going to do just that! Open up another instance of notepad and add the following XML to it:&lt;/P&gt;
&lt;DIV style="FONT-FAMILY:Courier;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;BR&gt;&amp;lt;!-- *******************************************************************&lt;BR&gt;Copyright (c) Microsoft Corporation.&amp;nbsp; All rights reserved.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;THIS SAMPLE CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY &lt;BR&gt;OF ANY KIND,WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO &lt;BR&gt;THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR&lt;BR&gt;PURPOSE. IF THIS CODE AND INFORMATION IS MODIFIED, THE ENTIRE RISK OF USE&lt;BR&gt;OR RESULTS IN CONNECTION WITH THE USE OF THIS CODE AND INFORMATION &lt;BR&gt;REMAINS WITH THE USER.&lt;BR&gt;******************************************************************** --&amp;gt; 
&lt;P&gt;&amp;lt;Types&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;Type&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Microsoft.Web.Administration.SiteCollection&amp;lt;/Name&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;Members&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ScriptMethod&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Find&amp;lt;/Name&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Script&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rtr = "";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if ( $args[0] ) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;$name = $args[0];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rtr = ((New-Object Microsoft.Web.Administration.ServerManager).Sites | Where-Object {$_.Name -match $name}) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rtr = "No sites found." &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rtr&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Script&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ScriptMethod&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Members&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/Type&amp;gt;&lt;BR&gt;&amp;lt;/Types&amp;gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;What we've done is identified that we want to add a scripted method to the Microsoft.Web.Administration.SiteCollection object. In our case,&amp;nbsp;I've added a "Find" method&amp;nbsp;by&amp;nbsp;using the same cmdlet that we typed before to search the site collection. The&amp;nbsp;difference is, this type I use the $args array variable to check for a parameter and use it if one is available.&amp;nbsp; Now, save this file into your %windir%\system32\WindowsPowerShell\v1.0\ directory as "iis.types.ps1xml".&amp;nbsp; Once you've saved the file, sign it the same way you signed your profile script.&amp;nbsp; Keep in mind that these xml files contain code, so signing your xml is required to keep your PowerShell experience a secure one.&amp;nbsp; Now, open your profile script (again) and add the following lines to the end:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new-variable iissites -value (New-Object Microsoft.Web.Administration.ServerManager).Sites -scope "global"&lt;BR&gt;new-variable iisapppools -value (New-Object Microsoft.Web.Administration.ServerManager).ApplicationPools -scope "global"&lt;BR&gt;update-typedata -append (join-path -path $PSHome -childPath "iis.types.ps1xml")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Once again, you'll have to re-sign this profile if your execution policy requires signed scripts.&lt;/P&gt;
&lt;P&gt;Notice that I added two more variables: $iissites and $iisapppools. These variables allow me to access the site collection and application pool collection with a simple keyword.&amp;nbsp; Lets try them out in PowerShell. Make sure you open a new instance of PowerShell so your profile script and xml type data are updated properly. Once your new instance of PowerShell is open, type the following:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;$iissites.Find("^Default*")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;PowerShell will do all the work for you and you have MUCH less typing to do.&lt;/P&gt;
&lt;P&gt;Another alternative to using xml files is to simply create a function and add it to your profile. For instance, we can create a function called "findsite" that provides the same functionality as our previous example. Either type the following command into PowerShell or add it to your profile script:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;function findsite { $name=$args[0]; ((New-Object Microsoft.Web.Administration.ServerManager).Sites | Where-Object {$_.Name -match $name});&lt;/STRONG&gt; &lt;STRONG&gt;} }&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Now you can search for a site using the following syntax:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;findsite default*&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Whatever way we choose to extend Microsoft.Web.Administration and/or PowerShell, we can use our output as we did before:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;(findsite default*).Id&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The previous line should display the Id of the default web site.&amp;nbsp; We can also stop the website:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;(findsite default*).Stop()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We can keep taking this to extremes and truncate every operation that we perform on a semi-regular basis.&amp;nbsp; These scripts are not one-offs. Each script function we create or append to an existing object model can be reused and piped as input to another function.&amp;nbsp; The possibilities are endless and completely customizable to your needs.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1483181" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Accessing Microsoft.Web.Administration through PowerShell (Part I)</title><link>http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx</link><pubDate>Fri, 01 Dec 2006 04:09:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1482586</guid><dc:creator>TobinTitus</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1482586</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1482586</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx#comments</comments><description>&lt;P&gt;I've caught the PowerShell bug. In between stints with my ever-expanding code samples, I play with PowerShell a lot.&amp;nbsp; I thought I'd share a quick example of how to load Microsoft.Web.Administration.dll and use it to perform some basic tasks.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;I'm running these samples on Windows Vista RTM, but I have no reason to believe this will not work on the PowerShell release candidates for the Vista RC* builds that are &lt;A class="" title="available now" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;available now&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;So let's get started.&lt;/P&gt;
&lt;P&gt;First, PowerShell has no idea where Microsoft.Web.Administration.DLL is so you have to tell it how to load it. Anyone who has written code to&amp;nbsp;dynamically load an assembly should be familiar with this syntax.&amp;nbsp; Type the following command&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;[System.Reflection.Assembly]::LoadFrom( "C:\windows\system32\inetsrv\Microsoft.Web.Administration.dll" )&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The path to your assembly may change depending on your install.&amp;nbsp; I'll show you later how to use environment variables to calculate the correct path.&amp;nbsp; In the mean time the out put of the line above display something like the following:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;GAC&amp;nbsp;&amp;nbsp;Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Location &lt;/DIV&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;---&amp;nbsp;&amp;nbsp;-------&amp;nbsp;&amp;nbsp;&amp;nbsp; -------- &lt;/DIV&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\7.0.0.0__31bf3856ad364e35\Microsoft.... &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Once the assembly is loaded you can use PowerShell's "New-Object" command to create a ServerManager object that is defined in Microsoft.Web.Administration.&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;(New-Object Microsoft.Web.Administration.ServerManager)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This doesn't give you much except the list of properties the ServerManager exposes:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;ApplicationDefaults&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.ApplicationDefaults&lt;BR&gt;ApplicationPoolDefaults&amp;nbsp; :&lt;BR&gt;ApplicationPools&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&lt;BR&gt;SiteDefaults&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.SiteDefaults&lt;BR&gt;Sites&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {Default Web Site}&lt;BR&gt;VirtualDirectoryDefaults : Microsoft.Web.Administration.VirtualDirectoryDefaults&lt;BR&gt;WorkerProcesses&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {} &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To get more detail, you need to use the properties and methods of the ServerManager object to drill down and get the information we want. The ServerManager provides access to all of the sites on your machine through a SiteCollection object. This SiteCollection is made available through the "Sites" property of the ServerManager.&amp;nbsp; 
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;(New-Object Microsoft.Web.Administration.ServerManager).Sites&lt;/STRONG&gt; 
&lt;P&gt;Which will produce&amp;nbsp;a list view of all the sites and their associated property names/values. &lt;BR&gt;&lt;BR&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;ApplicationDefaults&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.ApplicationDefaults&lt;BR&gt;Applications&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {DefaultAppPool, Classic .NET AppPool}&lt;BR&gt;Bindings&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {}&lt;BR&gt;Id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;BR&gt;Limits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.SiteLimits&lt;BR&gt;LogFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.SiteLogFile&lt;BR&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Default Web Site&lt;BR&gt;ServerAutoStart&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : True&lt;BR&gt;State&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Started&lt;BR&gt;TraceFailedRequestsLogging : Microsoft.Web.Administration.SiteTraceFailedRequestsLogging&lt;BR&gt;VirtualDirectoryDefaults&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.VirtualDirectoryDefaults&lt;BR&gt;ElementTagName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : site&lt;BR&gt;IsLocallyStored&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : True&lt;BR&gt;RawAttributes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {name, id, serverAutoStart} &lt;/DIV&gt;
&lt;P style="FONT-FAMILY:COURIER;"&gt;ApplicationDefaults&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.ApplicationDefaults&lt;BR&gt;Applications&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {DefaultAppPool}&lt;BR&gt;Bindings&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {}&lt;BR&gt;Id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 2&lt;BR&gt;Limits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.SiteLimits&lt;BR&gt;LogFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.SiteLogFile&lt;BR&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Test Web Site 1&lt;BR&gt;ServerAutoStart&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : False&lt;BR&gt;State&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Stopped&lt;BR&gt;TraceFailedRequestsLogging : Microsoft.Web.Administration.SiteTraceFailedRequestsLogging&lt;BR&gt;VirtualDirectoryDefaults&amp;nbsp;&amp;nbsp; : Microsoft.Web.Administration.VirtualDirectoryDefaults&lt;BR&gt;ElementTagName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : site&lt;BR&gt;IsLocallyStored&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : True&lt;BR&gt;RawAttributes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {name, id, serverAutoStart} &lt;BR&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Of course, this isn't the easiest view to read, so let's say we just list the site names by piping our site list to&amp;nbsp;the "ForEach-Object" command in PowerShell and display a list of site names only:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;PS C:\&amp;gt; &lt;STRONG&gt;(New-Object Microsoft.Web.Administration.ServerManager).Sites | ForEach-Object {$_.Name}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This looks much more concise:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;Default Web Site&lt;BR&gt;Test Web Site 1 &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We could also use the Select-Object syntax to query the list into a table format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;PS C:\&amp;gt; &lt;STRONG&gt;(New-Object Microsoft.Web.Administration.ServerManager).Sites | Select Id, Name&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id Name&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- ----&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 Default Web Site&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 Test Web Site 1&lt;/DIV&gt;
&lt;P&gt;Now lets use PowerShell to manage application pools. We can fit several commands on one line by using the semi-colon.&amp;nbsp; The following command-line is actually four different operations: Storing the application pool collection into a variable, displaying the name and runtime status of the first application pool, stopping the first application pool, then displaying the name and status again.&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;$pools=(New-Object Microsoft.Web.Administration.ServerManager).ApplicationPools; $pools.Item(0) | Select Name, State;$pools.Item(0).Stop(); $pools.Item(0) | Select Name, State&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Running this sample should display the following:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:COURIER;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; State&lt;BR&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----&lt;BR&gt;DefaultAppPool&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Started&lt;BR&gt;Stopped&lt;BR&gt;DefaultAppPool&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stopped&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is nice, but we can do this already with appcmd.exe right? Well, to some extent.&amp;nbsp; We don't get the features of PowerShell that allow us to format our output the data to our liking. Also, as a developer, I find it much easier to use the API syntax I'm already familiar with than to remember appcmd.exe syntax.&amp;nbsp; Furthermore, PowerShell allows us to use WMI alongside our managed code calls, and unlike appcmd.exe, you can extend PowerShell and cmdlets.&amp;nbsp;PowerShell gives you the ability to easily manage multiple servers from one command prompt on one machine.&amp;nbsp; Watch the PowerShell/IIS 7 interview on &lt;A class="" title=Channel9 href="http://channel9.msdn.com/Showpost.aspx?postid=256994"&gt;Channel9&lt;/A&gt; if you want to see this remote administration in action.&lt;/P&gt;
&lt;P&gt;One last thing that PowerShell brings to the table is the ability to "spot-weld" our object models (as &lt;SPAN&gt;&lt;A class="" title="Scott Hanselman" href="http://www.hanselman.com/blog/CategoryView.aspx?category=PowerShell"&gt;&lt;STRONG&gt;Scott&lt;/STRONG&gt; Hanselman&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp;quipped). You can create/modify/extend type data and formatting to your hearts desire.&amp;nbsp; For more information on this, check out the PowerShell documentation found in the PowerShell install, or in the &lt;A class="" title="PowerShell documentation set" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F&amp;amp;displaylang=en"&gt;PowerShell documentation set&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;So, I would be remiss in this post if I didn't try to make your PowerShell / IIS 7.0 life easier.&amp;nbsp; As such, I've created a profile script that loads all the IIS 7.0 managed assemblies for you.&amp;nbsp; The script is simple and contains more&amp;nbsp; echo commands than actual working script lines.&lt;/P&gt;
&lt;P&gt;To install this script run the following command inside PowerShell:&lt;/P&gt;
&lt;DIV style="FONT-FAMILY:Courier;"&gt;PS C:&amp;gt; &lt;STRONG&gt;if ( test-path $profile ) { echo "Path exists." } else { new-item -path $profile -itemtype file -force }; notepad $profile&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;This will create a profile path for you if you don't already have one, then open up your profile in notepad.&amp;nbsp; If you haven't added anything to the file, it will obviously display an empty file.&amp;nbsp; Paste the following in notepad when it opens:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:Courier;"&gt;echo "Microsoft IIS 7.0 Environment Loader"&lt;BR&gt;echo "Copyright (C) 2006 Microsoft Corporation. All rights reserved."&lt;BR&gt;echo "&amp;nbsp; Loading IIS 7.0 Managed Assemblies"&lt;BR&gt;&lt;BR&gt;$inetsrvDir = (join-path -path $env:windir -childPath "\system32\inetsrv\")&lt;BR&gt;Get-ChildItem -Path (join-path -path $inetsrvDir -childPath "Microsoft*.dll") | ForEach-Object {[System.Reflection.Assembly]::LoadFrom( (join-path -path $inetsrvDir -childPath $_.Name)) }&lt;BR&gt;&lt;BR&gt;echo "&amp;nbsp; Assemblies loaded."&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now, save the profile and close notepad.&amp;nbsp; You will likely have to sign this script &lt;EM&gt;or&lt;/EM&gt; change your script execution policy to something very weak&amp;nbsp;to make this script run properly (obviously I'm not recommending the latter).&amp;nbsp;To find out more about signing scripts, type "get-help about_signing" in PowerShell.&amp;nbsp;The instructions to create a self-signed certificate found in that help file are as follows:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:Courier;"&gt;In an SDK Command Prompt window, run the following commands.&lt;BR&gt;The first command creates a local certificate authority for your computer.&lt;BR&gt;The second command generates a personal certificate from the certificate authority:&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;makecert -n "CN=PowerShell Local Certificate Root" -a sha1 `&lt;BR&gt;&amp;nbsp;&amp;nbsp; -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer `&lt;BR&gt;&amp;nbsp;&amp;nbsp; -ss Root -sr localMachine&lt;BR&gt;makecert -pe -n "CN=PowerShell User" -ss MY -a sha1 `&lt;BR&gt;&amp;nbsp;&amp;nbsp; -eku 1.3.6.1.5.5.7.3.3 -iv root.pvk -ic root.cer&lt;BR&gt;&amp;nbsp;&amp;nbsp; MakeCert will prompt you for a private key password.&lt;/STRONG&gt; &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Go ahead and make a certificate for yourself following those instructions. To sign your profile, within PowerShell type the following:&lt;/P&gt;
&lt;DIV style="FONT-FAMILY:Courier;"&gt;PS C:\&amp;gt;&lt;STRONG&gt;Set-AuthenticodeSignature $profile @(get-childitem cert:\CurrentUser\My -codesigning)[0] &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;So far, you've created a certificate and signed your script. Now, you will have to change your&amp;nbsp;script&amp;nbsp;execution policy&amp;nbsp;down at least one level from the default.&amp;nbsp; The default doesn't allow scripts at all.&amp;nbsp; To get scripts to execute, at the minimum you'll have to set it to "AllSigned" to allow only signed scripts to execute.&amp;nbsp; In this mode, each time you execute a script from a new publisher, you'll be asked what level of trust to assign to the&amp;nbsp;publisher (unless you respond to the prompt to "Always Run" or "Never Run" scripts from that publisher)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="FONT-FAMILY:Courier;"&gt;Do you want to run software from this untrusted publisher?&lt;BR&gt;File C:\Users\TobinT\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 is published by CN=PowerShell User&lt;BR&gt;and is not trusted on your system. Only run scripts from trusted publishers.&lt;BR&gt;[V] Never run&amp;nbsp; [D] Do not run&amp;nbsp; [R] Run once&amp;nbsp; [A] Always run&amp;nbsp; [?] Help (default is "D"): &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now, each new instance of PowerShell that you run will automatically load the IIS 7.0 managed assemblies.&amp;nbsp; I know it seems like a great deal of work, but it really isn't once you've made a few rounds around inside PowerShell. Consider that you only have to create the script once and then you have full the full range of the managed IIS 7.0 SDK at your fingertips inside PowerShell.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;If you have problems, feel free to leave comments and I'll do my best to help you.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1482586" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/SDK/default.aspx">SDK</category></item><item><title>Adding performance</title><link>http://blogs.iis.net/tobintitus/archive/2006/11/30/adding-performance.aspx</link><pubDate>Thu, 30 Nov 2006 11:38:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1481697</guid><dc:creator>TobinTitus</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1481697</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1481697</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2006/11/30/adding-performance.aspx#comments</comments><description>&lt;P&gt;Some of you may have found the title to this blog post as amusing as I do.&amp;nbsp; Throughout my career, I've been called into many a meeting asking that I "add" performance to a complete or nearly-complete product.&amp;nbsp;No matter how many scowls I got, I could never resist joking about just adding the IPerformance interface.&amp;nbsp; "And, while you are at it, just add the IScalable one too", I would quip.&amp;nbsp;(OK, I know some of you are doing searches for these interfaces -- don't bother). Laugh as hard as I may, I'm embarrassed to say that I am trying to do this very thing now.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few weeks ago, I started playing around with a &lt;EM&gt;small&lt;/EM&gt; sample that shows off some of the fun features of IIS 7.&amp;nbsp;As I started coding, I added more features to the sample. Scope creep is a no-no, but this was something I was doing on my own time so I didn't have a problem with it.&amp;nbsp; However, the sample got so large that I had to actually stop and design a public API to support it.&amp;nbsp; By the time I was done, my "sample" had a set of providers, a common API, localization support, utilities, and most notably, performance issues.&lt;/P&gt;
&lt;P&gt;Last year on my personal blog, I talked about "&lt;A class="" href="http://codemilitia.com/blogs/tobin.titus/archive/2005/08/12/71.aspx" target=_blank&gt;engineering for usability&lt;/A&gt;".&amp;nbsp; In that post, I declared that the simplest design is sometimes (and probably most often) the best approach.&amp;nbsp; That said, performance should have been considered very early on, and the sample should have been kept simple.&amp;nbsp; Performance, as many of you know, is not something you add as an&amp;nbsp;afterthought.&amp;nbsp; Starting&amp;nbsp;my sample the way I did, I never considered&amp;nbsp;code performance to be an issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I'm forced to decide:&amp;nbsp; do I scale back my sample knowing full well that it doesn't have a security model or provide easy extensibility, or do I redesign the sample with the current feature set and design for performance up front?&amp;nbsp; I'm leaning toward the latter despite reciting "keep it simple, stupid" in my head over and over again.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1481697" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category></item><item><title>Where can I find &lt;feature x&gt; in IIS 7.0 ?</title><link>http://blogs.iis.net/tobintitus/archive/2006/10/10/Where-can-I-find-_3C00_feature-x_3E00_-in-IIS-7.0-_3F00_.aspx</link><pubDate>Tue, 10 Oct 2006 21:40:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1424441</guid><dc:creator>TobinTitus</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1424441</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1424441</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2006/10/10/Where-can-I-find-_3C00_feature-x_3E00_-in-IIS-7.0-_3F00_.aspx#comments</comments><description>&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;: &lt;EM&gt;Where can I find&amp;nbsp;Windows Authentication&amp;nbsp;in IIS 7.0&lt;/EM&gt;?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've seen this question or questions like this&amp;nbsp;asked numerous times so I thought it would make a nice quick -- and hopefully useful --&amp;nbsp;blog post.&lt;/P&gt;
&lt;P&gt;In previous versions of IIS, administrators were able to enable or disable features on their servers by simply checking or unchecking a box in the IIS management console.&amp;nbsp; However, when an administrator unchecked a feature in IIS, the feature still existed on the machine and was even loaded.&amp;nbsp; Unchecking a box allowed the administrator to disable a feature -- but it didn't physically remove anything from the machine.&lt;/P&gt;
&lt;P&gt;This all changes with IIS 7.0.&amp;nbsp; Currently,&amp;nbsp;when you install&amp;nbsp;IIS 7.0&amp;nbsp;on Windows Vista (or Longhorn server for that matter), you must select the features that you want installed.&amp;nbsp; Each feature in IIS 7.0&amp;nbsp;is &lt;A title=componentized href="http://www.iis.net/default.aspx?tabid=7&amp;amp;subtabid=71"&gt;componentized&lt;/A&gt; into its own module library.&amp;nbsp; The features you select at installation, and ONLY the features you select, will be copied to disk under the &lt;SPAN style="FONT-FAMILY:courier new;"&gt;"%windir%\system32\inetsrv\"&lt;/SPAN&gt; directory.&amp;nbsp;If you do not install the feature, it simply won't exist on your machine.&amp;nbsp;&amp;nbsp;This obviously makes the server more robust and performant at the sime time -- providing a high amount of customization as well as security.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Another thing to note is that once a feature module has been installed to the proper directory, it must also be added to the IIS configuration system.&amp;nbsp; For more information on how to install and uninstall modules, see: &lt;A title="Getting Started With Modules" href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=930"&gt;Getting Started with Modules&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If you are having a hard time getting WindowsAuthentication, DynamicCompression, or some other feature of IIS to work. A good place to start looking is your installation.&amp;nbsp; Make sure you've installed the features you need for your purposes.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1424441" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Componentization/default.aspx">Componentization</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Installation/default.aspx">Installation</category></item><item><title>SDK Sample: Changing the runtime version of an application pool in IIS 7</title><link>http://blogs.iis.net/tobintitus/archive/2006/06/28/sdk-sample-changing-the-runtime-version-of-an-application-pool-in-iis-7.aspx</link><pubDate>Thu, 29 Jun 2006 03:03:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1327861</guid><dc:creator>TobinTitus</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/rsscomments.aspx?PostID=1327861</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/tobintitus/commentapi.aspx?PostID=1327861</wfw:comment><comments>http://blogs.iis.net/tobintitus/archive/2006/06/28/sdk-sample-changing-the-runtime-version-of-an-application-pool-in-iis-7.aspx#comments</comments><description>&lt;P&gt;The following quick SDK sample demonstrates how to list and change the managed runtime version of application pools programatically in IIS 7. &lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;[VB]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;Imports System
Imports Microsoft.Web.Administration

Public Class AppPoolSample
    Shared manager As ServerManager = New ServerManager()

    ' Main application processing
    Public Shared Sub Main(ByVal args As String())
        ' Get the apppool to change
        Dim iPool As Integer = GetAppPool()

        ' Get the framework version desired
        Dim rtVersion As String = GetVersion()

        ' Set the apppool runtime
        Dim poolToSet As ApplicationPool = manager.ApplicationPools(iPool)

        Console.WriteLine("Setting application pool '{0}' to runtime version: {1}...", _
            poolToSet.Name, rtVersion)
        poolToSet.ManagedRuntimeVersion = rtVersion

        ' Commit the changes and recycle the application pool
        manager.CommitChanges()
        poolToSet.Recycle()

        Console.WriteLine("Your changes have been committed.")
    End Sub

    ' Prompts the user to select an application pool
    Public Shared Function GetAppPool() As Integer

        Dim pool As String = String.Empty
        Dim iPool As Integer = 0

        While (Not Integer.TryParse(pool, iPool))
            Console.WriteLine("Available ApplicationPools: Managed runtime version")
            Dim i As Integer
            For i = 0 To manager.ApplicationPools.Count - 1 Step i + 1
                Dim appPool As ApplicationPool = manager.ApplicationPools(i)
                Console.WriteLine("{3}{0,3}.{3}{1}: {2}", i + 1, _
                    appPool.Name, appPool.ManagedRuntimeVersion, vbTab)
            Next
            Console.Write("{0}Choose an application pool to change: ", vbCrLf)
            pool = Console.ReadLine()
        End While
        Return iPool - 1
    End Function

    ' Prompts a user to select the version of runtime they would like
    ' the application pool to use
    Public Shared Function GetVersion() As String
        Dim rtVersion As String = String.Empty
        Dim iVersion As Integer = 0

        While (Not Integer.TryParse(rtVersion, iVersion))
            Console.WriteLine("{0}  1.{0}Framework version 1.0", vbTab)
            Console.WriteLine("{0}  2.{0}Framework version 1.1", vbTab)
            Console.WriteLine("{0}  3.{0}Framework version 2.0", vbTab)
            Console.Write("Choose the new managed runtime version: ")
            rtVersion = Console.ReadLine()
        End While

        Select Case iVersion
            Case 1
                rtVersion = "v1.0"
            Case 2
                rtVersion = "v1.1"
            Case 3
                rtVersion = "v2.0"
        End Select

        Return rtVersion
    End Function
End Class
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;[C#&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;using System;
using Microsoft.Web.Administration;

public class AppPoolSample 
{
    static ServerManager manager = new ServerManager();
    
    // Main application processing
    public static void Main(string[] args)  
    {
        // Get the apppool to change
        int iPool = GetAppPool();

        // Get the framework version desired
        string rtVersion = GetVersion();

        // Set the apppool runtime
        ApplicationPool poolToSet = manager.ApplicationPools[iPool];

        Console.WriteLine("Setting application pool '{0}' to runtime version: {1}...",
            poolToSet.Name, rtVersion);
        poolToSet.ManagedRuntimeVersion = rtVersion;

        // Commit the changes and recycle the application pool
        manager.CommitChanges();
        poolToSet.Recycle();

        Console.WriteLine("Your changes have been committed.");
    }

    // Prompts the user to select an application pool
    public static int GetAppPool()
    {
        string pool = String.Empty;
        int iPool = 0;

        while ((!int.TryParse(pool, out iPool)) ||
                (iPool &amp;gt; manager.ApplicationPools.Count || iPool &amp;lt;= 0))
        {
            Console.WriteLine("Available ApplicationPools: Managed runtime version");
            for (int i = 0; i &amp;lt;= manager.ApplicationPools.Count - 1; i++)
            {
                ApplicationPool appPool = manager.ApplicationPools[i];
                Console.WriteLine("\t{0,3}.\t{1}: {2}", i + 1, 
                    appPool.Name, appPool.ManagedRuntimeVersion);
            }
            Console.Write("\r\nChoose an application pool to change: ");
            pool = Console.ReadLine();
        }
        return iPool -1;
    }

    // Prompts a user to select the version of runtime they would like
    // the application pool to use
    public static string GetVersion()
    {
        string rtVersion = String.Empty;
        int iVersion = 0;

        while ((!int.TryParse(rtVersion, out iVersion)) ||
                (iVersion &amp;gt; 3 || iVersion &amp;lt; 1))
        {
            Console.WriteLine("\r\n\t   1.\tFramework version 1.0");
            Console.WriteLine("\t   2.\tFramework version 1.1");
            Console.WriteLine("\t   3.\tFramework version 2.0");
            Console.Write("Choose the new managed runtime version: ");
            rtVersion = Console.ReadLine();
        }

        switch (iVersion)
        {
            case 1:
                rtVersion  = "v1.0";
                break;
            case 2:
                rtVersion = "v1.1";
                break;
            case 3:
                rtVersion = "v2.0";
                break;
        }

        return rtVersion;
    }
}
&lt;/PRE&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1327861" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/tobintitus/archive/tags/IIS+7/default.aspx">IIS 7</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.iis.net/tobintitus/archive/tags/Application+Pools/default.aspx">Application Pools</category></item></channel></rss>