<?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>Just Another IIS Blog : IIS7</title><link>http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx</link><description>Tags: IIS7</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Now available for download: Release Candidate of IIS PowerShell Snap-in</title><link>http://blogs.iis.net/thomad/archive/2009/01/16/now-available-for-download-release-candidate-of-iis-powershell-snap-in.aspx</link><pubDate>Fri, 16 Jan 2009 18:28:41 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2871898</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/thomad/rsscomments.aspx?PostID=2871898</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/thomad/commentapi.aspx?PostID=2871898</wfw:comment><comments>http://blogs.iis.net/thomad/archive/2009/01/16/now-available-for-download-release-candidate-of-iis-powershell-snap-in.aspx#comments</comments><description>&lt;p&gt;We just made the &lt;a href="http://www.iis.net/extensions/PowerShell" target="_blank"&gt;Release Candidate of the IIS PowerShell Snap-in&lt;/a&gt; available. A lot of work was done between Tech Preview 2 and now. We focused mainly on augmenting the PowerShell Provider with almost 70 task-oriented cmdlets useful for day-to-day administrative tasks. Here is a quick categorization of the task-oriented cmdlets: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Mangement of Sites/Apps/Vdirs/AppPools (create/start/stop/remove/convert/recycle)&lt;/li&gt;    &lt;li&gt;Management of site bindings (add/change/remove)&lt;/li&gt;    &lt;li&gt;Management of Handlers and Modules/Managed Modules (add/change/remove)&lt;/li&gt;    &lt;li&gt;Enablement of Request Tracing&lt;/li&gt;    &lt;li&gt;Backup and Restore of IIS configuration&lt;/li&gt;    &lt;li&gt;Locking/unlocking of sections/elements/attributes&lt;/li&gt;    &lt;li&gt;Getting file system path for config files and web application content&lt;/li&gt;    &lt;li&gt;Access to run-time data, e.g.&lt;/li&gt;    &lt;li&gt;---Exploring currently executing requests&lt;/li&gt;    &lt;li&gt;---AppDomain Management&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.iis.net/blogs/thomad/iisps_24FDB4A6.jpg"&gt;&lt;img title="iisps" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="452" alt="iisps" src="http://blogs.iis.net/blogs/thomad/iisps_thumb_14A23CED.jpg" width="812" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I added a new &lt;a href="http://learn.iis.net/page.aspx/492/powershell-snap-in-using-the-task-based-cmdlets-of-the-iis-powershell-snap-in/" target="_blank"&gt;walkthrough&lt;/a&gt; that uses some of the new task-oriented cmdlets. But there is an easier way to get started if you don’t want to read through the walkthrough. Just list the available cmdlets with &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="3"&gt;get-command -pssnapin WebAdministration&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This will display all the cmdlets available in the IIS7 PowerShell Snap-in. To find help on how to use a particular cmdlet you just have to type&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="3"&gt;get-help &amp;lt;cmdletname&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;For example:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="3"&gt;get-help New-WebSite&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;or &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="3"&gt;get-help &amp;lt;cmdletname&amp;gt; –example&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;if you are only interested in an example how to use the cmdlet. &lt;/p&gt;  &lt;p&gt;Have fun!&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2871898" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS+6/default.aspx">IIS 6</category><category domain="http://blogs.iis.net/thomad/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.iis.net/thomad/archive/tags/Microsoft+IIS/default.aspx">Microsoft IIS</category><category domain="http://blogs.iis.net/thomad/archive/tags/command+line/default.aspx">command line</category><category domain="http://blogs.iis.net/thomad/archive/tags/Windows+Server/default.aspx">Windows Server</category><category domain="http://blogs.iis.net/thomad/archive/tags/how+to/default.aspx">how to</category><category domain="http://blogs.iis.net/thomad/archive/tags/WMI/default.aspx">WMI</category><category domain="http://blogs.iis.net/thomad/archive/tags/MVP/default.aspx">MVP</category><category domain="http://blogs.iis.net/thomad/archive/tags/server/default.aspx">server</category><category domain="http://blogs.iis.net/thomad/archive/tags/Application+Pools/default.aspx">Application Pools</category><category domain="http://blogs.iis.net/thomad/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.iis.net/thomad/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.iis.net/thomad/archive/tags/snap-in/default.aspx">snap-in</category><category domain="http://blogs.iis.net/thomad/archive/tags/application/default.aspx">application</category><category domain="http://blogs.iis.net/thomad/archive/tags/Windows+PowerShell/default.aspx">Windows PowerShell</category><category domain="http://blogs.iis.net/thomad/archive/tags/download/default.aspx">download</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS/default.aspx">IIS</category></item><item><title>The IIS Process Model Features</title><link>http://blogs.iis.net/thomad/archive/2008/05/07/the-iis-process-model-features.aspx</link><pubDate>Thu, 08 May 2008 06:08:48 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2344705</guid><dc:creator>thomad</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/thomad/rsscomments.aspx?PostID=2344705</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/thomad/commentapi.aspx?PostID=2344705</wfw:comment><comments>http://blogs.iis.net/thomad/archive/2008/05/07/the-iis-process-model-features.aspx#comments</comments><description>&lt;p&gt;A process model is needed to run more than one web-site, web application or web-service securely and reliably on a single machine. In Shared Hosting scenarios hundreds or even thousands of web-sites run on an individual machine. The code running on these web-sites is usually not well tested, if at all. Without a powerful process model the result would be extremely poor reliability. But a process model not only guarantees availability; it also needs to isolate them so that individual web applications don't interfere with each other. &lt;/p&gt;  &lt;p&gt;The Windows Process Activation Service (WAS) is the system component providing the Process Model in IIS 7.0. This article discusses the WAS features and functions. &lt;/p&gt;  &lt;h2&gt;1. Application Pools&lt;/h2&gt;  &lt;p&gt;Processes are the containers that provide isolation and security boundaries in the Windows Operating System. Consequently web applications or web-sites have to run in separate processes in order to achieve isolation between them. In the IIS terminology the management unit for these separate IIS processes is called 'Application Pool'. &lt;/p&gt;  &lt;p&gt;An Application Pool can be configured to run a group of URLs, i.e. web-sites, web applications or web-services. When a client requests one of these Application Pool URLs an IIS worker process (w3wp.exe) is spawned by WAS to execute the code necessary to send a response. WAS's main task is to manage Application Pools - WAS spawns worker processes, monitors their health, recycles them if necessary and makes sure none of them consume more resources than specified in the corresponding AppPool configuration. WAS is also the arbiter and collector for run-time and state data, e.g. performance counters, site and Application Pool state. &lt;/p&gt;  &lt;h2&gt;2. Architectural Diagram &lt;/h2&gt;  &lt;p&gt;The diagram below shows the core pieces of the IIS7 architecture.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Configuration is stored in the applicationhost.config file (left).&amp;#160; &lt;/li&gt;    &lt;li&gt;HTTP.SYS is a kernel-mode component that listens to the network, accepts connections, assigns requests into Application Pool queues and queues these requests if no IIS worker process is running. HTTP.SYS also caches responses and does SSL in IIS 7.0 &lt;/li&gt;    &lt;li&gt;The worker process on the right hosts all custom code (e.g. ASP and ASP.Net pages, modules, ISAPI filter and extensions etc.). There can be hundreds of these worker processes depending on how the IIS Administrator decides to isolate his web-sites and applications. IIS worker processes pick up waiting requests from the corresponding HTTP.SYS request queue. &lt;/li&gt;    &lt;li&gt;The Windows Activation Service is a system service that runs in SVCHOST.EXE. WAS reads configuration from applicationhost.config, reacts to configuration changes, manages worker processes, controls their live time and health, recycles them if necessary and prevents resource exhaustion. W3SVC is another service living in the same SVCHOST.EXE as WAS. W3SVC hosts the HTTP specific part of the IIS process model; W3SVC configures HTTP.SYS with the URLs to listen on and is called by HTTP.SYS if requests arrive and worker processes are needed. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.iis.net/blogs/thomad/WindowsLiveWriter/TheIISProcessModelFeatures_1402B/procmod_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="379" alt="procmod" src="http://blogs.iis.net/blogs/thomad/WindowsLiveWriter/TheIISProcessModelFeatures_1402B/procmod_thumb.jpg" width="509" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;3. Process Model Features&lt;/h2&gt;  &lt;p&gt;Web-Sites and applications get the following benefits by running in the WAS provided infrastructure:&lt;/p&gt;  &lt;h3&gt;Efficient Resource Management&lt;/h3&gt;  &lt;h4&gt;On-Demand Activation&lt;/h4&gt;  &lt;p&gt;Resources like RAM and CPU are scarce in multi-tenant scenarios. WAS will start an IIS worker process only once requests for a particular web site or web application arrive. &lt;/p&gt;  &lt;h4&gt;Idle-timeout&lt;/h4&gt;  &lt;p&gt;Because resources are usually scarce WAS can shutdown web applications based on a configurable idle-timeout. &lt;/p&gt;  &lt;h4&gt;Health Monitoring&lt;/h4&gt;  &lt;p&gt;To ensure their health WAS monitors the worker processes it spawned. Health messages are periodically sent to each running worker process. If the worker process doesn't respond in a configurable time interval the worker process will be recycled or killed. This way undetected deadlocks in worker processes get automatically fixed by restarting the worker process. &lt;/p&gt;  &lt;h4&gt;Startup Limit&lt;/h4&gt;  &lt;p&gt;Part of the Rapid-Fail Protection feature is the Startup limit. If a worker process doesn't report back to WAS within the configurable startup-limit it will be killed and the Rapid-Fail-Protection counter is incremented. Application Pools are stopped, i.e. restarting the worker process will not be tried anymore, if the Rapid-Fail-Protection counter reaches a configurable limit within a configurable time limit. This prevents scenarios where worker processes hang or crash during startup. &lt;/p&gt;  &lt;h4&gt;Shutdown Limit&lt;/h4&gt;  &lt;p&gt;A worker process also has to shutdown in a configurable limit. If the shutdown doesn't happen in this time the worker process gets killed by WAS. This prevents resource overuse due to processes hanging in their shut-down phase. Additional shutdown settings allow an executable to be started (e.g. a debugger) when the shutdown doesn't complete within the allotted time. &lt;/p&gt;  &lt;h4&gt;CPU affinity&lt;/h4&gt;  &lt;p&gt;Configuration settings allow WAS to start worker processes that are affinitized to one or more CPUs. This prevents tenants from interfering with each other if they share the same physical machine. &lt;/p&gt;  &lt;h4&gt;User Profile&lt;/h4&gt;  &lt;p&gt;WAS can start worker processes with or without loading the user profile. &lt;/p&gt;  &lt;h3&gt;Security &lt;/h3&gt;  &lt;h4&gt;Customizable User Account&lt;/h4&gt;  &lt;p&gt;IIS worker processes can run as a preconfigured process identity or built-in accounts (LocalService, LocalSystem, NetworkService). Built-in accounts are advantages because they don't require password management. If a custom user identity is used the password is automatically encrypted. Configuration settings can be replicated to multiple machines by sharing the configuration encryption keys across machines. &lt;/p&gt;  &lt;h3&gt;Job Object Features&lt;/h3&gt;  &lt;p&gt;Job objects allow administrators to restrict worker processes to a particular CPU limit. A configurable action is taken if this CPU limit is exceeded. Job objects will also make sure that processes spawned by the worker process get terminated. &lt;/p&gt;  &lt;h3&gt;Configuration Isolation and Security&lt;/h3&gt;  &lt;p&gt;Before WAS starts an Application Pool and its worker process it generates a unique configuration file for this Application Pool. WAS also creates a unique SID for each Application Pool (similar to Service SIDs introduced in Windows Server 2008). The Application Pool configuration file is then secured with this unique SID. This ensures that Application Pool configuration files can only be read by Administrators and the Application Pool itself. &lt;/p&gt;  &lt;h3&gt;Diagnostics and Monitoring&lt;/h3&gt;  &lt;h4&gt;Event Logging&lt;/h4&gt;  &lt;p&gt;Events regarding invalid configuration, recycling, startup or shutdown of worker processes are reported to the System Eventlog. &lt;/p&gt;  &lt;h4&gt;Currently Executing Requests&lt;/h4&gt;  &lt;p&gt;WAS exposes a run-time and state control interface that allows scripts and tools to query for the currently executing requests of a particular worker process. This is useful to find requests that hang or requests that take a very long time to complete. &lt;/p&gt;  &lt;h4&gt;Performance Counters&lt;/h4&gt;  &lt;p&gt;All IIS performance counters get funneled through WAS. WAS gathers these performance counters because IIS counters are site-based and web applications can live in different Application Pools. &lt;/p&gt;  &lt;h3&gt;Recycling&lt;/h3&gt;  &lt;p&gt;Recycling allows the refresh of worker processes without losing a single request due to down-time. This is done via a feature called &amp;quot;overlapping recycling&amp;quot;. &lt;/p&gt;  &lt;h4&gt;Overlapping Recycling&lt;/h4&gt;  &lt;p&gt;WAS does this by spawning up a new worker process parallel to the old one that is still handling requests. Once the new worker process is up it starts picking up requests from the request queue while the old worker process is instructed by WAS to stop picking up requests. Once the old worker process finishes all executing requests it shuts down. This feature is called &amp;quot;overlapping recycling&amp;quot;. It ensures that no requests are lost during a recycle. &lt;/p&gt;  &lt;h4&gt;Recycling Configuration&lt;/h4&gt;  &lt;p&gt;Recycling parameters are configurable in the IIS configuration system. &lt;/p&gt;  &lt;h4&gt;Scheduled Recycling &lt;/h4&gt;  &lt;p&gt;Customers might want to recycle their applications based on a regular schedule. Via configuration settings recycling can be scheduled periodically, e.g. every 4 hours, every day at 1am etc. &lt;/p&gt;  &lt;h4&gt;Recycling Based on Memory Consumption&lt;/h4&gt;  &lt;p&gt;Applications might leak memory over time. WAS can monitor the memory consumption of each worker processes to ensure that no worker process uses more than its preconfigured limit. Reaching a configured virtual or private memory threshold will trigger the recycling of a worker process. &lt;/p&gt;  &lt;h4&gt;Recycling Based on Number of Requests&lt;/h4&gt;  &lt;p&gt;Recycling can also be configured based on the number of requests a particular worker process handled. &lt;/p&gt;  &lt;h4&gt;Custom Recycling&lt;/h4&gt;  &lt;p&gt;Custom code can custom health statistics and trigger a recycling via an API call to the WAS run-time and state API's. &lt;/p&gt;  &lt;h4&gt;Process Orphaning&lt;/h4&gt;  &lt;p&gt;Some errors only happen in a production environment. Killing worker processes ensures up-time but troubleshooting of these errors becomes difficult, e.g. if the failing worker process needs to be debugged. The process orphaning feature in WAS allows worker processes to be recycled without killing the failed worker process. Now a debugger can be attached to it. Additional process orphaning settings allow the execution of a process (e.g. a debugger) if orphaning happens. &lt;/p&gt;  &lt;h3&gt;Application Pool State Management&lt;/h3&gt;  &lt;p&gt;Application Pools can be stopped, recycled or started via publicly available API's, e.g. if an application has to be taken offline or if recycling has to be done based on parameters different from what's configurable in the applicationhost.config file. &lt;/p&gt;  &lt;h3&gt;Additional WAS Features&lt;/h3&gt;  &lt;h4&gt;Load-Balancer Features&lt;/h4&gt;  &lt;p&gt;HTTP.SYS still listens on the network and will return a 500 HTTP error message if requests are not picked up by an Application Pool. This is a problem because for a Level 5 Load Balancers (TCP/IP) a 500 HTTP error looks like a valid TCP/IP connection. A WAS configuration setting can enable HTTP.SYS to reject connections instead of sending HTTP responses. &lt;/p&gt;  &lt;p&gt;WAS can be configured to start worker processes with the following settings: &lt;/p&gt;  &lt;h4&gt;WoW64 Support&lt;/h4&gt;  &lt;p&gt;WAS can start 32-Bit or 64-Bit worker processes. &lt;/p&gt;  &lt;h4&gt;.NET Framework Preload&lt;/h4&gt;  &lt;p&gt;WAS can be configured to preload a particular version of the .NET Framework. This can make the troubleshooting of version conflicts much easier. &lt;/p&gt;  &lt;h4&gt;Web Gardens&lt;/h4&gt;  &lt;p&gt;A Web Garden is the term for an Application Pool that runs with multiple worker processes. Requests get distributed among these worker process instances using a round-robin mechanism. &lt;/p&gt;  &lt;h3&gt;WAS Multi Protocol Support&lt;/h3&gt;  &lt;p&gt;WAS not only host the HTTP stack. It can also host other protocols via its Listen Adapter and Worker Process Framework. WCF services take advantage of the WAS Multi-Protocol support. WCF protocols come with their own Listeners (e.g. the NET.TCP, NET.MSMQ or NET.PIPE Listener). These Listeners connect to WAS using the Listener Adapter Interfaces WAS provides. &lt;/p&gt;  &lt;p&gt;Application protocols that take advantage of this infrastructure can host custom application code in the same .NET Application Domain as regular ASP.NET applications. They can also take advantage of the protocol-independent services the ASP.NET Hosting Environment provides, for example on-demand compilation, configuration support etc. &lt;/p&gt;  &lt;h2&gt;4. Summary&lt;/h2&gt;  &lt;p&gt;IIS7 and WAS offer a powerful process model for web-sites, web applications and web-services. It not only ensures availability but also ensures isolation and offers great troubleshooting and monitoring support. &lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2344705" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS+News+Item/default.aspx">IIS News Item</category><category domain="http://blogs.iis.net/thomad/archive/tags/Hosting/default.aspx">Hosting</category><category domain="http://blogs.iis.net/thomad/archive/tags/Process+Model/default.aspx">Process Model</category><category domain="http://blogs.iis.net/thomad/archive/tags/W3SVC/default.aspx">W3SVC</category><category domain="http://blogs.iis.net/thomad/archive/tags/WAS/default.aspx">WAS</category><category domain="http://blogs.iis.net/thomad/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>IISRESET light</title><link>http://blogs.iis.net/thomad/archive/2008/05/06/iisreset-light.aspx</link><pubDate>Tue, 06 May 2008 22:41:46 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2341569</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;font size="1"&gt;Note: This blog entry used to be on my old blog. I'm about to shut it down so I thought I replicate some of the content here.     &lt;br /&gt;&lt;/font&gt;Many IIS customers use IISRESET to get IIS back into a vanilla state. IISRESET is a pretty heavy hammer however and not needed most of the time - why would you restart FTP, WAS and W3SVC and all worker processes just because one of your web applications is locking a DLL or some content. Recycling the Application Pool causing the problem is usually enough. If you don't know which Application Pool is making the trouble you can recycle all of them. Here is how you do it with APPCMD: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Recycling the Default Application Pool: &lt;/strong&gt;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;%windir%\system32\inetsrv\appcmd recycle AppPool DefaultAppPool &lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;strong&gt;You can use the APPCMD piping feature to recycle all Application Pools: &lt;/strong&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;%windir%\system32\inetsrv\appcmd list apppools /xml | appcmd recycle apppools /&lt;span class="kwrd"&gt;in&lt;/span&gt; &lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Save this command as &amp;quot;%windir%\system32\IISPOOLRESET.BAT&amp;quot; and use it instead of using IISRESET.EXE. It probably takes some time to overcome the muscle memory of typing IISRESET&amp;lt;enter&amp;gt;. &lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2341569" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/appcmd/default.aspx">appcmd</category></item><item><title>IIS7 PowerShell Provider Podcast</title><link>http://blogs.iis.net/thomad/archive/2008/04/29/iis7-powershell-provider-podcast.aspx</link><pubDate>Tue, 29 Apr 2008 22:43:53 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2328688</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Saw a post on forums.iis.net last week about a Podcast on our new IIS7 PowerShell Provider. Being the Program Manager for this thing I thought maybe these guys want me to participate in the Podcast. And sure enough - Jonathan and Hal were interested. And here it is the podcast link and the interview topics: &lt;/p&gt;  &lt;p&gt;&lt;a title="http://powerscripting.wordpress.com/2008/04/26/powerscripting-podcast-episode-23-iis7-special/" href="http://powerscripting.wordpress.com/2008/04/26/powerscripting-podcast-episode-23-iis7-special/"&gt;http://powerscripting.wordpress.com/2008/04/26/powerscripting-podcast-episode-23-iis7-special/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;u&gt;Interview Topics&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size="2"&gt;Who are you&amp;#160; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;What&amp;#8217;s your background at MS and elsewhere &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Talk about the IIS7 management cmdlets &lt;/font&gt;      &lt;ul&gt;       &lt;li&gt;&lt;font size="2"&gt;Get/Set-WebConfiguration &lt;/font&gt;&lt;/li&gt;        &lt;li&gt;&lt;font size="2"&gt;Start-WebItem &lt;/font&gt;&lt;/li&gt;        &lt;li&gt;&lt;font size="2"&gt;Remove-WebConfigurationProperty &lt;/font&gt;&lt;/li&gt;        &lt;li&gt;&lt;font size="2"&gt;Ability to use XPath filters &lt;/font&gt;&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;Talk about the IIS7 PSprovider &lt;/font&gt;      &lt;ul&gt;       &lt;li&gt;&lt;font size="2"&gt;Provider timeline - 2nd beta in June, final in October &lt;/font&gt;&lt;/li&gt;        &lt;li&gt;&lt;font size="2"&gt;Features &lt;/font&gt;          &lt;ul&gt;           &lt;li&gt;&lt;font size="2"&gt;ability to configure IIS and ASP.net, sites, vdirs, apps, all that &lt;/font&gt;&lt;/li&gt;            &lt;li&gt;&lt;font size="2"&gt;ability to delegate &lt;/font&gt;&lt;/li&gt;            &lt;li&gt;&lt;font size="2"&gt;root of namespace: sites, app pools &lt;/font&gt;&lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;What does the future hold (that you can discuss) &lt;/font&gt;      &lt;ul&gt;       &lt;li&gt;&lt;font size="2"&gt;We talk about Server Core &lt;/font&gt;&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2328688" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS+News+Item/default.aspx">IIS News Item</category><category domain="http://blogs.iis.net/thomad/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Cheesy Web Server Performance Test With PowerShell</title><link>http://blogs.iis.net/thomad/archive/2008/04/22/cheesy-web-server-performance-test-with-powershell.aspx</link><pubDate>Tue, 22 Apr 2008 07:35:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2312685</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;p mce_keep="true"&gt;Instead of writing WCAT scripts I wrote my own little perf test client. The following .PS1 script works pretty well to do some very basic performance testing. Just enter the URL and the duration in seconds, e.g. &lt;span style="font-size: 9pt; font-family: &amp;#39;Courier New&amp;#39;; mso-no-proof: yes"&gt;&amp;quot;.\webperf.ps1 http://localhost/ 15&amp;quot;.&lt;/span&gt;&lt;/p&gt;  &lt;p mce_keep="true"&gt;The script instantiates the Net.WebClient class and calls the DownloadString member to make a HTTP request. The response is redirected to $null. The script checks on every request if the duration is expired. It reports every 100 successful responses.&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;div class="csharpcode"&gt;     &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;param&lt;/span&gt; &lt;/pre&gt;

    &lt;pre&gt;( &lt;/pre&gt;

    &lt;pre class="alt"&gt;    [string]$url, &lt;/pre&gt;

    &lt;pre&gt;    [int]$duration &lt;/pre&gt;

    &lt;pre class="alt"&gt;) &lt;/pre&gt;

    &lt;pre&gt; &lt;/pre&gt;

    &lt;pre class="alt"&gt;&lt;span class="str"&gt;&amp;quot;URL: $url&amp;quot;&lt;/span&gt;; &lt;/pre&gt;

    &lt;pre&gt;&lt;span class="str"&gt;&amp;quot;Duration: $duration seconds`n&amp;quot;&lt;/span&gt;; &lt;/pre&gt;

    &lt;pre class="alt"&gt; &lt;/pre&gt;

    &lt;pre&gt;$starttime = get-date; &lt;/pre&gt;

    &lt;pre class="alt"&gt;$i=0; &lt;/pre&gt;

    &lt;pre&gt;$webClient = new-object Net.WebClient; &lt;/pre&gt;

    &lt;pre class="alt"&gt; &lt;/pre&gt;

    &lt;pre&gt;&lt;span class="kwrd"&gt;while&lt;/span&gt; (1) &lt;/pre&gt;

    &lt;pre class="alt"&gt;{ &lt;/pre&gt;

    &lt;pre&gt;    $webClient.DownloadString($url)&amp;gt;$null; &lt;/pre&gt;

    &lt;pre class="alt"&gt;      $i++; &lt;/pre&gt;

    &lt;pre&gt;      $timespan = new-timespan $starttime; &lt;/pre&gt;

    &lt;pre class="alt"&gt;      &lt;span class="kwrd"&gt;if&lt;/span&gt; ($timespan.TotalSeconds &lt;span class="preproc"&gt;-ge&lt;/span&gt; $duration) &lt;/pre&gt;

    &lt;pre&gt;      { &lt;/pre&gt;

    &lt;pre class="alt"&gt;           &lt;span class="str"&gt;&amp;quot;`n`n$i requests for url $url served in $duration seconds.&amp;quot;&lt;/span&gt; &lt;/pre&gt;

    &lt;pre&gt;           &lt;span class="kwrd"&gt;break&lt;/span&gt;; &lt;/pre&gt;

    &lt;pre class="alt"&gt;      } &lt;/pre&gt;

    &lt;pre&gt;      &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;/pre&gt;

    &lt;pre class="alt"&gt;      { &lt;/pre&gt;

    &lt;pre&gt;           &lt;span class="kwrd"&gt;if&lt;/span&gt; ($i%100 &lt;span class="preproc"&gt;-eq&lt;/span&gt; 0) &lt;/pre&gt;

    &lt;pre class="alt"&gt;           { &lt;/pre&gt;

    &lt;pre&gt;                $dursec = [int]$timespan.TotalSeconds;    &lt;/pre&gt;

    &lt;pre class="alt"&gt;                write-host -noNewLine &lt;span class="str"&gt;&amp;quot;`r$i requests served ($dursec seconds)&amp;quot;&lt;/span&gt;; &lt;/pre&gt;

    &lt;pre&gt;           } &lt;/pre&gt;

    &lt;pre class="alt"&gt;      } &lt;/pre&gt;

    &lt;pre&gt;}&lt;/pre&gt;

    &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;
  &lt;/div&gt;
  &lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/div&gt;

&lt;p&gt;&lt;span style="font-size: 9pt; font-family: &amp;#39;Courier New&amp;#39;; mso-no-proof: yes"&gt;&lt;font face="Arial" size="2"&gt;Requesting the IIS default page I am able to get around 48000 requests per minute (800 per second) on my Lenovo T61p on Vista Ultimate SP1. How many can you do?&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size: 9pt; font-family: &amp;#39;Courier New&amp;#39;; mso-no-proof: yes"&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2312685" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>IIS 7.0 PowerShell Provider Tech Preview 1</title><link>http://blogs.iis.net/thomad/archive/2008/04/14/iis-7-0-powershell-provider-tech-preview-1.aspx</link><pubDate>Mon, 14 Apr 2008 20:10:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2297363</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P mce_keep="true"&gt;Finally,&amp;nbsp;IIS 7.0 has a PowerShell Provider!&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;The IIS7 PowerShell Provider allows you to &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create Web-Sites, Web Applications, Virtual Directories and Application Pools 
&lt;LI&gt;Change Simple Configuration Properties on Web-Sites, Application Pools, Web Applications and Virtual Directories 
&lt;LI&gt;Add and Change Complex Configuration Settings 
&lt;LI&gt;Query&amp;nbsp;Run-time Data (Web-Site State, Application Pool State, Currently Executing Requests) 
&lt;LI&gt;Execute Advanced Configuration Tasks, Scripting, Integration with other PowerShell Snap-Ins and features 
&lt;LI&gt;Search and Discover Configuration Settings &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Here is a screen shot of how to create a new IIS app:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="PowerShell Provider Screenshot" style="WIDTH: 601px; HEIGHT: 541px" height=685 alt="PowerShell Provider Screenshot" src="http://blogs.iis.net/blogs/thomad/ps.jpg" width=1210 mce_src="http://blogs.iis.net/blogs/thomad/ps.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DOWNLOAD:&lt;BR&gt;&lt;/STRONG&gt;Tech Preview 1 of the IIS 7.0 PowerShell Provider can be found here: &lt;BR&gt;x86: &lt;A href="http://www.iis.net/downloads/1664/ItemPermaLink.ashx" mce_href="http://www.iis.net/downloads/1664/ItemPermaLink.ashx"&gt;http://www.iis.net/downloads/1664/ItemPermaLink.ashx&lt;/A&gt;&lt;BR&gt;x64: &lt;A href="http://www.iis.net/downloads/1665/ItemPermaLink.ashx" mce_href="http://www.iis.net/downloads/1665/ItemPermaLink.ashx"&gt;http://www.iis.net/downloads/1665/ItemPermaLink.ashx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;FORUMS: &lt;BR&gt;&lt;/STRONG&gt;Go to our PowerShell forum if you need support or if you are looking for&amp;nbsp;'Tips and Tricks'&lt;BR&gt;&lt;A href="http://forums.iis.net/1151.aspx" mce_href="http://forums.iis.net/1151.aspx"&gt;http://forums.iis.net/1151.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;WALKTHROUGHS:&lt;BR&gt;&lt;/STRONG&gt;We have 9 walkthroughs for you to get familiar with the IIS 7.0 PowerShell Provider:&lt;BR&gt;&lt;A href="http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-provider/" mce_href="http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-provider/"&gt;http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-provider/&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Have fun!&lt;BR&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2297363" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS+News+Item/default.aspx">IIS News Item</category><category domain="http://blogs.iis.net/thomad/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>IIS 7.0 Trace Viewer</title><link>http://blogs.iis.net/thomad/archive/2008/03/27/iis-7-0-trace-viewer.aspx</link><pubDate>Thu, 27 Mar 2008 07:06:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2258495</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P mce_keep="true"&gt;There is a 90% chance I have to use the "&lt;A class="" title="Failed Request Event Tracing Article" href="http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/" mce_href="http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/"&gt;Failed Request Tracing&lt;/A&gt;" feature (FRT)&amp;nbsp;when I'm troubleshooting IIS7 issues. To be honest, I stopped turning it off. Tracing is so useful and fast that I don't see why I should&amp;nbsp;disable it on my development box.&amp;nbsp;I have a rule that catches all requests (status code 200-500) and there is no negative impact. &lt;/P&gt;
&lt;P mce_keep="true"&gt;The problem was so far that I always had to shell out to the command-line to open my trace files. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;Not anymore. The IIS7 Trace Viewer is an IIS7 User Interface Module that shows me my site's trace files. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="Trace Viewer"  alt="Trace Viewer" src="http://blogs.iis.net/blogs/thomad/traceviewer.jpg"  mce_src="http://blogs.iis.net/blogs/thomad/traceviewer.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;IIS7 Trace Viewer Features&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Trace View icon per site. Automatically enumerates all your trace files.&lt;/LI&gt;
&lt;LI&gt;Shows trace filename, file size, file date, requested Url, HTTP status code, Application Pool and Time Taken in list format. Supports sorting of these columns.&lt;/LI&gt;
&lt;LI&gt;Double-click on a row and the trace file will open in Internet Explorer.&lt;/LI&gt;
&lt;LI&gt;Completely remoteable and delegateable&amp;nbsp;for&amp;nbsp;hosted enviroments.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Update via F5.&lt;/LI&gt;
&lt;LI&gt;Install program included.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Installation&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Download the &lt;A class="" title="Trace Viewer Zip File" href="http://blogs.iis.net/blogs/thomad/traceviewer.zip" mce_href="http://blogs.iis.net/blogs/thomad/traceviewer.zip"&gt;ZIP file&lt;/A&gt;, expand the two files traceviewer.dll and traceviewInstall.exe&amp;nbsp;to a directory and execute traceviewInstall.exe. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2258495" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/FREB/default.aspx">FREB</category><category domain="http://blogs.iis.net/thomad/archive/tags/FRT/default.aspx">FRT</category><category domain="http://blogs.iis.net/thomad/archive/tags/trace/default.aspx">trace</category><category domain="http://blogs.iis.net/thomad/archive/tags/tracing/default.aspx">tracing</category></item><item><title>Hosting Übersites: IIS7 Support for International Domain Names (IDN)</title><link>http://blogs.iis.net/thomad/archive/2008/03/05/hosting-220-bersites-iis7-support-for-international-domain-names-idn.aspx</link><pubDate>Thu, 06 Mar 2008 06:19:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2215666</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P mce_keep="true"&gt;Let's suppose you are German, you developed an extremely cool web-site&amp;nbsp;and now you want to make it available to your German Bier buddies. The only really fetzig site name you could come up with contains one of these&amp;nbsp;nasty German umlauts: &lt;STRONG&gt;übersite.de&lt;/STRONG&gt; &lt;FONT size=1&gt;(not registered&amp;nbsp;at the time I'm writing this blog).&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;There are several registrars out there who allow you to register domain names that contain&amp;nbsp;Unicode characters. It's called&amp;nbsp;&lt;A class="" title="International Domain Names (IDN)" href="http://en.wikipedia.org/wiki/Internationalized_domain_name" mce_href="http://en.wikipedia.org/wiki/Internationalized_domain_name"&gt;International Domain Names (IDN)&lt;/A&gt; and IIS 7.0 and HTTP.SYS&amp;nbsp;support it nicely.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here is what you do if you want to try it yourself: &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;1) Configure IE to use IDN server names for Intranet addresses&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;You need a browser who converts IDNs into &lt;A class="" title=Punycode href="http://en.wikipedia.org/wiki/Punycode" mce_href="http://en.wikipedia.org/wiki/Punycode"&gt;punycode&lt;/A&gt;. Name resolution systems like DNS don't work with Unicode and hostnames have to be converted to punycode first. Internet Explorer 7 does this automatically for Internet addresses. For our example you need to instruct IE to do the same for Intranet addresses. Go to "Tools" - "Internet Options" - select the "Advanced" tab and scroll down to the "International" section. Check "Send IDN server names for Intranet addresses". &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;2) Generate the Punycode representation of your site name&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;We need to convert the IDN site name to Punycode because existing name resolution systems still live in the good old ASCII world. There are a couple of web sites out there which do Unicode-to-Punycode conversions. Here is one of them: &lt;A href="http://www.nameisp.com/puny.asp"&gt;http://www.nameisp.com/puny.asp&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The resulting punycode string for&amp;nbsp;&lt;STRONG&gt;übersite.de&lt;/STRONG&gt; looks like this: &lt;STRONG&gt;xn--bersite-m2a.de&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;3) Registration of punycode name in name system&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;To keep name registration simple we register &lt;STRONG&gt;übersite.de&lt;/STRONG&gt; in our hosts file only. This will resolve the site name for local requests. &lt;/P&gt;
&lt;P mce_keep="true"&gt;Open %windir%\system32\drivers\etc\hosts &lt;/P&gt;
&lt;P mce_keep="true"&gt;Add a new line at the end and add the following: &lt;BR&gt;&lt;STRONG&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xn--bersite-m2a.de&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Save and close notepad. The punycode representation of &lt;STRONG&gt;übersite.de&lt;/STRONG&gt; is now mapped to your local loopback adapter&amp;nbsp;127.0.0.1&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;4) Add a new site in IIS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Almost there. The only thing left to do is to add &lt;STRONG&gt;übersite.de&lt;/STRONG&gt;&amp;nbsp;to IIS. Here are the commands I run in cmd.exe (make sure you run in an elevated command shell):&lt;/P&gt;
&lt;P mce_keep="true"&gt;md %systemdrive%\übersite&lt;BR&gt;echo This is the Default Document of &amp;amp;#252bersite.de &amp;gt;&amp;gt; %systemdrive%\übersite\default.htm&lt;BR&gt;%windir%\system32\inetsrv\appcmd add site -site.name:übersite -bindings:http://übersite.de:80 -physicalPath:%systemdrive%\übersite&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;5) Request übersite.de &lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now you just have to enter übersite.de into the address bar of Internet Explorer. &lt;/P&gt;
&lt;P mce_keep="true"&gt;And in case you have no idea how to enter "&lt;STRONG&gt;ü&lt;/STRONG&gt;" on your keyboard: turn on NumLock and enter &amp;lt;Alt&amp;gt;+0252. International Domain names of course do not just work for German Bier buddies but for all characters that can be represented via Unicode characters. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT size=1&gt;Credits: thanks to Jeong Hwang Kim who gave me the idea to this blog entry. &lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2215666" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS+News/default.aspx">IIS News</category><category domain="http://blogs.iis.net/thomad/archive/tags/appcmd/default.aspx">appcmd</category><category domain="http://blogs.iis.net/thomad/archive/tags/IDN/default.aspx">IDN</category><category domain="http://blogs.iis.net/thomad/archive/tags/punycode/default.aspx">punycode</category></item><item><title>Integrated Pipeline and the kernel-mode cache</title><link>http://blogs.iis.net/thomad/archive/2008/02/20/integrated-pipeline-and-the-kernel-mode-cache.aspx</link><pubDate>Thu, 21 Feb 2008 01:54:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2186126</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P mce_keep="true"&gt;I ran across an interesting&amp;nbsp;issue while writing a sample .NET module for IIS7&amp;nbsp;the other day. The sample module&amp;nbsp;was supposed to restrict requests to localhost only (you could of course do this by setting the site bindings to 127.0.0.1:80:localhost). Here is the code:&lt;/P&gt;&lt;FONT color=#0000ff size=1&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt; System;&lt;BR&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt; System.Web;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;BR&gt;namespace&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt; IIS7Demos&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;{&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;LocalhostOnly&lt;/SPAN&gt;&lt;FONT color=#000000&gt;:&lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;IHttpModule&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;#region&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt; IHttpModule Members&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;IHttpModule&lt;/SPAN&gt;&lt;FONT color=#000000&gt;.Dispose()&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt;&lt;FONT color=#000000&gt;;&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;IHttpModule&lt;/SPAN&gt;&lt;FONT color=#000000&gt;.Init(&lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;HttpApplication&lt;/SPAN&gt;&lt;FONT color=#000000&gt; context)&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;context.AuthorizeRequest +=&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EventHandler&lt;/SPAN&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;&lt;FONT color=#000000&gt;.AuthorizeRequest));&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt;&lt;FONT color=#000000&gt; AuthorizeRequest(&lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Object&lt;/SPAN&gt;&lt;FONT color=#000000&gt; source, &lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EventArgs&lt;/SPAN&gt;&lt;FONT color=#000000&gt; e)&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;HttpRequest&lt;/SPAN&gt;&lt;FONT color=#000000&gt; Request = ((&lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;HttpApplication&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)source).Context.Request;&lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;HttpResponse&lt;/SPAN&gt;&lt;FONT color=#000000&gt; Response = ((&lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;HttpApplication&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)source).Context.Response;&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// allow access if address is localhost (127.0.0.1 if IPv4 and ::1 if IPv6).&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Also allow access if client address matches server address&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt;&lt;FONT color=#000000&gt; (Request.UserHostAddress == &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;"127.0.0.1"&lt;/SPAN&gt;&lt;FONT color=#000000&gt; ||&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Request.UserHostAddress == &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;"::1"&lt;/SPAN&gt;&lt;FONT color=#000000&gt; ||&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Request.ServerVariables[&lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;"LOCAL_ADDR"&lt;/SPAN&gt;&lt;FONT color=#000000&gt;] == Request.ServerVariables[&lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;"REMOTE_ADDR"&lt;/SPAN&gt;&lt;FONT color=#000000&gt;])&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt;&lt;FONT color=#000000&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;else&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Response.Status = &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;"404 Access Denied. Localhost Requests only. "&lt;/SPAN&gt;&lt;FONT color=#000000&gt;;&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Response.StatusCode = 404;&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Response.End();&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;((&lt;/FONT&gt;&lt;SPAN style="COLOR: #2b91af"&gt;HttpApplication&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)source).CompleteRequest();&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;#endregion&lt;BR&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt; &lt;BR&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;}&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt; 
&lt;P mce_keep="true"&gt;The weird thing was that I was able to access some of the content from a remote machine under certain conditions. It took me a while to figure out why. &lt;/P&gt;
&lt;P mce_keep="true"&gt;IIS7 puts the response for a particular request into the kernel mode cache if the kernel mode caching is not explicitely disabled during the lifetime of a request. A lot of components in the IIS pipeline disable kernel mode caching for particular requests, all authentication modules for example. Here is a list of all the reasons why content might not be cached: &lt;A href="http://support.microsoft.com/kb/817445/en-us" mce_href="http://support.microsoft.com/kb/817445/en-us"&gt;http://support.microsoft.com/kb/817445/en-us&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The response gets put into the kernel-mode cache however if none of the configured IIS&amp;nbsp;modules disabled the kernel mode cache for a particular request. That means that HTTP.SYS will send the response for a particular URL directly from kernel-mode when the next request comes in. IIS and the IIS modules won't even see the request. And exactly that happend to me. &lt;/P&gt;
&lt;P mce_keep="true"&gt;You didn't see an issue like this in IIS6 because .NET modules were running inside the ASP.NET ISAPI extension which turned off kernel-mode caching. In the Integrated Pipeline that's not the case anymore. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;THE FIX:&lt;BR&gt;&lt;/STRONG&gt;If you write a managed module that has to see every request (all modules that do authentication or authorization are good examples) you need to disable the kernel-mode cache. The DisableKernelCache function is a method on the Response object. One of the first lines of my module has to look like this:&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT size=3&gt;Response.DisableKernelCache();&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;P mce_keep="true"&gt;Oh, and by the way: &lt;BR&gt;If you want to see what&amp;nbsp;responses are&amp;nbsp;in the kernel-mode cache try the command: &lt;/P&gt;
&lt;P mce_keep="true"&gt;netsh http show cache&lt;/P&gt;
&lt;P mce_keep="true"&gt;If that doesn't show any responses in the cache you can simply request &lt;A href="http://localhost/welcome.png"&gt;http://localhost/welcome.png&lt;/A&gt; a couple of times via Ctrl+F5 in IE and run the command again. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2186126" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/modules/default.aspx">modules</category></item><item><title>SSL certificates on Sites with Host Headers</title><link>http://blogs.iis.net/thomad/archive/2008/01/25/ssl-certificates-on-sites-with-host-headers.aspx</link><pubDate>Sat, 26 Jan 2008 07:06:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2134246</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;Today I got the following question:&lt;/P&gt;
&lt;P&gt;"I have two sites (siteV1.mysite.com and sitev2.mysite.com). They listen on the same IP address and port. We generated a certificate for siteV1.mysite.com and SSL is working properly. The problem is that some of our customers use siteV2.mysite.com and they are getting certificate errors. What's the problem?"&lt;/P&gt;
&lt;P&gt;Here is the issue: &lt;/P&gt;
&lt;P&gt;There are three pieces of data&amp;nbsp;to uniquely identify an IIS&amp;nbsp;site: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The IP address &lt;/LI&gt;
&lt;LI&gt;The Port&lt;/LI&gt;
&lt;LI&gt;The Host name which HTTP 1.1 clients send as an HTTP request header.&amp;nbsp; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;This IP:Port:Hostname triplet is called a binding. The binding "&lt;EM&gt;192.168.1.192:80:myserver"&lt;/EM&gt; for example represents&amp;nbsp;a site that listens on IP address &lt;EM&gt;192.168.1.192&lt;/EM&gt;, port &lt;EM&gt;80&lt;/EM&gt;, host-header &lt;EM&gt;myserver&lt;/EM&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The very first things IIS (HTTP.SYS to be more precise) does when a request comes in is to read the site's configuration. Connection limits and timeouts are examples of site configuration. The site binding is used to find the right site configuration. The SSL certificate seems to be another great example of site configuration - the SSL certificate is needed to decrypt the encrypted SSL data coming from the client.&lt;/P&gt;
&lt;P&gt;And the IIS User Interface certainly makes it appear as if the SSL certificate would be site configuration, too - doesn't it? In reality however you can't bind a SSL certificate to a site. The IIS UI is fooling you.&amp;nbsp;But why?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It's a chicken and egg problem: The host name is encrypted in the SSL blob that the client sends. Because&amp;nbsp;the host name is part of the binding&amp;nbsp;IIS needs the host name to lookup the right certificate. Without the host name IIS can't lookup the right site because the binding is incomplete. Without the certificate IIS can't decrypt the SSL blob that contains the host name. Game over - we are turning in circles.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;What IIS does under the covers is to ignore the host name. IIS binds the certificate to IP:Port and warns you when you try to bind a certificate to the same IP:Port combo with different host names.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is a way if you need two different sites on the same IP:Port. You can accomplish this by getting a certificate that contains both common names, i.e. sitev1.mysite.com and sitev2.mysitem.com. Cert Authorities usually allow more than one so called "common names" in a certificate. By binding the certificate to one of the two sites you won't not get certificate errors anymore. The client is happy if one of the names in the certificate matches.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is another caveat: you can't use the IIS7 User Interface to add a host header to an SSL site binding. You have to use command-line tools, do it programmatically or edit applicationhost.config directly. Here is an example and a &lt;A class="" title="Adding a binding via APPCMD" href="http://technet2.microsoft.com/windowsserver2008/en/library/ac19cc3c-7be9-44ef-8ea6-3af39fe69a7b1033.mspx?mfr=true" mce_href="http://technet2.microsoft.com/windowsserver2008/en/library/ac19cc3c-7be9-44ef-8ea6-3af39fe69a7b1033.mspx?mfr=true"&gt;link&lt;/A&gt; how you can it via command-line: &lt;/P&gt;
&lt;P&gt;&lt;B&gt;appcmd set site /site.name:"MySite V2"&lt;/B&gt;&lt;B&gt; /+bindings.[protocol='https',bindingInformation='*:443:sitev2.mysite.com']&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;And last but not least: with IIS7 you can use the following command to figure out what certificate is bound&amp;nbsp;to a particular IP:Port combination:&amp;nbsp;&amp;nbsp; &lt;BR&gt;&lt;STRONG&gt;netsh http show sslcert&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;This command will show the IP:Port binding but also some other SSL settings. &lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2134246" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/Host+Headers/default.aspx">Host Headers</category><category domain="http://blogs.iis.net/thomad/archive/tags/appcmd/default.aspx">appcmd</category><category domain="http://blogs.iis.net/thomad/archive/tags/SSL/default.aspx">SSL</category><category domain="http://blogs.iis.net/thomad/archive/tags/bindings/default.aspx">bindings</category></item><item><title>IIS7 rejecting URLs containing + </title><link>http://blogs.iis.net/thomad/archive/2007/12/17/iis7-rejecting-urls-containing.aspx</link><pubDate>Mon, 17 Dec 2007 23:52:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2064681</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;If your application has a&amp;nbsp;custom handler you might run into the following error message:&lt;/P&gt;
&lt;H4&gt;HTTP Error 404.11&lt;BR&gt;The request filtering module is configured to deny a request that contains a double escape sequence.&lt;/H4&gt;
&lt;P&gt;&lt;IMG title="Request Filter error message" style="WIDTH: 448px; HEIGHT: 246px" height=246 alt="Request Filter error message" src="http://blogs.iis.net/blogs/thomad/40411.jpg" width=448 mce_src="http://blogs.iis.net/blogs/thomad/40411.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the deal. The IIS7 request filter rejects URLs containing + characters. We do this because the + character is a dangerous choice. Some standards, e.g. the CGI standard require +'s to be converted into spaces. This can become a problem if you have code that implements name-based rules, for example urlauthorization rules that base their decisions on some part of the url. &lt;BR&gt;&lt;U&gt;Here is a cooked up example:&lt;/U&gt;&amp;nbsp;&lt;BR&gt;Let's suppose you have code that evaluates the following rule: &lt;BR&gt;&lt;STRONG&gt;&amp;lt;authorization vdir="my vdir"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;allowed users="Administrators"/&amp;gt;&lt;BR&gt;&amp;lt;/authorization&amp;gt;&lt;/STRONG&gt;&lt;BR&gt;With the ambiguity of leaving +'s in place or converting +'s to&amp;nbsp;spaces there is a possiblity that your rule engine&amp;nbsp;allows access to a non-Admin, for example if the attacker enters &lt;A href="http://myserver/my+vdir"&gt;http://myserver/my+vdir&lt;/A&gt;. The "my vdir" authorization rule won't match because your authorization code&amp;nbsp;searches for the string "my+vdir" but your rule says "my vdir". Your rule won't apply and the attacker gets access. &lt;/P&gt;
&lt;P&gt;If you absolutely want to have spaces you can simply turn off the doubleEscaping feature for your application, for your site or for the whole server. Here is an example:&lt;/P&gt;
&lt;P&gt;%windir%\system32\inetsrv\appcmd set config "Default Web Site" -section:system.webServer/security/requestfiltering -allowDoubleEscaping:true&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2064681" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/security/default.aspx">security</category><category domain="http://blogs.iis.net/thomad/archive/tags/request+filter/default.aspx">request filter</category></item><item><title>Filtering IIS7 Events in the new Eventlog</title><link>http://blogs.iis.net/thomad/archive/2006/10/30/Filtering-IIS7-Events-in-the-new-Eventlog.aspx</link><pubDate>Mon, 30 Oct 2006 23:03:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1447271</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/thomad/rsscomments.aspx?PostID=1447271</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/thomad/commentapi.aspx?PostID=1447271</wfw:comment><comments>http://blogs.iis.net/thomad/archive/2006/10/30/Filtering-IIS7-Events-in-the-new-Eventlog.aspx#comments</comments><description>&lt;P&gt;The new Event Viewer in Vista allows you to specify a view file that filters the events that are shown in the Event Viewer.&amp;nbsp;Here is a &lt;A class="" title="IIS Events" href="http://blogs.iis.net/blogs/thomad/iisevents.xml" mce_href="http://blogs.iis.net/blogs/thomad/iisevents.xml"&gt;link&lt;/A&gt; to the&amp;nbsp;view that will show only IIS7 eventlog entries in the System and Application log. Hope this is useful. &lt;/P&gt;
&lt;P&gt;How to invoke Event Viewer with the view: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EVENTVWR /v:iisevents.xml&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or click "Import Custom View" and&amp;nbsp;open&amp;nbsp;iisevents.xml if the Event Log Viewer is already open. &lt;/P&gt;
&lt;P&gt;If you turn on "Remote Event Log Management" in the Firewall of the remote machine you can even do it remotely, for example: &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;EVENTVWR myOtherMachine /v:iisevents.xml&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1447271" width="1" height="1"&gt;</description><enclosure url="http://blogs.iis.net/thomad/attachment/1447271.ashx" length="3621" type="text/xml" /><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category></item></channel></rss>