<?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>Sukesh&amp;#39;s IIS Blog : IIS7</title><link>http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx</link><description>Tags: IIS7</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>How to configure SSL on IIS7 under Windows 2008 Server Core</title><link>http://blogs.iis.net/sukesh/archive/2008/05/21/how-to-configure-ssl-on-iis7-under-windows-2008-server-core.aspx</link><pubDate>Wed, 21 May 2008 06:16:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2370216</guid><dc:creator>sukesh</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=2370216</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2008/05/21/how-to-configure-ssl-on-iis7-under-windows-2008-server-core.aspx#comments</comments><description>&lt;P&gt;Due to the popularity of Windows 2008 Server Core I have seen frequently questions about how to configure SSL on IIS7 with only command-line. Since I wandered that path few months back I thought of putting this article/guide together.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.awesomeideas.net/post/2008/05/18/How-to-configure-SSL-on-IIS7-under-Windows-2008-Server-Core.aspx"&gt;http://www.awesomeideas.net/post/2008/05/18/How-to-configure-SSL-on-IIS7-under-Windows-2008-Server-Core.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2370216" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/sukesh/archive/tags/Certificate/default.aspx">Certificate</category><category domain="http://blogs.iis.net/sukesh/archive/tags/appcmd/default.aspx">appcmd</category><category domain="http://blogs.iis.net/sukesh/archive/tags/Server+Core/default.aspx">Server Core</category><category domain="http://blogs.iis.net/sukesh/archive/tags/certutil/default.aspx">certutil</category><category domain="http://blogs.iis.net/sukesh/archive/tags/SSL/default.aspx">SSL</category></item><item><title>IIS7 Mobile Admin now on codeplex !!!</title><link>http://blogs.iis.net/sukesh/archive/2008/03/20/iis7-mobile-admin-now-on-codeplex.aspx</link><pubDate>Thu, 20 Mar 2008 09:35:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2244604</guid><dc:creator>sukesh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=2244604</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2008/03/20/iis7-mobile-admin-now-on-codeplex.aspx#comments</comments><description>&lt;P&gt;IIS7 Mobile Admin is a simple web application to administer IIS7 remotely using a mobile phone browser.&amp;nbsp; I provided few screenshots of IIS7 Mobile Admin in my previous blog post here &lt;A title="IIS7 Mobile Admin" href="http://www.awesomeideas.net/post/2008/03/04/IIS7-Mobile-Admin.aspx" mce_href="http://www.awesomeideas.net/post/2008/03/04/IIS7-Mobile-Admin.aspx"&gt;http://www.awesomeideas.net/post/2008/03/04/IIS7-Mobile-Admin.aspx&lt;/A&gt; &lt;BR&gt;&lt;BR&gt;And I promised to get it on codeplex for your download pleasure and finally it's ready and available &lt;BR&gt;&lt;BR&gt;Project Home (Screenshots,FAQ) - &lt;A title=http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx href="http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx" mce_href="http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx"&gt;http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx&lt;/A&gt; &lt;BR&gt;Download &amp;amp; Discussion - &lt;A href="http://www.codeplex.com/iis7mobileadmin/" mce_href="http://www.codeplex.com/iis7mobileadmin/"&gt;http://www.codeplex.com/iis7mobileadmin/&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What are the features available in this release (called R1)? &lt;BR&gt;&lt;/STRONG&gt;Search Application Pools &amp;amp; Web Sites&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Application Pool 
&lt;UL&gt;
&lt;LI&gt;Show Requests (Top 10 requests sort in descending order of 'Time Elapsed' &lt;/LI&gt;
&lt;LI&gt;Show Applications &lt;/LI&gt;
&lt;LI&gt;Recycle Application Pool &lt;/LI&gt;
&lt;LI&gt;TODO:Your wishes... &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;Web Sites 
&lt;UL&gt;
&lt;LI&gt;Show Configuration (Show all bindings for the website) &lt;/LI&gt;
&lt;LI&gt;Start Website &lt;/LI&gt;
&lt;LI&gt;Stop Website &lt;/LI&gt;
&lt;LI&gt;TODO:Your wishes &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Get more screenshots on Project Home &lt;A title=http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx href="http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx" mce_href="http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx"&gt;http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.awesomeideas.net/image.axd?picture=WindowsLiveWriter/IIS7MobileAdmin_D7C0/MobileUI_2.png" mce_src="http://www.awesomeideas.net/image.axd?picture=WindowsLiveWriter/IIS7MobileAdmin_D7C0/MobileUI_2.png"&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2244604" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/sukesh/archive/tags/Hostable+Web+Core/default.aspx">Hostable Web Core</category><category domain="http://blogs.iis.net/sukesh/archive/tags/Cool+Stuff/default.aspx">Cool Stuff</category><category domain="http://blogs.iis.net/sukesh/archive/tags/HWC/default.aspx">HWC</category></item><item><title>IIS7 Mobile Admin</title><link>http://blogs.iis.net/sukesh/archive/2008/03/06/iis7-mobile-admin.aspx</link><pubDate>Thu, 06 Mar 2008 08:37:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2241629</guid><dc:creator>sukesh</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=2241629</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2008/03/06/iis7-mobile-admin.aspx#comments</comments><description>&lt;P&gt;I wanted to introduce something I’ve been working during last couple of weekends. Yes you guessed it “&lt;B&gt;IIS7 Mobile Admin&lt;/B&gt;” to show some love to our web server administrators who keeps our Web 2.0 world up and running!&lt;/P&gt;
&lt;P&gt;&lt;I&gt;Ingredients&lt;/I&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;I&gt;IIS7 Hosted Web core Service (which I wrote in C++, just like WMSVC IIS Management Service)&amp;nbsp; &lt;BR&gt;&lt;A href="http://www.awesomeideas.net/page/IIS7-Hostable-WebCore.aspx" mce_href="http://www.awesomeideas.net/page/IIS7-Hostable-WebCore.aspx"&gt;http://www.awesomeideas.net/page/IIS7-Hostable-WebCore.aspx&lt;/A&gt; &lt;/I&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;I&gt;ASP.NET website specifically designed for use on browser of a cell phone using LINQ + IIS7 managed API (Microsoft.Web.Administration)&lt;/I&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;I would like to know what are some of the “must have” features you expect from this application. &lt;BR&gt;&lt;/B&gt;&lt;FONT color=#808080&gt;(Keep in mind this is not developed to replace or even be on par with desktop IIS7 manager)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Please add your suggestions/comments/ideas under the following blog post and &lt;STRONG&gt;check out more screenshots&lt;/STRONG&gt;. &lt;BR&gt;&lt;A href="http://www.awesomeideas.net/post/2008/03/04/IIS7-Mobile-Admin.aspx" mce_href="http://www.awesomeideas.net/post/2008/03/04/IIS7-Mobile-Admin.aspx"&gt;http://www.awesomeideas.net/post/2008/03/04/IIS7-Mobile-Admin.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Plan is to get this complete package (both binary &amp;amp; source) on &lt;A href="http://www.codeplex.com/" mce_href="http://www.codeplex.com"&gt;http://www.&lt;B&gt;codeplex&lt;/B&gt;.com&lt;/A&gt;&lt;B&gt; &lt;/B&gt;by next weekend! &lt;BR&gt;Picture is worth a “&lt;FONT color=#808080&gt;how many words do they say?&lt;/FONT&gt;” so a picture below showing how it looks when it runs inside Pocket IE in full-screen.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7MobileAdmin_F0B7/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7MobileAdmin_F0B7/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=599 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7MobileAdmin_F0B7/clip_image002_thumb.jpg" width=314 border=0 mce_src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7MobileAdmin_F0B7/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2241629" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/sukesh/archive/tags/Hostable+Web+Core/default.aspx">Hostable Web Core</category><category domain="http://blogs.iis.net/sukesh/archive/tags/Cool+Stuff/default.aspx">Cool Stuff</category><category domain="http://blogs.iis.net/sukesh/archive/tags/HWC/default.aspx">HWC</category></item><item><title>Differences in SSL request/response flow on IIS6 vs IIS7 (Kernel mode SSL)</title><link>http://blogs.iis.net/sukesh/archive/2007/11/26/differences-in-ssl-request-response-flow-on-iis6-vs-iis7-kernel-mode-ssl.aspx</link><pubDate>Mon, 26 Nov 2007 12:08:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2241613</guid><dc:creator>sukesh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=2241613</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2007/11/26/differences-in-ssl-request-response-flow-on-iis6-vs-iis7-kernel-mode-ssl.aspx#comments</comments><description>&lt;P&gt;There are so many things which has changed in IIS7 for the better and one of them is about the way SSL works. Although IIS6 allowed kernel mode SSL (starting with Windows 2003 SP1) that wasn't the default option. As far as I know (AFAIK) not many customers used it or knew about it. &lt;/P&gt;
&lt;P&gt;Starting with IIS7 kernel mode SSL is going to be the default setting and the only setting. This was primarily for performance reasons. So let us see how it differs.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;IIS6 SSL request/response flow&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=562 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" width=146&gt;1. Request &lt;BR&gt;2. HTTP.SYS &lt;BR&gt;3. HTTPFilter &lt;BR&gt;4. HTTP.SYS &lt;BR&gt;5. Worker process &lt;BR&gt;6. HTTP.SYS &lt;BR&gt;7. HTTPFilter &lt;BR&gt;8. HTTP.SYS &lt;BR&gt;9. Response&lt;/TD&gt;
&lt;TD class="" width=413&gt;(Encrypted Request from client)&lt;BR&gt;(Kernel Mode driver for HTTP accepts the request)&lt;BR&gt;(Sent to user mode service to decrypt)&lt;BR&gt;(Decrypted request comes back)&lt;BR&gt;(Sent decrypted request to W3Wp =&amp;gt; IIS)&lt;BR&gt;(Response comes back from IIS)&lt;BR&gt;(Sent again to user mode to encrypt response)&lt;BR&gt;(Encrypted response arrives from user mode)&lt;BR&gt;(Encrypted response sent back to client)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;IIS7 SSL request/response flow&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=606 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" width=148&gt;1. Request &lt;BR&gt;2. HTTP.SYS &lt;BR&gt;3. Worker process &lt;BR&gt;4. HTTP.SYS &lt;BR&gt;5. Response&lt;/TD&gt;
&lt;TD class="" width=456&gt;(Encrypted Request from client)&lt;BR&gt;(Kernel Mode driver for HTTP accepts and decrypts using SChannel)&lt;BR&gt;(Sent decrypted request to W3Wp =&amp;gt; IIS)&lt;BR&gt;(Response from IIS is encrypted using SChannel)&lt;BR&gt;(Encrypted Response sent back to client)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;You know that context switching between kernel mode and user mode is expensive and this new design of how SSL processing is done inside kernel mode increases performance on IIS7.&lt;/P&gt;
&lt;P&gt;IIS7 Rocks!!!&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2241613" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>Redirecting from http to https in IIS7 (http2https Updated)</title><link>http://blogs.iis.net/sukesh/archive/2007/09/05/redirecting-from-http-to-https-in-iis7-http2https-updated.aspx</link><pubDate>Wed, 05 Sep 2007 07:07:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2241599</guid><dc:creator>sukesh</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=2241599</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2007/09/05/redirecting-from-http-to-https-in-iis7-http2https-updated.aspx#comments</comments><description>&lt;P&gt;I had written a sample to redirect all http traffic to https (secure) in September 2006 &lt;A href="http://www.awesomeideas.net/post/2006/09/03/Redirecting-from-http-to-https-in-IIS7.aspx"&gt;http://www.awesomeideas.net/post/2006/09/03/Redirecting-from-http-to-https-in-IIS7.aspx&lt;/A&gt; 
&lt;P&gt;In one of our internal discussion alias the question came up that this method does not work when SSL is forced on the website. Step 5 below handles that scenario by checking the "403.4 SSL required" response and handling it during OnEndRequest event. 
&lt;P&gt;&lt;STRONG&gt;So let us get into action (I'm using C# for this sample)&lt;/STRONG&gt; 
&lt;OL&gt;
&lt;LI&gt;Download and Install &lt;A class="" href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1302" mce_href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1302"&gt;IIS7 Managed Module Starter Kit&lt;/A&gt;&lt;BR&gt;(Not really a requirement but it would make developing IIS7 modules easier) 
&lt;LI&gt;Rename the default class name created to "redir.cs" and rename project/solution/namespace to "http2https" 
&lt;LI&gt;Add the following code in "Init" method &lt;BR&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #008000"&gt;// register for the BeginRequest event&lt;/SPAN&gt;
application.BeginRequest += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; EventHandler(OnBeginRequest); 
application.EndRequest += &lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; EventHandler(OnEndRequest);&lt;/PRE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;LI&gt;Add the following method to implement "BeginRequest" event &lt;BR&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #008000"&gt;//BeginRequest implementation&lt;/SPAN&gt;
&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; OnBeginRequest(Object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
&lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; HttpUrl = app.Request.Url.ToString(); 

   &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; (HttpUrl.StartsWith(&lt;SPAN style="COLOR: #006080"&gt;"http:"&lt;/SPAN&gt;))                           &lt;SPAN style="COLOR: #008000"&gt;//Redirection done only if URL starts with http:&lt;/SPAN&gt;
   {
   HttpUrl = HttpUrl.Replace(&lt;SPAN style="COLOR: #006080"&gt;"http:"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #006080"&gt;"https:"&lt;/SPAN&gt;);
   app.Response.Redirect(HttpUrl.ToString(), &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;);           &lt;SPAN style="COLOR: #008000"&gt;//Redirecting (http 302) to the same URL but with https&lt;/SPAN&gt;
   app.Response.End();                                        &lt;SPAN style="COLOR: #008000"&gt;//We don't want to any further so end&lt;/SPAN&gt;
   }
} 
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;P&gt;Add the following method to implement "OnEndRequest" event&lt;BR&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #008000"&gt;//This is for scenario where SSL is forced on the site&lt;/SPAN&gt;
&lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; OnEndRequest(Object sender, EventArgs e)
{
  HttpApplication app = (HttpApplication)sender;
  &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; (app.Response.StatusCode == 403 &amp;amp;&amp;amp; app.Response.SubStatusCode == 4)
  { 
    &lt;SPAN style="COLOR: #0000ff"&gt;string&lt;/SPAN&gt; HttpUrl = app.Request.Url.ToString();

    &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; (HttpUrl.StartsWith(&lt;SPAN style="COLOR: #006080"&gt;"http:"&lt;/SPAN&gt;))
    {
        HttpUrl = HttpUrl.Replace(&lt;SPAN style="COLOR: #006080"&gt;"http:"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #006080"&gt;"https:"&lt;/SPAN&gt;);
        app.Response.Redirect(HttpUrl.ToString(), &lt;SPAN style="COLOR: #0000ff"&gt;true&lt;/SPAN&gt;);
        app.Response.End();
    }
}

&lt;/PRE&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;LI&gt;Make sure you have the following in your web.config inside configuration tag &lt;BR&gt;
&lt;DIV&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&amp;lt;system.webServer&amp;gt;
&amp;lt;modules&amp;gt;
   &amp;lt;add name=&lt;SPAN style="COLOR: #006080"&gt;"redir"&lt;/SPAN&gt; type=&lt;SPAN style="COLOR: #006080"&gt;"http2https.redir"&lt;/SPAN&gt; /&amp;gt;
&amp;lt;/modules&amp;gt;
&amp;lt;/system.webServer&amp;gt; 
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Your http to https redirection sample is ready and also works if you force SSL!!! 
&lt;P&gt;&lt;STRONG&gt;&lt;BR&gt;How to deploy the HttpModule&lt;BR&gt;&lt;/STRONG&gt;There are multiple ways you can deploy this component (I'm assuming that it's being deployed for "default website") 
&lt;P&gt;&lt;U&gt;Method 1&lt;BR&gt;&lt;/U&gt;Create a folder called "App_Code" inside "%systemdrive%\inetpub\wwwroot"&lt;BR&gt;Copy "redir.cs" file into "App_Code" folder&lt;BR&gt;Copy "web.config" file inside "%systemdrive%\inetpub\wwwroot" 
&lt;P&gt;&lt;U&gt;Method 2&lt;BR&gt;&lt;/U&gt;Create a folder called "bin" inside "%systemdrive%\inetpub\wwwroot"&lt;BR&gt;Compile&amp;nbsp;"redir.cs" into "redir.dll" and copy&amp;nbsp;it into "bin" folder (to compile -&amp;gt; csc.exe /out:redir.dll /target:library redir.cs)&lt;BR&gt;Copy "web.config" file inside "%systemdrive%\inetpub\wwwroot" 
&lt;P&gt;If you open IIS7 UI and go to Modules you can see your HttpModule listed there.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;Source code @ &lt;/STRONG&gt;&lt;A href="http://www.awesomeideas.net/page/IIS7-http2https.aspx"&gt;http://www.awesomeideas.net/page/IIS7-http2https.aspx&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2241599" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/sukesh/archive/tags/HTTP+_2600_amp_3B00_+IIS/default.aspx">HTTP &amp;amp; IIS</category></item><item><title>Redirecting from http to https in IIS7</title><link>http://blogs.iis.net/sukesh/archive/2006/09/03/http2https.aspx</link><pubDate>Sun, 03 Sep 2006 18:22:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1388307</guid><dc:creator>sukesh</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=1388307</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2006/09/03/http2https.aspx#comments</comments><description>&lt;p&gt;I was thinking to write an HttpModule for IIS7 and wanted a simple, useful and easily understandable scenario. Working with IIS customers for last 3 years one of those common scenario came into my mind, Redirecting http traffic to https. Although this is pretty straight forward requirement, till IIS6 it was difficult to achieve. Check the following KB 839357 (specifically for OWA scenario) which explains the cumbersome&amp;nbsp;steps .&lt;/p&gt;&lt;p&gt;(If you are looking for same functionality in prior versions of IIS, find it at the bottom of this post)&lt;/p&gt;&lt;p&gt;HttpModules are not something new if you are an ASP.NET developer. But there&amp;nbsp;are some differences. In IIS7 because of integrated pipeline, HttpModule applies to any request not just ASP.NET and that includes htm,jpg,asp,aspx,asmx,php,jsp...&lt;/p&gt;&lt;p&gt;&lt;strong&gt;So let us get into action (I&amp;#39;m using C# for this sample)&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Download and Install &lt;a href="http://www.iis.net/handlers/871/ItemPermaLink.ashx" target="_blank"&gt;&lt;font color="#669966"&gt;IIS7 Managed Module Starter Kit&lt;/font&gt;&lt;/a&gt;&lt;br /&gt;(Not really a requirement but it would make developing IIS7 modules easier) &lt;/li&gt;&lt;li&gt;Rename the default class name created to &amp;quot;redir.cs&amp;quot; and rename project/solution/namespace to &amp;quot;http2https&amp;quot; &lt;/li&gt;&lt;li&gt;Add the following code in &amp;quot;&lt;font color="#0000ff"&gt;Init&lt;/font&gt;&amp;quot; method &lt;br /&gt;&lt;p&gt;&lt;font color="#008080"&gt;&lt;font color="#008000"&gt;// register for the BeginRequest event&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;application.BeginRequest += new EventHandler(OnBeginRequest);&lt;/font&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;Add the following method to implement &amp;quot;BeginRequest&amp;quot; event &lt;br /&gt;&lt;p&gt;&lt;font color="#008000"&gt;//BeginRequest implementation&lt;/font&gt;&lt;br /&gt;&lt;font color="#0000ff"&gt;public void OnBeginRequest(Object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;HttpApplication app = (HttpApplication)sender;&lt;br /&gt;string HttpUrl = app.Request.Url.ToString(); &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;if (HttpUrl.StartsWith(&amp;quot;http:&amp;quot;))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;font color="#008000"&gt;//Redirection done only if URL starts with http:&lt;/font&gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; HttpUrl = HttpUrl.Replace(&amp;quot;http:&amp;quot;, &amp;quot;https:&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; app.Response.Redirect(HttpUrl.ToString(), true);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#008000"&gt;//Redirecting (http 302) to the same URL but with https&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;app.Response.End();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;font color="#008000"&gt;//We don&amp;#39;t want to any further so end&lt;/font&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;/font&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;Make sure you have the following in your web.config inside configuration tag&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;lt;system.webServer&amp;gt;&lt;br /&gt;&amp;lt;modules&amp;gt;&lt;br /&gt;&amp;lt;add name=&amp;quot;redir&amp;quot; type=&amp;quot;http2https.redir&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/modules&amp;gt;&lt;br /&gt;&amp;lt;/system.webServer&amp;gt;&lt;/font&gt; &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Your http to https redirection sample is ready!!!&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;How to deploy the HttpModule&lt;br /&gt;&lt;/strong&gt;There are multiple ways you can deploy this component (I&amp;#39;m assuming that it&amp;#39;s being deployed for &amp;quot;default website&amp;quot;)&lt;/p&gt;&lt;p&gt;&lt;u&gt;Method 1&lt;br /&gt;&lt;/u&gt;Create a folder called &amp;quot;&lt;font color="#0000ff"&gt;App_Code&lt;/font&gt;&amp;quot; inside &lt;font color="#0000ff"&gt;&amp;quot;%systemdrive%\inetpub\wwwroot&lt;/font&gt;&amp;quot;&lt;br /&gt;Copy &amp;quot;&lt;font color="#0000ff"&gt;redir.cs&lt;/font&gt;&amp;quot; file into &amp;quot;&lt;font color="#0000ff"&gt;App_Code&lt;/font&gt;&amp;quot; folder&lt;br /&gt;Copy &amp;quot;&lt;font color="#0000ff"&gt;web.config&lt;/font&gt;&amp;quot; file inside &lt;font color="#0000ff"&gt;&amp;quot;%systemdrive%\inetpub\wwwroot&lt;/font&gt;&amp;quot;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;Method 2&lt;br /&gt;&lt;/u&gt;Create a folder called &amp;quot;&lt;font color="#0000ff"&gt;bin&lt;/font&gt;&amp;quot; inside &lt;font color="#0000ff"&gt;&amp;quot;%systemdrive%\inetpub\wwwroot&lt;/font&gt;&amp;quot;&lt;br /&gt;Compile&amp;nbsp;&amp;quot;&lt;font color="#0000ff"&gt;redir.cs&lt;/font&gt;&amp;quot; into &amp;quot;&lt;font color="#0000ff"&gt;redir.dll&lt;/font&gt;&amp;quot; and copy&amp;nbsp;it into &amp;quot;&lt;font color="#0000ff"&gt;bin&lt;/font&gt;&amp;quot; folder (to compile -&amp;gt; csc.exe /out:redir.dll /target:library redir.cs)&lt;br /&gt;Copy &amp;quot;&lt;font color="#0000ff"&gt;web.config&lt;/font&gt;&amp;quot; file inside &lt;font color="#0000ff"&gt;&amp;quot;%systemdrive%\inetpub\wwwroot&lt;/font&gt;&amp;quot;&lt;/p&gt;&lt;p&gt;If you open IIS7 UI and go to Modules you can see your HttpModule listed there.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;u&gt;Redirection options for prior versions of IIS below (you need to search for these)&lt;/u&gt;&lt;/p&gt;&lt;p&gt;- ASP.NET URL mapping capability (HttpContext.RewritePath)&lt;br /&gt;- IIS v6.0 Resource Kit includes the UrlRemap tool&lt;br /&gt;- IISRewrite &lt;br /&gt;- ISAPI_Rewrite - includes a &amp;quot;lite&amp;quot; version available for free. &lt;br /&gt;- Mod_Rewrite 2&lt;br /&gt;- Ionic&amp;#39;s ISAPI Rewrite Filter&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1388307" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/sukesh/archive/tags/HTTP+_2600_amp_3B00_+IIS/default.aspx">HTTP &amp;amp; IIS</category></item><item><title>ABC's of Appcmd (command line administration in IIS7)</title><link>http://blogs.iis.net/sukesh/archive/2006/06/02/appcmd1.aspx</link><pubDate>Fri, 02 Jun 2006 20:42:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1304022</guid><dc:creator>sukesh</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=1304022</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2006/06/02/appcmd1.aspx#comments</comments><description>&lt;P&gt;&lt;FONT color=#0000ff&gt;So what is Appcmd.exe?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This is "one" command line tool to administer IIS7.&amp;nbsp; In IIS6 several of admin task were done using several scattered VBS script files. This made it difficult to find out what script needs to be run for eg. to get list of worker processes. &lt;/P&gt;
&lt;P&gt;So IIS7 is powered with Appcmd.exe which provides all the options you need to administer IIS7.&lt;/P&gt;
&lt;P&gt;Following are the options/categories available from a high level&lt;/P&gt;
&lt;TABLE cellSpacing=0 cellPadding=3&gt;

&lt;TR&gt;
&lt;TD&gt;SITE&lt;/TD&gt;
&lt;TD&gt;Administration of virtual sites&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;APP&lt;/TD&gt;
&lt;TD&gt;Administration of applications&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;VDIR&lt;/TD&gt;
&lt;TD&gt;Administration of virtual directories&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;APPPOOL&lt;/TD&gt;
&lt;TD&gt;Administration of application pools&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;CONFIG&lt;/TD&gt;
&lt;TD&gt;Administration of general configuration sections&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;WP&lt;/TD&gt;
&lt;TD&gt;Administration of worker processes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;REQUEST&lt;/TD&gt;
&lt;TD&gt;Administration of HTTP requests&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MODULE&lt;/TD&gt;
&lt;TD&gt;Administration of server modules&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;BACKUP&lt;/TD&gt;
&lt;TD&gt;Administration of server configuration backups&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;TRACE&lt;/TD&gt;
&lt;TD&gt;Working with failed request trace logs&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;STRONG&gt;Lets see how we can use it with an example&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;When I installed LH Server Beta (I rebuild my box quite frequently) I wanted to see how it's like to have 1000 websites running on IIS7. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;So I created 1000 websites on my box. &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Good scenario to use Appcmd.exe and also my MS-DOS experience. No I'm not gone nutts to create it using the UI :)&lt;/P&gt;
&lt;P&gt;Steps required&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Wanted separate folders for each website 
&lt;LI&gt;Wanted to use same IP address and port for all websites 
&lt;LI&gt;Type a command and leave the box to create all the websites&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Keep in mind I'm not talking about Server but my desktop machine. Yea its got 2GB RAM though.&lt;/P&gt;
&lt;P&gt;Steps below&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Created a folder - &lt;FONT color=#ff0000&gt;E:\Websites&lt;/FONT&gt; 
&lt;LI&gt;I wrote a batch file (createsite.cmd) with the following&lt;BR&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;MD&lt;/STRONG&gt; E:\Websites\Site%1&lt;BR&gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; add site /name:"Site%1" /id:%1 /bindings:http/:*:80:site%1 /physicalPath:"E:\Websites\Site%1"&lt;/FONT&gt; &lt;BR&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; start site "Site%1"&lt;/FONT&gt; 
&lt;LI&gt;Now the command to trigger the batch file where my MS-DOS experience came handy&lt;BR&gt;&lt;FONT color=#ff0000&gt;&lt;FONT color=#000000&gt;C:\&lt;/FONT&gt;&lt;STRONG&gt;FOR&lt;/STRONG&gt; /L %i IN (2,1,5) DO createsite.cmd %i&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;FOR command is a&amp;nbsp;batch file loop which simply works like 'for' loop in your favorite language&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;&lt;FONT color=#ff0000&gt;FOR /L %i IN (2,1,1000) DO createsite.cmd %i&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;is equivalent to the following in C&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000&gt;for ( i=2; i &amp;lt;= 1000; i++ )&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;createsite( i );&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;BR&gt;I started value of 'i' from 2 because "Default Website" has Site ID 1.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Hit enter and wait till the folders and websites are created for each iteration. &lt;/P&gt;
&lt;P&gt;Bingo !!! 1000 websites ready to be administered or tested.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;So the result would be &lt;BR&gt;&lt;/FONT&gt;E:\Websites folder would have folders called Site2, Site3 etc... and in IIS there would be sites with name Site2, Site3 etc...&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Lets revisit the appcmd command above once again&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; &lt;STRONG&gt;add&lt;/STRONG&gt; &lt;STRONG&gt;site&lt;/STRONG&gt; &lt;BR&gt;/name:"Site%1" &lt;FONT color=#008000&gt;// website name&lt;BR&gt;&lt;/FONT&gt;/id:%1&amp;nbsp;&lt;FONT color=#008000&gt;// Site ID&lt;/FONT&gt;&lt;BR&gt;/bindings:http/:*:80:site%1&amp;nbsp;&lt;FONT color=#006400&gt;&lt;FONT color=#008000&gt;// site would have "All Unassigned" including host header with the site name&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;/physicalPath:"E:\Websites\Site%1" &lt;/FONT&gt;&lt;FONT color=#008000&gt;// Pointing to the physical folder for that site&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; start site "Site%1"&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000&gt;// pretty straight forward, it starts the website&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;What else can I do to extend this scenario?&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create Application Pools separately for each website 
&lt;LI&gt;Create a simple ASP page and drop it in every folder created 
&lt;LI&gt;Use TinyGET utility (available with IIS6 Resource Kit) to simulate request&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Some other useful command options &lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Create Backup&lt;BR&gt;&lt;/FONT&gt;C:\&amp;gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; add backup "backup before screwup"&lt;BR&gt;BACKUP object "backup before screwup" added&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;List Backup&lt;/FONT&gt;&lt;BR&gt;C:\&amp;gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; list backup&lt;BR&gt;BACKUP "backup before screwup"&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Restore from Backup&lt;/FONT&gt;&lt;BR&gt;C:\&amp;gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; restore backup "backup before screwup"&lt;BR&gt;Restored configuration from backup "backup before screwup"&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Currently Executing Requests&lt;/FONT&gt;&lt;BR&gt;C:\&amp;gt;&lt;STRONG&gt;appcmd&lt;/STRONG&gt; list&amp;nbsp; request&lt;BR&gt;REQUEST "fa00000080000487" (&lt;A href="http://blogs.msdn.com/controlpanel/blogs/GET"&gt;url:GET&lt;/A&gt; /highcpu.asp, time:1903 msec, client:localhost)&lt;/P&gt;
&lt;P&gt;Will add more of this later...&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1304022" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>Evolution of HTTP on Windows Platform</title><link>http://blogs.iis.net/sukesh/archive/2006/06/02/httpevolution.aspx</link><pubDate>Fri, 02 Jun 2006 19:58:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1304038</guid><dc:creator>sukesh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=1304038</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2006/06/02/httpevolution.aspx#comments</comments><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Before the boom of web and internet, HTTP was not so common is everyday life. When internet became more and more widely used, HTTP also grew in usage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Basic web server serves static HTML type contents and then was the era in which there came several ways to extend the web server and its features. Because of the popularity of the web, on internet most of the companies connected to the web have port 80 (which is the default HTTP port) open on firewalls. Which simply means that to use HTTP most of the companies didn’t have restrictions and thereby became the default and uninterrupted way of global communication?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;HTTP on Windows platform was initially used only by IIS for serving web sites. Gradually because of the simplicity and availability (of open port 80) of HTTP several other applications started using HTTP as a medium of transport. Then came the wave of all HTTP based protocols and having another protocol tunnel through HTTP. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;RPC over HTTP (I would call it as “RPC through HTTP” rather) for Exchange and SQL to name a few. SQL started supporting HTTP so that you can expose a database over the web using HTTP and SQL queries can be executed using query string and the results returned as XML. Once, more and more application platforms started using HTTP, it became important that we have a uniform &amp;amp; consistent way on Windows platform to use HTTP protocol. So the kernel mode driver called HTTP.SYS was born. Since it’s a kernel mode driver, it gives us a lot of advantages (mainly on 64bit machines with a huge amount of memory for kernel mode caching and getting higher performance) and creates a layer which gives a consistent way of utilizing HTTP protocol. HTTP.SYS also provides API’s if we need to use HTTP protocol directly and bypass IIS. This route would obviously lack other features provided by IIS like health monitoring, easy management etc… but can be utilized for specific needs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Next big leap – IIS7&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Before we look at some of those upcoming features in IIS7, let us see what we lack till the current version of IIS i.e. IIS6.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Delegation of administration (very important for website hosting and also for hosting department websites with its own admin)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Extensibility (A thorough understanding of IIS is required in order to write high performance ISAPI Filters or Extensions)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;You can add features but not replace features&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Managing IIS was not possible when it comes to higher number of websites simply because the MMC style of interface is not efficient.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Even if you use ASP.NET (handlers or modules) it works at a lower level than ISAPI Filters/Extensions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Debugging or tracing (A fair amount of tracing features were introduced in IIS6 and more with SP1 but still we resort to post-mortem dumps for 60% of our cases)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;XCopy deployment of websites.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now “few” of the highlights from IIS7 features list&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Delegation of administration to granular level (like attribute level) and users can be either from Active Directory / SAM (workgroup) or custom database&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;You have managed and unmanaged API's to access IIS or for admin purposes (e.g. showing&amp;nbsp;a list of pages currently running and how much CPU each of them are taking). This is possible in IIS6 with SP1 (Windows 2003 SP1) but with extra tools, but in IIS7 it’s available inside the MMC itself.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;You can search or book mark a website when you have too many sites, for easy administration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Now with the new Integrated Pipeline, you can write managed or unmanaged ISAPI&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;A lot of tracing functionalities are included e.g. Failed Request Tracing etc... Even specifics like “only requests failed with authentication” etc...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Since website related details (like default page etc...) are stored inside web.config (not necessarily ASP.NET application) you can deploy sites using XCopy and it simply works.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;You can enable admin service with a different secure port which can be used for administering IIS remotely (http). This is not an admin website like before but a separate service.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;You can replace existing IIS components by replacing the dll name in the application.config file. Example custom logging, custom authentication. This simply means that everything is pluggable and only required features are installed or loaded into the process. For example you don't want "Basic Authentication" you don't even install it.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This would reduce attack surface and enables better performance also.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;·&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;My favorite feature, you can enable forms authentication with a single page (uses .NET 2.0) for htm / asp / asp.net / php / cgi / images or any application web site.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;You can see some managed code snippets of IIS7 Admin API’s from the following link&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;A title=http://blogs.msdn.com/carlosag/archive/2006/04/17/MicrosoftWebAdministration.aspx href="http://blogs.msdn.com/carlosag/archive/2006/04/17/MicrosoftWebAdministration.aspx"&gt;http://blogs.msdn.com/carlosag/archive/2006/04/17/MicrosoftWebAdministration.aspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Make sure you see the piece of code&amp;nbsp;titled “&lt;B&gt;Getting list of executing requests&lt;/B&gt;” which is my favorite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1304038" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS7/default.aspx">IIS7</category></item></channel></rss>