<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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/"><channel><title>Speaking of which... : IIS7</title><link>http://blogs.msdn.com/johan/archive/tags/IIS7/default.aspx</link><description>Tags: IIS7</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Adding Server ROles to an IIS installation on an RODC</title><link>http://blogs.msdn.com/johan/archive/2009/05/05/adding-server-roles-to-an-iis-installation-on-an-rodc.aspx</link><pubDate>Tue, 05 May 2009 17:10:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9588868</guid><dc:creator>JohanS</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/johan/comments/9588868.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=9588868</wfw:commentRss><description>&lt;p&gt;In a recent case I was involved with I stumbled upon something quite interesting. The customer had set up a brand new Windows 2008 Server running IIS, and made it into a &lt;em&gt;Read Only Domain Controller&lt;/em&gt; (RODC). Having done this they now wanted to add the FTP-server Role to the existing IIS installation and found that they couldn't.&lt;/p&gt;  &lt;p&gt;The reason for this is that the RODC is quite picky about what server roles and features it will allow you to install. I recommend looking at the following articles, but they still don't cover everything.&lt;/p&gt;  &lt;p&gt;Applications That Are Known to Work with RODCs   &lt;br /&gt;&lt;a title="http://technet.microsoft.com/en-us/library/cc732790.aspx" href="http://technet.microsoft.com/en-us/library/cc732790.aspx"&gt;http://technet.microsoft.com/en-us/library/cc732790.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Planning for Application Compatibility with RODCs   &lt;br /&gt;&lt;a title="http://technet.microsoft.com/en-us/library/cc731746.aspx" href="http://technet.microsoft.com/en-us/library/cc731746.aspx"&gt;http://technet.microsoft.com/en-us/library/cc731746.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The main lesson to be learned is that although the application is listed as known to work with RODCs that doesn't necessarily mean it installs well once the server has been promoted to RODC. When it comes to FTP you have two valid options to get this working:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Install the FTP server &lt;em&gt;before&lt;/em&gt; promoting the server to RODC&lt;/li&gt;    &lt;li&gt;Install the &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=b7f5b652-8c5c-447a-88b8-8cfc5c13f571" target="_blank"&gt;FTP Service 7.5 for IIS7&lt;/a&gt;. This is a stand-alone installer and works just fine.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;/ Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9588868" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.msdn.com/johan/archive/tags/Misc/default.aspx">Misc</category></item><item><title>PowerShell - Managing Feature Delegation in IIS7</title><link>http://blogs.msdn.com/johan/archive/2008/12/16/powershell-managing-feature-delegation-in-iis7.aspx</link><pubDate>Tue, 16 Dec 2008 16:51:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9225881</guid><dc:creator>JohanS</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/johan/comments/9225881.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=9225881</wfw:commentRss><description>&lt;p&gt;Perhaps you've read my earlier post on &lt;a href="http://blogs.msdn.com/johan/archive/2008/10/02/powershell-advanced-configuration-editing-in-iis7.aspx"&gt;advanced feature delegation&lt;/a&gt; using PowerShell and the &lt;a href="http://learn.iis.net/page.aspx/429/installing-the-iis-70-powershell-provider/"&gt;IIS 7.0 PowerShell Provider&lt;/a&gt;. This could actually be called Part II.&lt;/p&gt;  &lt;p&gt;The previous post was based on a quick question from a premier customer. He is a never-ending source of intriguing questions and I always enjoy his &amp;quot;just one thing&amp;quot;-type of inquiries. They often force you to think a little extra. Anyway, the other day he came with a question, which (as always) seemed simple enough at a first glance. The goal was to set Feature Delegation for SMTP E-mail And Forms Authentication to &amp;quot;Read Only&amp;quot;.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.msdn.com/photos/johan/images/9225741/original.aspx" /&gt; &lt;/p&gt;  &lt;p&gt;Now, most basic configuration topics have been covered in countless posts, and at first I thought that this shouldn't be so hard. There is, however, a major difference. The SMTP E-mail and Forms Authentication settings are set in the root web.config. Not in applicationhost.config.&lt;/p&gt;  &lt;p&gt;If we open up and compare web.config before, and after we change the setting, we'll notice that the change made by the IIS Manager is adding the following into the root &amp;lt;configuration&amp;gt;-block:&lt;/p&gt;  &lt;div class="DebugSample"&gt;&amp;lt;location path=&amp;quot;&amp;quot; overrideMode=&amp;quot;Deny&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;system.net&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;mailSettings&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;smtp&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;network /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;specifiedPickupDirectory /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/smtp&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/mailSettings&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/system.net&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;system.web&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;authentication&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;forms&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;credentials /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/forms&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;passport /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/authentication&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/system.web&amp;gt;     &lt;br /&gt;&amp;lt;/location&amp;gt; &lt;/div&gt;  &lt;p&gt;Okay, so using what we already know from the &lt;a href="http://blogs.msdn.com/johan/archive/2008/10/02/powershell-advanced-configuration-editing-in-iis7.aspx"&gt;old post&lt;/a&gt; we should put together a call that looks something like this:&lt;/p&gt;  &lt;div class="SampleCode"&gt;Set-WebConfiguration &amp;quot;/System.Net/mailSettings/smtp&amp;quot;&amp;#160; -value @{&amp;lt;something... overrideMode=&amp;quot;Deny&amp;quot;, maybe?&amp;gt;} -PSPath IIS:\&lt;/div&gt;  &lt;p&gt;Please note that this is &lt;strong&gt;NOT&lt;/strong&gt; the correct syntax. It is close, but no cigar. What we need to do is:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Correctly set the overrideMode. The above sample is &lt;em&gt;not &lt;/em&gt;the way to do it. &lt;/li&gt;    &lt;li&gt;Make sure the changes are saved to web.config &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So, the final, (and correct,) call to the Set-WebConfiguration cmdlet would look like this:&lt;/p&gt;  &lt;div class="SampleCode"&gt;Set-WebConfiguration //System.Net/mailSettings/smtp -metadata overrideMode -value Deny -PSPath MACHINE/WEBROOT&lt;/div&gt;  &lt;p&gt;The Forms Authentication call would look like this:&lt;/p&gt;  &lt;div class="SampleCode"&gt;Set-WebConfiguration //System.Web/authentication -metadata overrideMode -value Deny -PSPath MACHINE/WEBROOT&lt;/div&gt;  &lt;p&gt;I've searched quite extensively for samples on this and so far I've found none. So I thought &lt;em&gt;someone &lt;/em&gt;should write it down. :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy Holidays! / Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9225881" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.msdn.com/johan/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>PowerShell - Advanced configuration editing in IIS7</title><link>http://blogs.msdn.com/johan/archive/2008/10/02/powershell-advanced-configuration-editing-in-iis7.aspx</link><pubDate>Thu, 02 Oct 2008 16:28:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8973569</guid><dc:creator>JohanS</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/johan/comments/8973569.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=8973569</wfw:commentRss><description>&lt;p&gt;I've written a lot of PowerShell posts lately and here's another one. :-)&lt;/p&gt;  &lt;p&gt;I got a question from one of the account managers if it was possible to alter the FTP Authorization Rules for a specific folder on his IIS.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.msdn.com/photos/johan/images/8973271/original.aspx" /&gt; &lt;/p&gt;  &lt;p&gt;The appcmd for the operation was&lt;/p&gt;  &lt;p&gt;&lt;span class="InlineCode"&gt;appcmd.exe set config &amp;quot;FTPFolder&amp;quot; -section:system.ftpServer/security/authorization /+&amp;quot;[accessType='Allow',users='*',roles='*',permissions='Read, Write']&amp;quot; /commit:apphost&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="InlineCode"&gt;&lt;/span&gt;He wanted to know if there was a PowerShell equivalent. Sure, you could use the appcmd directly from powershell, but if you're going to use the command line for everything, then what's the use of PowerShell?&lt;/p&gt;  &lt;p&gt;The section in applicationhost.config that we want to edit is the following:&lt;/p&gt;  &lt;div class="DebugSample"&gt;&amp;lt;location path=&amp;quot;FTPFolder&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;system.ftpServer&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;security&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;authorization&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;add accessType=&amp;quot;Allow&amp;quot; users=&amp;quot;?&amp;quot; permissions=&amp;quot;Read, Write&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/authorization&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/security&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/system.ftpServer&amp;gt;     &lt;br /&gt;&amp;lt;/location&amp;gt;&lt;/div&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;System Specs&lt;/h2&gt;  &lt;p&gt;As you might have noticed from the screenshots already he was Running Windows 2008 with &lt;a href="http://learn.iis.net/page.aspx/263/installing-and-troubleshooting-ftp7/"&gt;FTP 7&lt;/a&gt; installed. He also had the &lt;a href="http://learn.iis.net/page.aspx/429/installing-the-iis-70-powershell-provider/"&gt;IIS 7.0 PowerShell Provider&lt;/a&gt; installed.&lt;/p&gt;  &lt;h1&gt;Troubleshooting&lt;/h1&gt;  &lt;p&gt;There are a lot of cool things you can do with the WebSites using the IIS7 PowerShell provider. Below is a sample copied from &lt;a href="http://learn.iis.net/page.aspx/436/changing-simple-configuration-settings-in-configuration-sections/"&gt;iis.net&lt;/a&gt;. To use it properly, go to an IIS directory such as IIS:\DemoSite\DemoApp:&lt;/p&gt;  &lt;div class="SampleCode"&gt;$winAuth = Get-WebConfiguration -filter /system.webServer/security/authentication/windowsAuthentication    &lt;br /&gt;$winAuth.enabled = $false     &lt;br /&gt;$winAuth | set-Webconfiguration -filter /system.webServer/security/authentication/windowsAuthentication -PSPath IIS:\ -location &amp;quot;DemoSite/DemoApp&amp;quot;     &lt;br /&gt;&lt;/div&gt;  &lt;p&gt;So judging from the sample above we should simply have to set anonymousAuthentication.enabled = $true or something like that. Unfortunately this isn't the case. If you try to access the section of applicationhost.config that we're attempting to edit (see above) you will see that we don't have any applicable properties for the object. &lt;span class="InlineCode"&gt;$ftpAuth = Get-WebConfiguration -filter /system.ftpServer/security/authorization&lt;/span&gt; will not throw any exceptions, but using TAB to cycle through the properties of $ftpAuth will show us no immediate properties or methods of use. &lt;/p&gt;  &lt;h1&gt;Solution&lt;/h1&gt;  &lt;p&gt;The solution in this scenario is to use the Add-WebConfiguration cmdlet. The applicationhost.config can easily be translated to a valid Add-WebConfiguration call:&lt;/p&gt;  &lt;div class="SampleCode"&gt;Add-WebConfiguration &amp;quot;/system.ftpServer/security/authorization&amp;quot;&amp;#160; -value @{accessType=&amp;quot;Allow&amp;quot;;users=&amp;quot;?&amp;quot;;permissions=3} -PSPath IIS:\ -location FTPFolder&lt;/div&gt;  &lt;p&gt;The only thing that sticks out as being out of the ordinary is the permissions=3 setting. Why isn't it &amp;quot;Read, Write&amp;quot;? Actually, passing &amp;quot;Read, Write&amp;quot; as a parameter will not work. It will leave the permissions setting blank. &amp;quot;Read&amp;quot; or &amp;quot;Write&amp;quot; &lt;em&gt;only&lt;/em&gt; will work, but not both together. I've tried figuring out if there's a valid way of passing both arguments, but so far I've drawn blanks. I've tried putting them in an array {&amp;quot;Read&amp;quot;;&amp;quot;Write&amp;quot;}, passing them as &amp;quot;ReadWrite&amp;quot;, &amp;quot;Read;Write&amp;quot;, &amp;quot;Read+Write&amp;quot; etc. but the only way I've found so far is to pass the value 3 which is the obvious sum of the two enum values for Read and Write.&lt;/p&gt;  &lt;p&gt;Later! / Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8973569" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.msdn.com/johan/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>The first thing you should do after setting up an IIS7-server</title><link>http://blogs.msdn.com/johan/archive/2008/05/29/the-first-thing-you-should-do-after-setting-up-an-iis7-server.aspx</link><pubDate>Thu, 29 May 2008 15:14:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8557977</guid><dc:creator>JohanS</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/johan/comments/8557977.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=8557977</wfw:commentRss><description>&lt;p&gt;As you're probably well aware IIS7 relies heavily on a master configuration file named ApplicationHost.config. Now, instead of using a history file like IIS6 did, IIS7 will check this file every 2 minutes to see if it's changed. If the file has been updated, then a backup copy of the old .config will be stored in the inetpub\history-directory.&lt;/p&gt; &lt;h1&gt;Configuration history&lt;/h1&gt; &lt;p&gt;This is really cool and a very useful feature. There's only one little caveat in my opinion and that's the fact that by default IIS7 will only save up to 10 backups. All the other backups will be discarded. This means that if you're spending 20 minutes fiddling with the settings in ApplicationHost.config you will quite likely have overwritten all your old backups. Now, if something goes wrong at that point and you decide to spend another 20 minutes trying to fix this problem by &lt;em&gt;further &lt;/em&gt;editing the ApplicationHost.config you will &lt;em&gt;surely&lt;/em&gt; have overwritten the backups.&lt;/p&gt; &lt;p&gt;In a worst case scenario you might even have gone from &lt;em&gt;Healthy Server &lt;/em&gt;to &lt;em&gt;Unstable Server &lt;/em&gt;to &lt;em&gt;Server Down &lt;/em&gt;and you now find that you aren't even able to restore it to the &lt;em&gt;Unstable &lt;/em&gt;state.&lt;/p&gt; &lt;p&gt;My suggestion is to increase the default number of backups to 100, or why not 1000? You can then feel certain that any backups taken aren't overwritten when you try to undo the very same changes. Here's how you do it:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Go to %windir%\system32\inetsrv\config\  &lt;li&gt;Open applicationHost.config in notepad  &lt;li&gt;Locate the system.applicationHost section group  &lt;li&gt;Add the following item to the section group:&lt;br&gt;&lt;span class="InlineCode"&gt;&amp;lt;configHistory maxHistories="100" period="00:02:00" /&amp;gt;&lt;/span&gt;&lt;br&gt;(Naturally the maxHistories value can be whichever value you prefer)  &lt;li&gt;Save&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;To restore one of the previous configurations, simply go to inetpub\history\cfgHistory_[nnnnnnnnnn] and copy the config from there, or use appcmd. (See below) &lt;/p&gt; &lt;h1&gt;Backup using appcmd&lt;/h1&gt; &lt;p&gt;Now that we've done this there is one more thing I'd strongly recommend doing:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Open up a command-line with administrative priviliges  &lt;li&gt;Go to %windir%\system32\inetsrv  &lt;li&gt;Run "&lt;span class="InlineCode"&gt;appcmd add backup "[Name of your backup]"&lt;/span&gt;"&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;What you've done now is to create a manual backup of your current config. It's always good to have a decent (and persistent) restore point to return to.&lt;/p&gt; &lt;p&gt;If you wish to restore this backup you simply use the following syntax: "&lt;span class="InlineCode"&gt;appcmd restore backup "[Name of your backup]"&lt;/span&gt;". You can also delete a backup using the "delete" keyword, or you can list all backups, including the ones generated by the Configuration history, like this: "&lt;span class="InlineCode"&gt;appcmd list backup&lt;/span&gt;"&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.msdn.com/photos/johan/images/8557875/original.aspx"&gt; &lt;/p&gt; &lt;p&gt;Okay, so now we have made sure we have some extensive automatic backups in place which might save us a lot of headaches later on.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Later! / Johan&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8557977" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.msdn.com/johan/archive/tags/Did+you+know_3F00_/default.aspx">Did you know?</category></item><item><title>My web application times out when debugging in IIS7</title><link>http://blogs.msdn.com/johan/archive/2007/09/12/my-web-application-times-out-when-debugging-in-iis7.aspx</link><pubDate>Wed, 12 Sep 2007 16:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4879888</guid><dc:creator>JohanS</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/johan/comments/4879888.aspx</comments><wfw:commentRss>http://blogs.msdn.com/johan/commentrss.aspx?PostID=4879888</wfw:commentRss><description>&lt;H1&gt;Problem:&lt;/H1&gt;
&lt;P&gt;When using Visual Studio 2005 to debug a web application under IIS7 you will find that after 90-120 seconds the debugger will time out and you will get an appropriate error message in your browser. Visual Studio will return to it's "non debugging"-state and pretend like nothing happened.&lt;/P&gt;
&lt;P&gt;Changing the ExecutionTimout property in web.config doesn't change anything, and since you're debugging you'd expect IIS to ignore that setting anyway.&lt;/P&gt;
&lt;H1&gt;Cause:&lt;/H1&gt;
&lt;P&gt;With every new software release there are always small changes that will effect performance / behavior in certain situations. I've mentioned this before in my &lt;A href="http://blogs.msdn.com/johan/archive/2007/01/23/i-ve-upgraded-and-now-my-application-doesn-t-work-anymore.aspx" target=_blank mce_href="http://blogs.msdn.com/johan/archive/2007/01/23/i-ve-upgraded-and-now-my-application-doesn-t-work-anymore.aspx"&gt;I've upgraded and now my application doesn't work anymore&lt;/A&gt;&amp;nbsp;- post. There are always a few scenarios in which a new feature will appear to limit functionality when it is in fact increasing it.&lt;/P&gt;
&lt;P&gt;IIS will periodically ping your worker process in order to ensure that it is still responsive. By default it will be pinging the process every 30 seconds, and the process will have 90 seconds to respond. If it doesn't respond in time it is terminated.&amp;nbsp;All in all this means that If your application pool has hung for some reason it will be recycled and everything will return to normal.&lt;/P&gt;
&lt;P&gt;This is not a new feature, but it can, however, cause some problems while debugging. When you hit a breakpoint all execution stops, pending requests are not served and the worker process freezes completely. It will not respond to the health monitoring ping and if it doesn't continue execution within this 90-120 window it will be terminated.&lt;/P&gt;
&lt;H1&gt;Resolution:&lt;/H1&gt;
&lt;P&gt;There are three settings you can tweak with to resolve this. You'll find them all in the "Process Model"-section of the Advanced Settings for the Application Pool:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open up the IIS manager 
&lt;LI&gt;Locate the Application Pool in question 
&lt;LI&gt;Right-click on it and select "Advanced Settings" 
&lt;LI&gt;Scroll down to the "Process Model"-section&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The settings of interest, and their default values are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Ping Enabled (True) 
&lt;LI&gt;Ping Maximum Response Time (90 seconds) 
&lt;LI&gt;Ping Period (30 seconds)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;This means you can either turn off health monitoring altogether by setting "Ping Enabled" to false, or you can tweak with the response time or the interval. Please note that the settings are there for a reason, so once you're getting close to production you really should return them back to their default values. I personally think the settings are excellent. An application pool that has hung will be reset within a maximum of 2 minutes. With a decent &lt;A href="http://blogs.msdn.com/johan/archive/2006/11/20/sessionstate-performance.aspx" target=_blank mce_href="http://blogs.msdn.com/johan/archive/2006/11/20/sessionstate-performance.aspx"&gt;out of process State Server&lt;/A&gt; setup your clients will probably notice an unusually long response time for one request, but think nothing else of it. &lt;/P&gt;
&lt;P&gt;Over and out / Johan&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4879888" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/johan/archive/tags/SessionState/default.aspx">SessionState</category><category domain="http://blogs.msdn.com/johan/archive/tags/Worker+Process/default.aspx">Worker Process</category><category domain="http://blogs.msdn.com/johan/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.msdn.com/johan/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>