<?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</title><link>http://blogs.iis.net/sukesh/default.aspx</link><description>Technology has no limits and software makes it true...</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug 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>1</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>IIS7 Hostable Web Core Custom Service (WebCoreService)</title><link>http://blogs.iis.net/sukesh/archive/2007/12/24/iis7-hosted-web-core-custom-service-webcoreservice.aspx</link><pubDate>Mon, 24 Dec 2007 06:28:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2241621</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=2241621</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2007/12/24/iis7-hosted-web-core-custom-service-webcoreservice.aspx#comments</comments><description>&lt;P&gt;Hostable Web Core (known as HWC) is a new concept in IIS7 to host a website/webservice inside your own process. In short a smaller hosted version of IIS (an IIS7 express edition?). &lt;BR&gt;This is accomplished by making a LoadLibrary call to load hwebcore.dll (%systemdrive%\Windows\System32\inetsrv\hwebcore.dll)&lt;/P&gt;
&lt;P&gt;From IIS7 onwards you can administer IIS7 remotely using IIS Manager (through HTTPS). When you connect remotely you are actually connecting to a "Web Management Service" called WMSVC. This service uses HWC so that it's not dependent on IIS7 services directly. &lt;/P&gt;
&lt;P&gt;I had some idea around building alternative UI for IIS7, but since WMSVC service calls are not publicly documented I didn't want to start using it since my application might break anytime. So HWC was a surprise to me but with a glitch. I'm too used to managed code that I haven't written C++ code from last 6years. During 1996-2000 C/C++ was my favorite language and then got into languages which are less fussy (VB/VB.net &amp;amp; C#).&lt;/P&gt;
&lt;P&gt;But I had multiple challenges 1) Writing something in a language which I've not used for last 6 years. 2) Writing a windows service which I haven't done before.&lt;/P&gt;
&lt;P&gt;Before diving into the code let's see limitations of HWC (Calling it limitation is wrong so let's say it's by design)&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Only one application pool &lt;/LI&gt;
&lt;LI&gt;Only one website/webservice &lt;/LI&gt;
&lt;LI&gt;Separate configuration file &lt;/LI&gt;
&lt;LI&gt;No monitoring like available for IIS7 application pools &lt;/LI&gt;
&lt;LI&gt;Require IIS7 to be installed &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;PS: Project files are in VS2008 but the application doesn't have any dependency with newer versions.&lt;/P&gt;
&lt;P&gt;Ingredients of my &lt;STRONG&gt;WebCoreService&lt;/STRONG&gt;.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Native Windows Service which host HWC which provides install/uninstall options &lt;/LI&gt;
&lt;LI&gt;Good IIS7 configuration file (applicationHost.config) which contains all configuration required to run ASP/ASPX/ASMX... pages &lt;/LI&gt;
&lt;LI&gt;TODO: Web/WCF service hosted inside this service which publishes all the management API's for consumption &lt;/LI&gt;
&lt;LI&gt;TODO: Alternate client for managing IIS7 &lt;/LI&gt;&lt;/OL&gt;
&lt;OL&gt;
&lt;LI&gt;Native Windows Service which host HWC. Below is a screenshot to see the options available using command-line &lt;BR&gt;&amp;nbsp;&lt;A href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7HostedWebCoreandRemoteAdministration_A4DB/help_2.png" mce_href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7HostedWebCoreandRemoteAdministration_A4DB/help_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=208 alt=help src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7HostedWebCoreandRemoteAdministration_A4DB/help_thumb.png" width=552 border=0 mce_src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/IIS7HostedWebCoreandRemoteAdministration_A4DB/help_thumb.png"&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;All the configuration including where the website points to and what port it's hosting the site etc are mentioned in the configuration file called "WebCoreService.config". This is nothing but the actual applicationHost.config file after few of those things removed from it. &lt;/LI&gt;
&lt;LI&gt;This could be a good managed Webservice or WCF service which would expose management API's. &lt;/LI&gt;
&lt;LI&gt;How about a Mobile Client? which supports SMS (Texting). Just imagine sending a text message to recycle one of the application pool ? &lt;BR&gt;Hosting management site running inside this? &lt;BR&gt;These are only few of those possibilities though :) think crazy stuff and let me know. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;How to RUN the service?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Extract the zip files with source and the binary files. &lt;BR&gt;Follow these steps to setup the service (&lt;FONT color=#ff0000&gt;make sure you are doing&amp;nbsp;this from an elevated command prompt&lt;/FONT&gt;)&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a folder called "TestPath" inside your "C:\inetpub\" folder &lt;/LI&gt;
&lt;LI&gt;Create 2 folder inside called "wwwroot" and "Logs" &lt;/LI&gt;
&lt;LI&gt;Drop "time.asp" and "time.aspx" pages inside the "wwwroot" folder &lt;/LI&gt;
&lt;LI&gt;Enable event logs notification from the service&lt;BR&gt;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\WebCoreService]&lt;BR&gt;Create a string key "EventMessageFile" and set value as full path to "sample.dll" under the bin folder&lt;BR&gt;Create a DWORD key "TypesSupported" and give value of "00000007"&lt;/LI&gt;
&lt;LI&gt;Goto the folder where the EXE file resides "WebCoreService.EXE" &lt;/LI&gt;
&lt;LI&gt;Install the service using the following command &lt;BR&gt;&lt;STRONG&gt;WebCoreService install&lt;/STRONG&gt; &lt;/LI&gt;
&lt;LI&gt;Start the service using the following command &lt;BR&gt;&lt;STRONG&gt;net start WebCoreService&lt;/STRONG&gt; &lt;/LI&gt;
&lt;LI&gt;Browse to the page &lt;A href="http://localhost:8080/time.asp" mce_href="http://localhost:8080/time.asp"&gt;http://localhost:8080/time.asp&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT color=#008000 size=3&gt;Bingo! Hostable webcore service is ready.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;All the configuration mentioned above like folder path, port number etc can be modified inside the configuration file "WebCoreService.exe.config"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Do let me know if you have any questions or suggestions or even ideas !!!&lt;BR&gt;&lt;EM&gt;Source &amp;amp; binary =&amp;gt; &lt;A href="http://code.msdn.com/hwc/"&gt;http://code.msdn.com/hwc/&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2241621" width="1" height="1"&gt;</description></item><item><title>Kernel mode authentication in IIS7</title><link>http://blogs.iis.net/sukesh/archive/2007/11/27/kernel-mode-authentication-in-iis7.aspx</link><pubDate>Tue, 27 Nov 2007 08:42:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2241617</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=2241617</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2007/11/27/kernel-mode-authentication-in-iis7.aspx#comments</comments><description>&lt;P&gt;Here is another featured moved to kernel mode. Yea it's Windows Authentication which is by default configured to run in kernel mode.&lt;/P&gt;
&lt;P&gt;To see the dialog right click on "Windows Authentication" and select "Advanced Settings..."&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/KernelmodeauthenticationinIIS7_F031/KernelAuth_2.png" mce_href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/KernelmodeauthenticationinIIS7_F031/KernelAuth_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=392 alt=KernelAuth src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/KernelmodeauthenticationinIIS7_F031/KernelAuth_thumb.png" width=563 border=0 mce_src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/KernelmodeauthenticationinIIS7_F031/KernelAuth_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This applies to Windows 2008 build and not Vista RTM.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2241617" width="1" height="1"&gt;</description></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>1</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>How to Check certificate expiry for webserver (IIS) certificates using script</title><link>http://blogs.iis.net/sukesh/archive/2007/09/12/how-to-check-certificate-expiry-for-webserver-iis-certificates-using-script.aspx</link><pubDate>Thu, 13 Sep 2007 02:40:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2241605</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=2241605</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2007/09/12/how-to-check-certificate-expiry-for-webserver-iis-certificates-using-script.aspx#comments</comments><description>&lt;P&gt;Although the title says webserver certificates the script is not limited to webserver certificates only.&lt;/P&gt;
&lt;P&gt;This script is useful for admins to check expiry dates of server certificates and be prepared to renew or change them. In case if you have ideas of using this in your server environment and you need help in tweaking this script do let me know.&lt;/P&gt;
&lt;P&gt;Please copy &amp;amp; paste script below into a file called "CertExpiryCheck.vbs" and run the script from command line like&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;C:\&amp;gt; cscript certexpirycheck.vbs [SubjectName]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;C:\&amp;gt; cscript certexpirycheck.vbs sukak&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/HowtoCheckcertificateexpiryforwebserverc_98F4/CertExpirycheck.jpg" mce_href="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/HowtoCheckcertificateexpiryforwebserverc_98F4/CertExpirycheck.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=65 alt=CertExpirycheck src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/HowtoCheckcertificateexpiryforwebserverc_98F4/CertExpirycheck_thumb.jpg" width=480 border=0 mce_src="http://blogs.msdn.com/blogfiles/sukeshak/WindowsLiveWriter/HowtoCheckcertificateexpiryforwebserverc_98F4/CertExpirycheck_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;* here "sukak" is subject name which usually would be your domain name (FQDN)&lt;BR&gt;* Issued by also shows "sukak" in my case since the test was done using self issued certificate created using selfSSL.exe&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&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;'**************************************************&lt;/SPAN&gt;
&lt;SPAN style="COLOR: #008000"&gt;'* CertExpiryCheck.vbs&lt;/SPAN&gt;
&lt;SPAN style="COLOR: #008000"&gt;'* Enumerate certificates with day left for expiry &lt;/SPAN&gt;
&lt;SPAN style="COLOR: #008000"&gt;'**************************************************&lt;/SPAN&gt;

&lt;SPAN style="COLOR: #0000ff"&gt;Option&lt;/SPAN&gt; Explicit
&lt;SPAN style="COLOR: #0000ff"&gt;Dim&lt;/SPAN&gt; SubjectName
&lt;SPAN style="COLOR: #0000ff"&gt;If&lt;/SPAN&gt; WScript.Arguments.Count &amp;gt; 0 &lt;SPAN style="COLOR: #0000ff"&gt;Then&lt;/SPAN&gt;
    SubjectName = LCase(WScript.Arguments(0))
&lt;SPAN style="COLOR: #0000ff"&gt;Else&lt;/SPAN&gt;
    CommandUsage
&lt;SPAN style="COLOR: #0000ff"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;If&lt;/SPAN&gt;

&lt;SPAN style="COLOR: #0000ff"&gt;Dim&lt;/SPAN&gt; Store, Certificates, Certificate
&lt;SPAN style="COLOR: #0000ff"&gt;Const&lt;/SPAN&gt; CAPICOM_LOCAL_MACHINE_STORE = 1
&lt;SPAN style="COLOR: #0000ff"&gt;Const&lt;/SPAN&gt; CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1        
&lt;SPAN style="COLOR: #0000ff"&gt;Const&lt;/SPAN&gt; CAPICOM_STORE_OPEN_READ_ONLY = 0

&lt;SPAN style="COLOR: #0000ff"&gt;Set&lt;/SPAN&gt; Store = CreateObject(&lt;SPAN style="COLOR: #006080"&gt;"CAPICOM.Store"&lt;/SPAN&gt;)
Store.Open CAPICOM_LOCAL_MACHINE_STORE, &lt;SPAN style="COLOR: #006080"&gt;"MY"&lt;/SPAN&gt; ,CAPICOM_STORE_OPEN_READ_ONLY
&lt;SPAN style="COLOR: #0000ff"&gt;Set&lt;/SPAN&gt; Certificates = Store.Certificates.Find(CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME, SubjectName, 0)

&lt;SPAN style="COLOR: #0000ff"&gt;If&lt;/SPAN&gt; Certificates.Count &amp;gt;0 &lt;SPAN style="COLOR: #0000ff"&gt;Then&lt;/SPAN&gt;
   &lt;SPAN style="COLOR: #0000ff"&gt;For&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;Each&lt;/SPAN&gt; Certificate &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; Certificates
    &lt;SPAN style="COLOR: #008000"&gt;'Certificate.display()    'If you want to see the Cert in UI&lt;/SPAN&gt;
    WScript.Echo &lt;SPAN style="COLOR: #006080"&gt;"*** Subject "&lt;/SPAN&gt; &amp;amp; Certificate.SubjectName &amp;amp; &lt;SPAN style="COLOR: #006080"&gt;" ***"&lt;/SPAN&gt;
    WScript.Echo &lt;SPAN style="COLOR: #006080"&gt;"Issued by "&lt;/SPAN&gt; &amp;amp; Certificate.IssuerName 
    WScript.Echo &lt;SPAN style="COLOR: #006080"&gt;"Valid from "&lt;/SPAN&gt; &amp;amp; Certificate.ValidFromDate &amp;amp; &lt;SPAN style="COLOR: #006080"&gt;" to "&lt;/SPAN&gt; &amp;amp; Certificate.ValidToDate 
    WScript.Echo &lt;SPAN style="COLOR: #006080"&gt;"Days to expiry "&lt;/SPAN&gt; &amp;amp; DateDiff(&lt;SPAN style="COLOR: #006080"&gt;"d"&lt;/SPAN&gt;,now(),Certificate.ValidToDate)
    WScript.Echo 
   &lt;SPAN style="COLOR: #0000ff"&gt;Next&lt;/SPAN&gt;
 &lt;SPAN style="COLOR: #0000ff"&gt;Else&lt;/SPAN&gt;
  WScript.Echo &lt;SPAN style="COLOR: #006080"&gt;"No certificates with SubjectName =&amp;gt; '"&lt;/SPAN&gt; &amp;amp; SubjectName &amp;amp; &lt;SPAN style="COLOR: #006080"&gt;"'"&lt;/SPAN&gt;
&lt;SPAN style="COLOR: #0000ff"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;If&lt;/SPAN&gt;

&lt;SPAN style="COLOR: #0000ff"&gt;Set&lt;/SPAN&gt; Certificates = &lt;SPAN style="COLOR: #0000ff"&gt;Nothing&lt;/SPAN&gt;
&lt;SPAN style="COLOR: #0000ff"&gt;Set&lt;/SPAN&gt; Store = &lt;SPAN style="COLOR: #0000ff"&gt;Nothing&lt;/SPAN&gt;

&lt;SPAN style="COLOR: #0000ff"&gt;Sub&lt;/SPAN&gt; CommandUsage
  MsgBox &lt;SPAN style="COLOR: #006080"&gt;"Usage: CertExpiryCheck.vbs  [SubjectName] "&lt;/SPAN&gt;, vbInformation,&lt;SPAN style="COLOR: #006080"&gt;"CertExpiryCheck"&lt;/SPAN&gt;
  WScript.Quit(1)
&lt;SPAN style="COLOR: #0000ff"&gt;End&lt;/SPAN&gt; Sub&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just keep in mind you need capicom.dll to use this script. This comes default on Windows 2003 (I guess) but might need to be downloaded and registered on other platforms like Vista. Use &lt;STRONG&gt;regsvr32 capicom.dll &lt;/STRONG&gt;to register it first before using the script.&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2241605" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/Certificate/default.aspx">Certificate</category><category domain="http://blogs.iis.net/sukesh/archive/tags/IIS/default.aspx">IIS</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>DebugDiag : Introduction</title><link>http://blogs.iis.net/sukesh/archive/2006/06/02/ddintro.aspx</link><pubDate>Fri, 02 Jun 2006 21:10:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1304049</guid><dc:creator>sukesh</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/sukesh/rsscomments.aspx?PostID=1304049</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2006/06/02/ddintro.aspx#comments</comments><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;When I was a developer (I mean employed as a developer, even now I develop applications, don’t get me wrong&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;) before joining Microsoft, I used to get stuck with application issues; whether its process crashing, process not responding or high memory usage. There were not many options for me at that time but to review code for that page or form and figure out the cause myself. &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;If there was a tool which&amp;nbsp;I can use to tear the process and see what is going on inside the process I would've saved a lot of my hours (or maybe days). Although Windows Debugging Tools (WinDBG) was available, it was not too easy to learn the commands or understand how all those stuff works when you have development timelines/deadlines (or is it death lines?) to be met.&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;Not many developers are aware of what kind debugging I’m gonna talk about. When ever we talk about debugging people assume that it’s live debugging using Visual Studio or so and put breakpoint and walking through the code. Huh! This would be a blessing if we can do the same thing in case of production servers, but on production server applications it’s a completely different ball game.&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;Think of a situation where customer has an issue on production box with IIS process&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;(Here IIS process is used just for illustration but below explained issues are true with any other multi-threaded process/service)&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;My Options (being little bit sarcastic)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Send windows source code to customer and we will install Visual Studio to walk through the code and find what the issue is” You know I would loose my job. &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;This kind of debugging works mostly for client applications&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;What happens if I don’t really know when the issue happens? &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I can employ a person who will sit in front of the server 24x7 watching for the issue to happen &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;What if the issue happens only for sometime and the issue vanishes?&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;By the time my monitoring person yawns, the issue would vanish &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;What happens if the issue only happens when a specific user sends a post request with some specific string in there which leads the IIS process to get stuck and block all requests?&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Start writing “Debug.Print” or “Response.Write” kind of tracing to find out where it gets stuck. &lt;/SPAN&gt;&lt;SPAN&gt;You might not finish your project anywhere in near future &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Customer called on my mobile and is screaming because my website is not responding.&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I need to run to the server (maybe even drive, since the server is in a remote place) to take a memory dumps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;All the above options are provided to understand how tools like DebugDiag help us to automate and make our life far better.&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;DebugDiag or Debug Diagnostic Tool is not the 1&lt;SUP&gt;st&lt;/SUP&gt; tool but as far as I know would be the 5&lt;SUP&gt;th&lt;/SUP&gt; generation of tool for doing post-mortem memory dump analysis. Most of those previous tools were were exclusively used by PSS and were not available on Microsoft Downloads.&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;Post mortem debugging simply means that we take a snapshot of the process memory when the issue happens and use either DebugDiag or WinDBG to figure out what was going on inside the process when the issue happened and find out the cause for the issue. Since this is technically challenging, it takes a lot of time. Some of our customers think that it's like looking into iislogs to find the request. Let me tell you that its mostly digging deep into thread stack, heap and other memory areas to find out what might’ve lead to the issue.&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;What is Debug Diagnostic Tool?&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;DebugDiag is a post mortem debugging tool which has analysis capabilities, so in simple words there is 3 parts for this tool.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Capture memory dumps for different types of issues (Hang/Crash/Memory)&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Run basic analysis on the captured dumps and generates a report to understand the results. It also provides very good pointers to issues mostly for expert eyes.&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Exposes an object model which can be used to easily access the information available inside the memory dump file (memory dump file extensions are usually DMP / PDMP / MDMP)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;What are the main components?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Debug Diagnostic Service (dbgsvc.exe)&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;DebugDiag UI (debugdiag.exe)&lt;/SPAN&gt; &lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;DebugDiag Host (dbghost.exe)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;U&gt;&lt;SPAN&gt;Debug Diagnostic Service&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;This is the service which is the heart of DebugDiag. Why should it be a service? In the past we used AD+ (Auto Dump+) for troubleshooting most of those debug scenarios. AD+ is executed from the command line and client side program. This simply means that it runs under the context of the logged-in interactive user. &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;Let’s take an example. Assume that we are trying to track an issue which happens intermittently, say for example process crash and it happens once in a week or month. &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;So we setup AD+ (KB&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;286350) from command prompt. Since this tool runs from command line if you logout from the console AD+ stops monitoring. So if your organization has multiple administrators who look after the server they need to be informed not to logout from the console till we track and get a good set of dumps for the issue. This becomes extremely difficult specially because we find out that someone did a logout only after the next issue occurrence and by then its too late. Then we start monitoring again and sleep till we get another repro. Keep in mind, in some cases a repro might take seconds, minutes, hours, days, weeks or even months.&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;Another issue with AD+ like tools is that you cannot use it through Terminal Service sessions which most of those administrators are too used to &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&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;AD+ provides a lot of customization options and its powerful in that way, and it was “the” tool we used in the past (and I see people using it even now).&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;To get around the above mentioned issues DebugDiag runs as a service as “Local System” so that it’s not dependent on the logged on interactive user session. &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;So how do we configure this service since windows services cannot have UI?&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;U&gt;&lt;SPAN&gt;DebugDiag UI&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;DebugDiag user interface is used to create rules for capturing different types of issues by creating rules and also the interface to run the analysis portion of the tool.&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;DebugDiag like I mentioned before (did I mention?), has a scripting host built-in using which we can customize and extend the features according to the requirements. The main script file called “DbgSVC.vbs” (we call it as controller script) is present in scripts folder inside installation folder. This script gets modified when you make changes in the UI related to Hang or Memory Leak rules.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This script file contains (or exposes) some events which you can use to extend and customize the working of DebugDiag.&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;Open the Controller Script (“DbgSVC.vbs”) in notepad and see for yourself.&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;Rules are nothing but simple way of configuring DebugDiag to work according to your requirements for specific scenarios. Rules contains information about the location where you want the memory dumps files to be stored etc and also contains &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Events you can further use. For example if you create Crash Rule, DebugDiag creates a script file called “CrashRule_IIS.vbs” in the scripts folder.&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;Open the Crash Rule Script (“CrashRule_IIS.vbs”) in notepad and see for yourself.&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 with DebugDiag you loose the functionality like we had in AD+ to run it from command line. Do we? Not really! Continue reading…&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;U&gt;&lt;SPAN&gt;DebugDiag Host&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So how do I know what’s available under the hood?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Go to Command prompt and type &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;C:\&amp;gt;dbghost /? (Obviously you should try from the installation folder&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&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;I can analyze the dumps myself? Oh really?&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;DebugDiag provides analysis feature which you can use from the DebugDiag UI tab called “Advanced Analysis”. By default, right now we have scripts available for analyzing “Crash/Hang Analyzers” and “Memory Pressure Analysis”.&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;Analysis Scripts are nothing but .ASP pages inside “Scripts” folder which uses somewhat ASP kind of scripting style and uses VBScript to iterate through the structures inside the dumps (which is nicely exposed using an object model) and try to find out known issues or easily identifiable issues so that for simple issues troubleshooting can be done by yourself without calling MS PSS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;More to come which includes Script customization, specific steps to be taken for scenarios like Hang/Crash/Memory related issues etc...&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;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1304049" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/DebugDiag/default.aspx">DebugDiag</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>1</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><item><title>Back to Basics - HTTP/IIS (Part II)</title><link>http://blogs.iis.net/sukesh/archive/2006/05/16/httpbasics2.aspx</link><pubDate>Tue, 16 May 2006 21:17:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1304058</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=1304058</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2006/05/16/httpbasics2.aspx#comments</comments><description>&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Let us see how HTTP is extended to do more than serving static content.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;When we talk about Windows Platform &amp;amp; HTTP, Microsoft product which comes to the picture is IIS. In the early days (and early versions of IIS) HTTP was primarily used for hosting websites and to enable people to use browsers to request those websites.&lt;span&gt;&amp;nbsp; &lt;/span&gt;So in essence IIS (or for that matter any web server) is built to serve &amp;ldquo;static&amp;rdquo; HTML pages with resources like images (referring to IIS2). But later versions of IIS provided ways to extend the web server in order to provide dynamically serving websites. In IIS world we call it as ISAPI Extensions. Hmmm... So what is ISAPI Filters then?&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Let&amp;rsquo;s try to understand more about ISAPI Filters, ISAPI Extensions &amp;amp; Wildcard ISAPI Extensions to get more clarity.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;ISAPI Filters&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;From the name itself you know that it&amp;rsquo;s something to do with filtering. Yea you got it right! So IIS exposes a set of notifications (IIS term for events) so that we can develop an ISAPI Filter (dll with a difference) to register for these notifications. When IIS triggers these notifications your ISAPI Filter DLL gets a chance to handle the data available for that specific notification. &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Confused? Huh! Let me try with a hypothetical example then, &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Assume that you have an ASP application and you don&amp;rsquo;t want your web users to know that it&amp;rsquo;s really ASP. So what can you do? Let them request .ASPX pages and we will change the extension to .ASP before IIS gets it for further processing. Good Idea?&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Change all your links in the site to point to .ASPX extension. And when web users request &amp;ldquo;default.aspx&amp;rdquo; the ISAPI Filter would change the file requested to &amp;ldquo;default.asp&amp;rdquo; without the user&amp;rsquo;s knowledge and show off that you are running an ASP.NET application but under the hood it&amp;rsquo;s a legacy ASP application. &lt;/span&gt;&lt;span style="font-size:10pt;font-family:Wingdings;"&gt;&lt;span&gt;J&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;How does this work or how is this implemented? &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Like I mentioned before you need to use one of those ISAPI Filter notification called SF_NOTIFY_PREPROC (search on MSDN for more information). So what does that give us? When a request enters IIS and when IIS reads in the HTTP request header our ISAPI Filter gets a chance to access HTTP request header and if required we can modify it. So in our scenario, we would see that URL field in the header contains &amp;ldquo;default.aspx&amp;rdquo;. Yes you guessed it, we would change that URL to &amp;ldquo;default.asp&amp;rdquo; and let IIS know that it needs further processing. Cool deal hah!&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Important piece of code from the ISAPI source provided below to show how easy it is&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;table cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse:collapse;border:medium none;"&gt;&lt;tr&gt;&lt;td style="padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;width:6.15in;padding-top:0in;background-color:transparent;border:windowtext 1pt solid;"&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Char buffer[256];&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;DWORD buffSize = sizeof(buffer);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;BOOL bHeader = pHeaderInfo-&amp;gt;GetHeader(pCtxt-&amp;gt;m_pFC,&amp;quot;url&amp;quot;,buffer,&amp;amp;buffSize); &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;CString urlString(buffer);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;urlString.MakeLower(); &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;if (urlString.Find(&amp;quot;&lt;strong&gt;.aspx&lt;/strong&gt;&amp;rdquo;) != -1) //we want to change this file&amp;rsquo;s extension&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;urlString.Replace(&amp;quot;&lt;strong&gt;.aspx&lt;/strong&gt;&amp;quot;,&amp;quot;&lt;strong&gt;.asp&lt;/strong&gt;&amp;quot;);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;char *newUrlString= urlString.GetBuffer(urlString.GetLength());&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;pHeaderInfo-&amp;gt;SetHeader(pCtxt-&amp;gt;m_pFC, &amp;quot;url&amp;quot;, newUrlString);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;//we&amp;rsquo;re done, now give it to IIS for further processing&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;return SF_STATUS_REQ_HANDLED_NOTIFICATION; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;ISAPI Extensions&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;So like I mentioned before a web server serves static pages, the dynamic features like ASP, ASP.NET, PHP etc happens because of ISAPI extensions. So the obvious is that ISAPI Extensions are a way to extend the Web Server to add more features to it.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;So once the requests surpass the ISAPI Filter and if the request is not for static page, IIS searches for an ISAPI extension which is mapped to the request file extension. If found the request is forwarded to that ISAPI Extension for further processing and returning a valid response back to the client.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;Wildcard ISAPI Extensions (IIS6 specific)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Here we will talk about why we need this piece and what are we trying to achieve here. Yes you guessed it, Wildcard extensions comes in between ISAPI Filters &amp;amp; ISAPI Extensions, so that it can have the features of both ISAPI Filters &amp;amp; Extensions.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;table cellpadding="0" cellspacing="0" class="MsoTableGrid" style="width:6.15in;border-collapse:collapse;border:medium none;"&gt;&lt;tr&gt;&lt;td style="padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;width:51.4pt;padding-top:0in;background-color:transparent;border:windowtext 1pt solid;"&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Request&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:windowtext 1pt solid;padding-right:5.4pt;border-top:windowtext 1pt solid;padding-left:5.4pt;padding-bottom:0in;border-left:#ece9d8;width:332pt;padding-top:0in;border-bottom:windowtext 1pt solid;background-color:transparent;"&gt;&lt;p align="center" class="MsoNormal" style="margin:0in 0in 0pt;text-align:center;"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;IIS&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt; [ ISAPI Filter -&amp;gt; Wildcard Extension -&amp;gt; ISAPI Extension]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:windowtext 1pt solid;padding-right:5.4pt;border-top:windowtext 1pt solid;padding-left:5.4pt;padding-bottom:0in;border-left:#ece9d8;width:59.4pt;padding-top:0in;border-bottom:windowtext 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Response&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Before getting into details lets see the Pros &amp;amp; Cons of ISAPI Filters &amp;amp; ISAPI Extensions.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Filters&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;Pros of ISAPI Filters&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Every request can be intercepted regardless of the file extension&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Filter notification allows us to enhance or replace some of the IIS features&lt;/span&gt; &lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list 1.0in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Custom Redirection or request filtering&amp;nbsp;- &lt;/span&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SF_NOTIFY_PREPROC_HEADERS&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list 1.0in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Custom Authentication &amp;ndash; SF_NOTIFY_AUTHENTICATION&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;tab-stops:list 1.0in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Modify IIS log values &amp;ndash; SF_NOTIFY_LOG&lt;br /&gt;etc&amp;hellip; (notification list documented on MSDN)&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;Cons of ISAPI Filters&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;No Asynchronous support&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Uses IIS thread pool and cannot implement its own thread pool, so whatever processing of request is being done inside the filter should be completed quickly, otherwise chances are that IIS runs out of worker threads and users starts seeing errors like &amp;ldquo;Server too busy&amp;rdquo; or IIS gets into a hung state without responding to requests.&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;No access to entity body (huh! its another term for HTTP request body)&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Extensions&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;Pros of ISAPI Extensions&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Gets the entire entity body (HTTP request body)&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Can implement custom thread pool&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Processing the request can be asynchronous&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;Cons of ISAPI Extensions&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Can handle only requests to specific extensions (because its mapped to specific file extension.&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Processing happens only after getting the complete request entity body.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Wildcard ISAPI Extensions&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:Verdana;"&gt;Pros of ISAPI Wildcard Extensions (hybrid of Filter &amp;amp; Extension)&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Every request can be intercepted regardless of the file extension&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Filters: Yes&lt;br /&gt;ISAPI Extensions: No&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Implement custom thread pool&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Filters: No&lt;br /&gt;ISAPI Extensions: Yes&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Asynchronous Processing&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Filters: No&lt;br /&gt;ISAPI Extensions: Yes&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Handle entire request processing and return response to the client or hand over to an ISAPI Extension (according to the extension) for further processing.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Filters: Yes&lt;br /&gt;ISAPI Extensions: Yes&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-top:0in;"&gt;&lt;li class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;tab-stops:list .5in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;Can get access to complete request entity body&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;ISAPI Filters: No&lt;br /&gt;ISAPI Extensions: Yes&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;So from the above list you can see that Wildcard ISAPI Extension provides a way to get best of both worlds (ISAPI Filter &amp;amp; ISAPI Extension).&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;text-align:justify;"&gt;&lt;span style="font-size:10pt;font-family:Verdana;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1304058" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/HTTP+_2600_amp_3B00_+IIS/default.aspx">HTTP &amp;amp; IIS</category></item><item><title>Back to Basics - HTTP (Part I)</title><link>http://blogs.iis.net/sukesh/archive/2006/05/06/httpbasics.aspx</link><pubDate>Sat, 06 May 2006 21:15:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1304056</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=1304056</wfw:commentRss><comments>http://blogs.iis.net/sukesh/archive/2006/05/06/httpbasics.aspx#comments</comments><description>&lt;P class=MsoNormal align=center&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;Most of my interactions in the past with customers, web developers and some of my prior colleagues, I have found that a larger percentage of them don't have a good understanding of how HTTP protocol works. This could be due to various reasons; some of them could be like&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;UL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Coming from windows application development background.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Not getting enough time to go through the details due to project deadlines. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Too difficult to get the meat out of HTTP RFC document because it’s too much to read.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&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;This results in lot of confusions and also leads to low performance application development. So I thought I would help the readers of putting those confusions to rest and explain all these in simple and effective way. So, in essence this article is no rocket science, but HTTP basics which most of those HTTP/IIS experts left out thinking that it would not be necessary to be explained (Or maybe its there but I missed noticing it).&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;Is HTTP a popular protocol, Oh really?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The popularity of HTTP protocol is simply because it's a simple protocol when you try to understand it from grass root level. Because of the simplicity (huh, I think due to recent developments people have made it a little complex) HTTP is used extensively not just for serving HTML pages but in order to empower several applications to make it work on the web.&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;How does a simple HTTP response look like?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class=MsoTableGrid cellSpacing=0 cellPadding=0&gt;

&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;#include &amp;lt;iostream.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;#include &amp;lt;windows.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;int main (int argc, char** argv,char **envp)&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;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cout &amp;lt;&amp;lt; "Content-Type: text/html\r\n\r\n"; &lt;FONT color=#006400&gt;//Header&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cout &amp;lt;&amp;lt; "&amp;lt;h2&amp;gt;Hello World!&amp;lt;/h2&amp;gt;" &amp;lt;&amp;lt;endl;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#006400&gt;//Body&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&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;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;return 1;&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;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&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;How does HTTP works with authenticated request?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Browser send GET request to IIS (remember 1&lt;SUP&gt;st&lt;/SUP&gt; request is always anonymous)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;IIS returns 401 and provides WWW-Authenticate Header with the supported authentication methods&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;According to authentication method Browser pop-up the dialog to enter credentials and then submits to IIS&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Credentials gets validated and if valid, your GET request is served with HTTP Status 200 (200 = success)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&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;Why do we need sessions in HTTP?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Since HTTP is a connection-less protocol we need to provide a way to continue request-response process without having to create a ‘fresh’ newer connection for every request.&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;img src="http://blogs.iis.net/aggbug.aspx?PostID=1304056" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/sukesh/archive/tags/HTTP+_2600_amp_3B00_+IIS/default.aspx">HTTP &amp;amp; IIS</category></item></channel></rss>