<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>ASP.NET Debugging</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/tom/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/tom/feed.xml</link>
    <description>Debugging from an ASP.NET and Azure Engineer. Posts are from customer issues and things I feel may be useful.</description>
    <lastBuildDate>Sat, 11 Apr 2015 03:39:57 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Have an MSDN account, start using Azure for free!</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/have-an-msdn-account-start-using-azure-for-free</link>
      <pubDate>Wed, 14 Aug 2013 08:54:26 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2013/08/14/have-an-msdn-account-start-using-azure-for-free/</guid>
      <description><![CDATA[Did you know that if you have an MSDN account, you can use Azure for free?&#160; This is a great...]]></description>
      <content:encoded><![CDATA[<p><a href="https://account.windowsazure.com/signup?offer=Azure_MSDN"><img title="Activate your Azure Account" style="display: inline; background-image: none;" border="0" alt="Activate your Azure Account" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/0564.msdn-banner-716x200_0EEE4E02.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/0564.msdn_2D00_banner_2D00_716x200_5F00_0EEE4E02.png" width="720" height="204" /></a></p>  <p>Did you know that if you have an MSDN account, you can use Azure for free?&#160; This is a great opportunity for folks to try out Azure, see what it is all about and really get experience with what Azure can do for you.</p>  <p>If you have an existing MSDN account, you can go <a href="https://www.windowsazure.com/en-us/campaigns/car/">here</a> and not only activate your Azure account, but also get entered in a sweepstakes to win an Aston Martin!</p>  <p>More details on the benefits MSDN subscribers get is available <a href="https://www.windowsazure.com/en-us/pricing/member-offers/msdn-benefits/">here</a>.</p>  <p>This is a great way to have a Dev and Test environment, you can ready more about doing <a href="https://www.windowsazure.com/en-us/solutions/dev-test/">Dev &amp; Test on Azure</a> or you can read about all the new opportunities on <a href="https://weblogs.asp.net/scottgu/archive/2013/06/03/windows-azure-announcing-major-improvements-for-dev-test-in-the-cloud.aspx">Scott Guthrie’s blog</a>.</p>  <p>Get your account activated today and good luck in the contest!</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows Azure remote access stops working</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/windows-azure-remote-access-stops-working</link>
      <pubDate>Mon, 07 May 2012 08:47:49 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2012/05/07/windows-azure-remote-access-stops-working/</guid>
      <description><![CDATA[Problem  There is an issue where remote access (RDP) can stop working all of a sudden to all...]]></description>
      <content:encoded><![CDATA[<h1>Problem</h1>  <p>There is an issue where remote access (RDP) can stop working all of a sudden to all instances of a deployment that are running in Azure.&#160; The problem is that the process that handles RDP requests has crashed.&#160; If you have Windows Azure Diagnostics enabled and gather the event log files, you will see the following entries in the Application Event log:</p>  <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">   <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Log Name: Application<br />Source: Application Error<br />Date: 3/19/2012 11:42:43 PM<br />Event ID: 1005<br />Task Category: (100)<br />Level: Error<br />Keywords: Classic<br />User: N/A<br />Computer: RD00155D3A1AF9<br />Description:<br />Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program Windows Azure Remote Desktop Forwarder because of this error.<br />Program: Windows Azure Remote Desktop Forwarder<br />File: <br />The error value is listed in the Additional Data section.<br />User Action<br />1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.<br />2. If the file still cannot be accessed and<br />- It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.<br />- It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.<br />3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.<br />4. If the problem persists, restore the file from a backup copy.<br />5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.<br />Additional Data<br />Error value: C000026E<br />Disk type: 0<br />Event Xml:<br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Event</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;https://schemas.microsoft.com/win/2004/08/events/event&quot;</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Provider</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">=&quot;Application Error&quot;</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventID</span> <span style="color: #ff0000">Qualifiers</span><span style="color: #0000ff">=&quot;49152&quot;</span><span style="color: #0000ff">&gt;</span>1005<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventID</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span>2<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span>100<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span>0x80000000000000<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">TimeCreated</span> <span style="color: #ff0000">SystemTime</span><span style="color: #0000ff">=&quot;2012-03-19T23:42:43.000Z&quot;</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span>713<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span>Application<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span>RD00155D3A1AF9<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Security</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>Windows Azure Remote Desktop Forwarder<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>C000026E<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>0<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Event</span><span style="color: #0000ff">&gt;</span><br /></pre>

  <br /></div>

<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
  <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Log Name: Application<br />Source: Application Error<br />Date: 3/19/2012 11:42:43 PM<br />Event ID: 1000<br />Task Category: (100)<br />Level: Error<br />Keywords: Classic<br />User: N/A<br />Computer: RD00155D3A1AF9<br />Description:<br />Faulting application RemoteForwarderAgent.exe, version 6.0.6002.18314, time stamp 0x4eb31078, faulting module mscorlib.ni.dll, version 2.0.50727.4216, time stamp 0x4e154615, exception code 0xc0000006, fault offset 0x000000000039cd2b, process id 0xa44, application start time 0x01cd016989a1c16d.<br />Event Xml:<br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Event</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;https://schemas.microsoft.com/win/2004/08/events/event&quot;</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Provider</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">=&quot;Application Error&quot;</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventID</span> <span style="color: #ff0000">Qualifiers</span><span style="color: #0000ff">=&quot;0&quot;</span><span style="color: #0000ff">&gt;</span>1000<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventID</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span>2<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span>100<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span>0x80000000000000<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">TimeCreated</span> <span style="color: #ff0000">SystemTime</span><span style="color: #0000ff">=&quot;2012-03-19T23:42:43.000Z&quot;</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span>712<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span>Application<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span>RD00155D3A1AF9<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Security</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>RemoteForwarderAgent.exe<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>6.0.6002.18314<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>4eb31078<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>mscorlib.ni.dll<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>2.0.50727.4216<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>4e154615<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>c0000006<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>000000000039cd2b<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>a44<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>01cd016989a1c16d<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Event</span><span style="color: #0000ff">&gt;</span><br />Log Name: Application<br />Source: Application Error<br />Date: 3/21/2012 1:52:20 PM<br />Event ID: 1000<br />Task Category: (100)<br />Level: Error<br />Keywords: Classic<br />User: N/A<br />Computer: RD00155D3A2303<br />Description:<br />Faulting application RemoteForwarderAgent.exe, version 6.0.6002.18314, time stamp 0x4eb31078, faulting module mscorwks.dll, version 2.0.50727.4216, time stamp 0x4e154582, exception code 0xc0000006, fault offset 0x00000000001a8892, process id 0x%9, application start time 0x%10.<br />Event Xml:<br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Event</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;https://schemas.microsoft.com/win/2004/08/events/event&quot;</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Provider</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">=&quot;Application Error&quot;</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventID</span> <span style="color: #ff0000">Qualifiers</span><span style="color: #0000ff">=&quot;0&quot;</span><span style="color: #0000ff">&gt;</span>1000<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventID</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span>2<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span>100<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span>0x80000000000000<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">TimeCreated</span> <span style="color: #ff0000">SystemTime</span><span style="color: #0000ff">=&quot;2012-03-21T13:52:20.000Z&quot;</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span>709<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span>Application<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span>RD00155D3A2303<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Security</span> <span style="color: #0000ff">/&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>RemoteForwarderAgent.exe<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>6.0.6002.18314<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>4eb31078<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>mscorwks.dll<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>2.0.50727.4216<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>4e154582<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>c0000006<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>00000000001a8892<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Event</span><span style="color: #0000ff">&gt;</span><br /></pre>

  <br /></div>

<p>Looking at these messages, you can see that the RemoteForwarderAgent.exe has crashed.&#160; This means that no connections can be made to the Windows Azure instances through RDP.</p>

<h1>Solution</h1>

<p>To resolve this, you need to reboot the deployment from the Windows Azure portal.</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows Azure worker role crashing</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/windows-azure-worker-role-crashing</link>
      <pubDate>Mon, 07 May 2012 08:10:32 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2012/05/07/windows-azure-worker-role-crashing/</guid>
      <description><![CDATA[Problem  We have seen an issue where a worker role running inside Windows Azure will crash,...]]></description>
      <content:encoded><![CDATA[<h1>Problem</h1>  <p>We have seen an issue where a worker role running inside Windows Azure will crash, especially if it is under heavy load.&#160; The problem is with IntelliTrace being enabled.&#160; To determine if this is causing your worker role to crash, the first thing to look for are some event logs that look like this:</p>  <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">   <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Application: WaWorkerHost.exe<br />Framework Version: v4.0.30319<br />Description: The process was terminated due to an unhandled exception.<br />Exception Info: System.Runtime.CallbackException<br />Stack:<br />   at System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)<br />   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)<br /></pre>

  <br /></div>

<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
  <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Log Name:      Application<br />Source:        .NET Runtime<br />Date:          10/4/2011 3:16:01 PM<br />Event ID:      1026<br />Task Category: None<br />Level:         Error<br />Keywords:      Classic<br />User:          N/A<br />Computer:      RD00155D3203F9<br />Description:<br />Application: WaWorkerHost.exe<br />Framework Version: v4.0.30319<br />Description: The process was terminated due to an unhandled exception.<br />Exception Info: System.Runtime.CallbackException<br />Stack:<br />   at System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)<br />   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)<br /><br />Event Xml:<br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">Event</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;https://schemas.microsoft.com/win/2004/08/events/event&quot;</span><span style="color: #0000ff">&gt;</span><br />  <span style="color: #0000ff">&lt;</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Provider</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">=&quot;.NET Runtime&quot;</span> <span style="color: #0000ff">/&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">EventID</span> <span style="color: #ff0000">Qualifiers</span><span style="color: #0000ff">=&quot;0&quot;</span><span style="color: #0000ff">&gt;</span>1026<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventID</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span>2<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Level</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span>0<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Task</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span>0x80000000000000<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Keywords</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">TimeCreated</span> <span style="color: #ff0000">SystemTime</span><span style="color: #0000ff">=&quot;2011-10-04T15:16:01.000Z&quot;</span> <span style="color: #0000ff">/&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span>426<span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventRecordID</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span>Application<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Channel</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span>RD00155D3203F9<span style="color: #0000ff">&lt;/</span><span style="color: #800000">Computer</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Security</span> <span style="color: #0000ff">/&gt;</span><br />  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">System</span><span style="color: #0000ff">&gt;</span><br />  <span style="color: #0000ff">&lt;</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br />    <span style="color: #0000ff">&lt;</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span>Application: WaWorkerHost.exe<br />Framework Version: v4.0.30319<br />Description: The process was terminated due to an unhandled exception.<br />Exception Info: System.Runtime.CallbackException<br />Stack:<br />   at System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)<br />   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)<br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Data</span><span style="color: #0000ff">&gt;</span><br />  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">EventData</span><span style="color: #0000ff">&gt;</span><br /><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Event</span><span style="color: #0000ff">&gt;</span></pre>

  <br /></div>

<p>If you see event logs like these, it doesn’t definitely mean that IntelliTrace is causing the problem, but if you have IntelliTrace enabled, it is pretty likely that it is.</p>

<p>To determine for sure that IntelliTrace is the problem, you would need to capture a dump of the Worker Role process (WaWorkerHost.exe) by remoting into the instance and attaching a debugger to the process.&#160; If you look at the dump with Windbg or some other dump analysis tool, you want to look for the following exception:</p>

<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
  <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Exception object: 0000000004acefc8<br />Exception type:   System.Runtime.CallbackException<br />Message:          Async Callback threw an exception.<br />InnerException:   System.InvalidProgramException, Use !PrintException 0000000004ad8f68 to see more.<br />StackTrace (generated):<br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br />StackTraceString: <span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br />HResult: 80131501<br />0:018<span style="color: #0000ff">&gt;</span> !pe 0000000004ad8f68 <br />Exception object: 0000000004ad8f68<br />Exception type:   System.InvalidProgramException<br />Message:          Common Language Runtime detected an invalid program.<br />InnerException:   <span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br />StackTrace (generated):<br /><span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br />StackTraceString: <span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br />HResult: 8013153a<br />====================================================================<br />0:106<span style="color: #0000ff">&gt;</span> !pe 00000000044ec790<br />Exception object: 00000000044ec790<br />Exception type:   System.InvalidProgramException<br />Message:          Common Language Runtime detected an invalid program.<br />InnerException:   <span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br />StackTrace (generated):<br />    SP               IP               Function<br />    000000002CF1E600 0000000000000000 System_ServiceModel!System.ServiceModel.Dispatcher.ErrorBehavior.HandleErrorCommon(System.Exception, System.ServiceModel.Dispatcher.ErrorHandlerFaultInfo ByRef)+0x1<br />    000000002CF1E6D0 000007FF00F6B837 System_ServiceModel!System.ServiceModel.Dispatcher.ChannelDispatcher.HandleError(System.Exception, System.ServiceModel.Dispatcher.ErrorHandlerFaultInfo ByRef)+0xa7<br />    000000002CF1E730 000007FF00F6B650 System_ServiceModel!System.ServiceModel.Dispatcher.ChannelHandler.HandleError(System.Exception)+0x30<br />    000000002CF1E780 000007FF00E76AB2 System_ServiceModel!System.ServiceModel.Dispatcher.ChannelHandler.OpenAndEnsurePump()+0xc2<br />    000000002CF1E7E0 000007FF00E58184 System_Runtime_DurableInstancing!System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0xf4<br />    000000002CF1E860 000007FF00E58035 System_Runtime_DurableInstancing!System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x115<br />    000000002CF1E8C0 000007FF009DC35B mscorlib!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x9b<br /><br />StackTraceString: <span style="color: #0000ff">&lt;</span><span style="color: #800000">none</span><span style="color: #0000ff">&gt;</span><br /></pre>

  <br /></div>

<p>Note, this was shown using <a href="https://blogs.msdn.com/b/tom/archive/2011/04/28/now-available-psscor4-debugger-extension-for-net-4-0.aspx">psscor4</a> and running !dumpallexceptions and then !printexception on the inner exception.</p>

<h1>Solution</h1>

<p>To resolve this, you need to redeploy your package to Azure and disable IntelliTrace.</p>

<p>Note</p>

<p>This problem was first posted on the <a href="https://social.msdn.microsoft.com/Forums/en-us/windowsazuretroubleshooting/thread/543da280-2e5c-4e1a-b416-9999c7a9b841">MSDN forums</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Unhandled exception has occurred while running in Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/unhandled-exception-has-occurred-while-running-in-azure</link>
      <pubDate>Thu, 22 Mar 2012 12:48:51 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2012/03/22/unhandled-exception-has-occurred-while-running-in-azure/</guid>
      <description><![CDATA[Windows Azure, just like any other IIS website can crash if an unhandled exception occurs.&#160; One...]]></description>
      <content:encoded><![CDATA[<p>Windows Azure, just like any other IIS website can crash if an unhandled exception occurs.&#160; One way that this can happen is if you are calling an Async function call and in the function that is called on completion, you throw an exception.</p>  <p>In this situation, you will see something in the Application event log that looks like this:   <br /><em>&#160;&#160;&#160;&#160; Note</em>: you may not see both of these errors but either or both of them point to the same problem.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/1754.image_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/1754.image_5F00_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/1261.image_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/1261.image_5F00_thumb.png" width="804" height="602" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/2744.image_4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/2744.image_5F00_4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/8524.image_thumb_1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/8524.image_5F00_thumb_5F00_1.png" width="750" height="612" /></a></p>  <p>The way to resolve this issue is to either wrap the code inside a Try/Catch block and catch the exception or see what is causing the exception and fix that bug.&#160; But if a block of code can throw an exception, it is always good to wrap it so that it can’t cause the entire process to crash.</p>  <p>The process crashing is something that started with .NET 2.0.&#160; You can read this <a href="https://support.microsoft.com/kb/911816">KB article</a> to get more information about this and how to make it run without crashing.&#160; There is also some more information on this on <a href="https://msdn.microsoft.com/en-us/library/ms228965.aspx">MSDN</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure deployment stuck Preparing node</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/azure-deployment-stuck-preparing-node</link>
      <pubDate>Mon, 27 Feb 2012 07:34:47 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2012/02/27/azure-deployment-stuck-preparing-node/</guid>
      <description><![CDATA[Problem  We recently had a case where a role was stuck in this state.&#160; So on the portal, the...]]></description>
      <content:encoded><![CDATA[<h1>Problem</h1>  <p>We recently had a case where a role was stuck in this state.&#160; So on the portal, the deployment line said “Initializing” and the role says “Preparing Node” and it never moves past this.&#160; We cannot remote in using RDP or anything else to see what is happening with the deployment.&#160; The error looks like:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/7357.image_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/7357.image_5F00_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/8507.image_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/8507.image_5F00_thumb.png" width="405" height="101" /></a></p>  <p>Turns out one problem that can cause this is if you are using Unicode file names.&#160;&#160; During the packaging and preparation of the files, we urlencode the names so that they can be stored in a compressed format.&#160; If the encoded file names become longer then 260 bytes, then the compression tools fail to unzip the package correctly and you will be left in a state like this when trying to deploy.</p>  <h1>Workaround</h1>  <p>There are a couple of things you can do here to fix this problem.</p>  <ol>   <li>Don’t use Unicode characters in file names.</li>    <li>Shorten the file names so they get until the 260 byte limit.</li> </ol>  <p>Using either of these methods will allow you to deploy successfully to Azure.</p>]]></content:encoded>
    </item>
    <item>
      <title>Using the Azure Management APIs from Linux</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/using-the-azure-management-apis-from-linux</link>
      <pubDate>Wed, 08 Feb 2012 13:22:52 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2012/02/08/using-the-azure-management-apis-from-linux/</guid>
      <description><![CDATA[If you want to use the Azure Management APIs from Linux, there are a few things you need to do so...]]></description>
      <content:encoded><![CDATA[<p>If you want to use the Azure Management APIs from Linux, there are a few things you need to do so that it will work correctly.&#160; If you are getting a problem when you try to connect where it looks like the Azure side is just closing the connection, there are a few things that could be the problem.</p>  <p>There are the standard things that you need to make sure you do:</p>  <ul>   <li>Make sure the certificate is at least 2048 bits</li>    <li>Make sure the certificate is uploaded and listed in the Azure portal under the management certificates</li> </ul>  <p>But assuming those things are all correct, you also need to make sure you use the SSL_CTX_set_mode function to set the following OpenSSL options:</p>  <ul>   <li>SSL_MODE_AUTO_RETRY</li>    <li>SSL_ENABLE_PARTIAL_WRITE</li> </ul>  <p>That should allow you to connect to the management APIs.</p>  <p>You can also take a look at this <a href="https://social.msdn.microsoft.com/Forums/en-US/windowsazuremanagement/thread/f1cf3322-a8e3-4179-a35e-6bfb2fd55075">forum post</a> to see how to get curl to connect.&#160; This can be really helpful as curl has all of the source code so you can use that to see how to connect.</p>  <p>For more information on how to do this kind of thing from windows, take a look at this <a href="https://msdn.microsoft.com/en-us/library/windowsazure/gg651127.aspx">MSDN article</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Storage Analytics</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/azure-storage-analytics</link>
      <pubDate>Tue, 08 Nov 2011 13:08:49 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2011/11/08/azure-storage-analytics/</guid>
      <description><![CDATA[Now that we have released the Windows Azure Storage Analytics, there are some useful tools to look...]]></description>
      <content:encoded><![CDATA[<p>Now that we have released the <a href="https://blogs.msdn.com/b/windowsazurestorage/archive/2011/08/03/windows-azure-storage-analytics.aspx">Windows Azure Storage Analytics</a>, there are some useful tools to look at the data.&#160; If you want to write code to do this, you can check out this <a href="https://blogs.msdn.com/b/windowsazurestorage/archive/2011/08/03/windows-azure-storage-logging-using-logs-to-track-storage-requests.aspx">post</a> for some sample code.&#160; You can also use Avkash's blog <a href="https://blogs.msdn.com/b/avkashchauhan/archive/2011/10/11/collecting-windows-azure-storage-rest-api-level-metrics-data-without-a-single-line-of-programming-just-by-using-tools.aspx">post</a> to look at blob storage analytics using CloudBerry.&#160; If you want to do something similar with the other storage types (Queues and Tables) you can use a couple different tools to enable logging.</p>  <p>Cerebrata has a <a href="https://www.cerebrata.com/Blog/post/Cerebrata-Windows-Azure-Storage-Analytics-Configuration-Utility-A-Free-Utility-to-Configure-Windows-Azure-Storage-Analytics.aspx">Storage Analytics Configuration utility</a> that allows you to configure all of the settings or you can use the sample code posted by Steve Marx <a href="https://blog.smarx.com/posts/playing-with-the-new-windows-azure-storage-analytics-features">here</a> to do this either from the website he has running or from your own web site that you build yourself using the source he provides.</p>  <p>Once you have the logging enabled, you then just wait for the logs to be propagated to blob storage and then you can look at them.&#160; For blob storage, you can use CloudBerry's nice UI to see all of the entries.&#160; For the other types, you have to use a tool to browse to the folder where they exist.&#160; One way is using the <a href="https://www.cloudberrylab.com/microsoft-azure-explorer-pro.aspx">CloudBerry tool</a> and connecting to your blob storage and typing in a custom path of just &quot;$logs&quot;.&#160; You will then get something like the following:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/5381.logs.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/5381.logs.png"><img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="logs" border="0" alt="logs" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/23/metablogapi/2570.logs_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-23-metablogapi/2570.logs_5F00_thumb.png" width="644" height="172" /></a></p>  <p>From here you can browse into the subfolders for each of them and will end up seeing a log files, see this <a href="https://msdn.microsoft.com/en-us/library/windowsazure/hh343262.aspx">page</a> for information about the folder structure.&#160; if you open that you will see the traffic coming into or out of the storage account.&#160; You can look at the documentation for Storage Analytics to see the format of the <a href="https://msdn.microsoft.com/en-us/library/windowsazure/hh343259.aspx">log files</a>.</p>  <p>For metric data, there are tables created that you can look at.&#160; You can look at the <a href="https://msdn.microsoft.com/en-us/library/windowsazure/hh343264.aspx">metric files</a> here for the format of the tables.&#160; You can use the Cerebrata <a href="https://www.cerebrata.com/Products/CloudStorageStudio/">Cloud Storage Studio</a> to view these tables.&#160; They have a 30-day trial available or you can purchase it.&#160; Hopefully other tools will support these tables soon as well.&#160; You can read more about the metrics <a href="https://blogs.msdn.com/b/windowsazurestorage/archive/2011/08/03/windows-azure-storage-metrics-using-metrics-to-track-storage-usage.aspx">here</a>.</p>  <p>Common items that use storage that you may not know about include:</p>  <ul>   <li>IntelliTrace </li>    <li>Azure Diagnostics </li> </ul>  <p>These can be seen using this tool and if enabled, disabled if you aren't developing/debugging your Azure application.</p><div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"><br /><br /><script type="text/javascript">
</script>
<script type="text/javascript" src="https://tweetmeme.com/i/scripts/button.js"></script></div>]]></content:encoded>
    </item>
    <item>
      <title>Now Available: Psscor4 – Debugger Extension for .NET 4.0</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/now-available-psscor4-debugger-extension-for-net-4-0</link>
      <pubDate>Thu, 28 Apr 2011 06:24:36 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2011/04/28/now-available-psscor4-debugger-extension-for-net-4-0/</guid>
      <description><![CDATA[I am very happy to announce that Psscor4 is now available for download.&#160; You can download it...]]></description>
      <content:encoded><![CDATA[<p>I am very happy to announce that Psscor4 is now available for download.&#160; You can download it from:</p>  <p><a title="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=a06a0fea-a4d4-434e-a527-d6afa2e552dd" href="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=a06a0fea-a4d4-434e-a527-d6afa2e552dd">Psscor4 Managed-Code Debugging Extension for WinDbg</a></p>  <p>This should have the same functionality as Psscor2 does but it works against the .NET 4.0 Framework.&#160; Please let me know if you run into any problems downloading or using this extension.&#160; I would also love to know if you have any feature requests for it.</p>]]></content:encoded>
    </item>
    <item>
      <title>Help with Windows Azure role stuck in Initializing/Busy/Stopped state</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/help-with-windows-azure-role-stuck-in-initializingbusystopped-state</link>
      <pubDate>Fri, 25 Feb 2011 08:19:25 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2011/02/25/help-with-windows-azure-role-stuck-in-initializingbusystopped-state/</guid>
      <description><![CDATA[I have seen a number of issues where the Windows Azure role is stuck when you deploy it and you...]]></description>
      <content:encoded><![CDATA[<p><font size="2">I have seen a number of issues where the Windows Azure role is stuck when you deploy it and you can’t get it started.&#160; There are a few great posts about this problem at:</font></p>  <ul>   <li><a title="Stop" href="https://blogs.staykov.net/2009/12/windows-azure-role-stuck-in.html">Windows Azure role stuck in Initializing/Busy/Stopping</a></li>    <li><a title="Another common reason for Windows Azure role to st" href="https://blogs.staykov.net/2009/12/another-common-reason-for-windows-azure.html">Another common reason for Windows Azure role to stuck in Initializing/Busy/Stopping</a></li> </ul>  <p><font size="2">One of the problems outlined here shows up because an exception is thrown in the OnStart function inside the WebRole.cs file in your Windows Azure WebRole.&#160; If an exception happens here, it becomes an unhandled exception because there is no try/catch and so the process that it is running in will be shut down.&#160; There is a great description of this at <a title="CLR Inside Out- Unhandled Exception Processing In The CLR" href="https://msdn.microsoft.com/en-us/magazine/cc793966.aspx">CLR Inside Out- Unhandled Exception Processing In The CLR</a>.</font></p>  <p><font size="2">So one way to help this situation is to add a try/catch inside the OnStart function.&#160; Below is such an example but I took it a step further and added code in the catch that will log the exception in the Event Log.&#160; That way we can see what is happening and investigate the problem.</font></p>  <blockquote>   <p><font size="2"><strong>Note</strong>: If the exception is caused by the Diagnostics code, you can’t use that to get the event log data, but you would be able to remote into the machine and look at the event log on the machine.&#160; The steps for that are <a href="https://msdn.microsoft.com/en-us/library/gg443832.aspx">here</a>.</font></p> </blockquote>  <p><font size="2">Here is what that function would look like:</font></p>  <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">   <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">     <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">bool</span> OnStart()</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">try</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>         <span style="color: #008000">// For information on handling configuration changes</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>         <span style="color: #008000">// see the MSDN topic at https://go.microsoft.com/fwlink/?LinkId=166357.</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     <span style="color: #0000ff">catch</span> (Exception e)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         <span style="color: #cc6633">#region</span> <span style="color: #006080">&quot;Handle Exception&quot;</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         System.Text.StringBuilder message = <span style="color: #0000ff">new</span> System.Text.StringBuilder(<span style="color: #006080">&quot;\r\n\r\nException Occurred:\r\n\r\nappId=&quot;</span>);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>         String appId = (<span style="color: #0000ff">string</span>)AppDomain.CurrentDomain.GetData(<span style="color: #006080">&quot;.appId&quot;</span>);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>         <span style="color: #0000ff">if</span> (appId != <span style="color: #0000ff">null</span>)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>             message.Append(appId);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>         message.AppendFormat(<span style="color: #006080">&quot;\r\n\r\ntype={0}\r\n\r\nmessage={1}\r\n\r\nstack=\r\n{2}\r\n\r\n&quot;</span>,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>             e.GetType().FullName,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>             e.Message,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>             e.StackTrace);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>         <span style="color: #0000ff">string</span> webenginePath = System.IO.Path.Combine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(), <span style="color: #006080">&quot;webengine.dll&quot;</span>);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>         <span style="color: #0000ff">if</span> (!System.IO.File.Exists(webenginePath))</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>         {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>             <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> Exception(String.Format(System.Globalization.CultureInfo.InvariantCulture,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>                 <span style="color: #006080">&quot;Failed to locate webengine.dll at '{0}'. This module requires .NET Framework.&quot;</span>,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>                 webenginePath));</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>         }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>         System.Diagnostics.FileVersionInfo ver = System.Diagnostics.FileVersionInfo.GetVersionInfo(webenginePath);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>         <span style="color: #0000ff">string</span> _sourceName = <span style="color: #0000ff">string</span>.Format(System.Globalization.CultureInfo.InvariantCulture, <span style="color: #006080">&quot;ASP.NET {0}.{1}.{2}.0&quot;</span>,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>             ver.FileMajorPart, ver.FileMinorPart, ver.FileBuildPart);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>         <span style="color: #0000ff">if</span> (!System.Diagnostics.EventLog.SourceExists(_sourceName))</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>         {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>             <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> Exception(String.Format(System.Globalization.CultureInfo.InvariantCulture,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>                 <span style="color: #006080">&quot;There is no EventLog source named '{0}'. This module requires .NET Framework.&quot;</span>,</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>                 _sourceName));</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>         }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>         System.Diagnostics.EventLog Log = <span style="color: #0000ff">new</span> System.Diagnostics.EventLog();</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>         Log.Source = _sourceName;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>         Log.WriteEntry(message.ToString(), System.Diagnostics.EventLogEntryType.Error);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>         <span style="color: #cc6633">#endregion</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>     }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span>     <span style="color: #0000ff">return</span> <span style="color: #0000ff">base</span>.OnStart();</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span> }</pre>
<!--CRLF--></div>
</div>

<p><font size="2">I added a region so you can minimize the catch code and just focus on your code inside the try.&#160; Hope this helps people to be able to handle problems in this function better and not have it keep the Role from starting up.</font></p>

<p><font size="2">One last thing, I put this under the ASP.NET Source in the Event Log.&#160; So that is what you would look for in regards to entries.&#160; You can change this to something else, but keep in mind that if you add your own event source, the process can’t use it until it is restarted.&#160; There is an example doing that <a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.source.aspx">here</a>.&#160; This is the same code that is shown in <a title="Unhandled exceptions cause ASP.NET-based applications to" href="https://support.microsoft.com/kb/911816">Unhandled exceptions cause ASP.NET-based applications to unexpectedly quit in the .NET Framework 2.0</a>.</font></p>

<p><font size="2">&#160;</font></p><div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"><br /><br /><script type="text/javascript">
</script>
<script type="text/javascript" src="https://tweetmeme.com/i/scripts/button.js"></script></div>]]></content:encoded>
    </item>
    <item>
      <title>Installing and using an HttpModule in Windows Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/tom/installing-and-using-an-httpmodule-in-windows-azure</link>
      <pubDate>Fri, 18 Feb 2011 11:14:00 GMT</pubDate>
      <dc:creator><![CDATA[ASP.NET Debugging]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tom/2011/02/18/installing-and-using-an-httpmodule-in-windows-azure/</guid>
      <description><![CDATA[Windows Azure has a lot of great things about it, but one of the difficulties is that you can’t...]]></description>
      <content:encoded><![CDATA[<p>Windows Azure has a lot of great things about it, but one of the difficulties is that you can’t administer your IIS very easily as you don’t have access to the machine.&#160; If you use the Windows Azure 1.3 SDK or later and enable RDP, you can change IIS settings but if the role has to be restarted for some reason, it will lose whatever changes you have made.</p>  <p>So this is where using the OnStart of the WebRole can really help a developer out.&#160; For this example, I am going to use the <a title="IIS Application Warm-Up module" href="https://www.iis.net/extensions/applicationwarmup">IIS Application Warm-Up module</a>.&#160; This is a good example because it is a rather complicated module to install and use properly.</p>  <p>Here is how you go about getting this module running in Windows Azure.</p>  <blockquote>   <p><strong>Note</strong>: You must be using the Windows Azure 1.3 SDK and have your site running using <a href="https://blogs.msdn.com/b/windowsazure/archive/2010/12/02/new-full-iis-capabilities-differences-from-hosted-web-core.aspx">Full IIS</a> for this to work.</p> </blockquote>  <ol>   <li>Download the <a title="IIS Application Warm-Up module" href="https://www.iis.net/extensions/applicationwarmup">IIS Application Warm-Up module</a> on your local machine and install it.&#160; This will get you the actual module: <strong>%windir%\system32\inetsrv\appwarmup.dll</strong>. </li>    <li>Add the appwarmup.dll module above to your Visual Studio WebRole project.&#160; Add it to the root of the application and be sure under Properties you have <strong>Build Action</strong> set to <strong>Content</strong> and <strong>Copy to Output Directory</strong> set to <strong>Copy always</strong>. </li>    <li>Add a Reference in the WebRole project to <strong>%windir%\system32\inetsrv\Microsoft.Web.Administration.dll</strong>. </li>    <li>Under the Properties of the newly added reference, change <strong>Copy Local</strong> to <strong>True</strong>. </li>    <li>Open the <strong>WebRole.cs</strong> file in the WebRole project, Modify it with the following code:       <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">       <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">         <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">using</span> System;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">using</span> System.Collections.Generic;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #0000ff">using</span> System.Linq;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #0000ff">using</span> Microsoft.WindowsAzure;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">using</span> Microsoft.WindowsAzure.Diagnostics;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #0000ff">using</span> Microsoft.WindowsAzure.ServiceRuntime;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> <span style="color: #0000ff">using</span> Microsoft.Web.Administration;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> <span style="color: #0000ff">namespace</span> WebRole1</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span> {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> WebRole : RoleEntryPoint</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">bool</span> OnStart()</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>         {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>             <span style="color: #008000">// For information on handling configuration changes</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>             <span style="color: #008000">// see the MSDN topic at https://go.microsoft.com/fwlink/?LinkId=166357.</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>             <span style="color: #0000ff">try</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>             {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>                 System.Diagnostics.Trace.WriteLine(<span style="color: #006080">&quot;OnStart&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>                 <span style="color: #008000">// Before we do anything else, we have to create the schema file and write it to disk</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>                 <span style="color: #0000ff">string</span> appwarmupSchemaLocation = System.IO.Path.Combine(Environment.GetEnvironmentVariable(<span style="color: #006080">&quot;windir&quot;</span>) + <span style="color: #006080">@&quot;\&quot;, @&quot;</span>system32\inetsrv\config\schema\appwarmup_schema.xml<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>                 if (!System.IO.File.Exists(appwarmupSchemaLocation))</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>                 {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>                     string[] lines = {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>                         &quot;&lt;configSchema&gt;<span style="color: #006080">&quot;,</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>                         &quot;    &lt;sectionSchema name=\<span style="color: #006080">&quot;system.webServer/httpWarmupGlobalSettings\&quot;&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>                         <span style="color: #006080">&quot;      &lt;attribute name=\&quot;httpWarmupEnabled\&quot; type=\&quot;bool\&quot; defaultValue=\&quot;true\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>                         <span style="color: #006080">&quot;    &lt;/sectionSchema&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>                         <span style="color: #006080">&quot;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>                         <span style="color: #006080">&quot;    &lt;sectionSchema name=\&quot;system.webServer/httpWarmup\&quot;&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>                         <span style="color: #006080">&quot;      &lt;element name=\&quot;userContext\&quot;&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>                         <span style="color: #006080">&quot;        &lt;attribute name=\&quot;authMode\&quot; type=\&quot;enum\&quot; defaultValue=\&quot;SetNull\&quot; &gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>                         <span style="color: #006080">&quot;          &lt;enum name=\&quot;SetNull\&quot; value=\&quot;0\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>                         <span style="color: #006080">&quot;          &lt;enum name=\&quot;SetUserOnly\&quot; value=\&quot;1\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>                         <span style="color: #006080">&quot;          &lt;enum name=\&quot;SetToken\&quot; value=\&quot;2\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>                         <span style="color: #006080">&quot;        &lt;/attribute&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>                         <span style="color: #006080">&quot;        &lt;attribute name=\&quot;authType\&quot; type=\&quot;string\&quot; defaultValue=\&quot;\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>                         <span style="color: #006080">&quot;        &lt;attribute name=\&quot;username\&quot; type=\&quot;string\&quot; defaultValue=\&quot;\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>                         <span style="color: #006080">&quot;        &lt;attribute name=\&quot;password\&quot; type=\&quot;string\&quot; encrypted=\&quot;true\&quot; caseSensitive=\&quot;true\&quot; defaultValue=\&quot;[enc:AesProvider::enc]\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>                         <span style="color: #006080">&quot;      &lt;/element&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>                         <span style="color: #006080">&quot;      &lt;element name=\&quot;requests\&quot; &gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>                         <span style="color: #006080">&quot;        &lt;collection addElement=\&quot;add\&quot; clearElement=\&quot;clear\&quot; removeElement=\&quot;remove\&quot; mergeAppend=\&quot;false\&quot; &gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>                         <span style="color: #006080">&quot;          &lt;attribute name=\&quot;requestUrl\&quot; type=\&quot;string\&quot; required=\&quot;true\&quot; isUniqueKey=\&quot;true\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>                         <span style="color: #006080">&quot;          &lt;attribute name=\&quot;allowedResponseCodes\&quot; type=\&quot;string\&quot; defaultValue=\&quot;200-399\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>                         <span style="color: #006080">&quot;          &lt;attribute name=\&quot;warmupContext\&quot; type=\&quot;string\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>                         <span style="color: #006080">&quot;          &lt;attribute name=\&quot;sendMode\&quot; type=\&quot;enum\&quot; defaultValue=\&quot;Asynchronous\&quot; &gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>                         <span style="color: #006080">&quot;            &lt;enum name=\&quot;Synchronous\&quot; value=\&quot;1\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span>                         <span style="color: #006080">&quot;            &lt;enum name=\&quot;Asynchronous\&quot; value=\&quot;2\&quot; /&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>                         <span style="color: #006080">&quot;          &lt;/attribute&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span>                         <span style="color: #006080">&quot;        &lt;/collection&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>                         <span style="color: #006080">&quot;      &lt;/element&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span>                         <span style="color: #006080">&quot;    &lt;/sectionSchema&gt;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>                         <span style="color: #006080">&quot;&quot;</span>,</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span>                         <span style="color: #006080">&quot;&lt;/configSchema&gt;&quot;</span>};</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>                     System.IO.File.WriteAllLines(appwarmupSchemaLocation, lines);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>                 }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>                 <span style="color: #008000">// Create an instance of our ServerManager</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span>                 ServerManager iisManagerFirst = <span style="color: #0000ff">new</span> ServerManager();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum63">  63:</span>                 <span style="color: #008000">// Get the applicationHost.config file</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum64">  64:</span>                 Configuration appHostConfigFirst = iisManagerFirst.GetApplicationHostConfiguration();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum65">  65:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum66">  66:</span>                 <span style="color: #008000">// Create a Section Definition for our new settings under &lt;system.webServer&gt;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum67">  67:</span>                 SectionDefinition definition = RegisterSectionDefinition(appHostConfigFirst, <span style="color: #006080">&quot;system.webServer/httpWarmupGlobalSettings&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum68">  68:</span>                 definition.OverrideModeDefault = <span style="color: #006080">&quot;Deny&quot;</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum69">  69:</span>                 definition.AllowDefinition = <span style="color: #006080">&quot;MachineToApplication&quot;</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum70">  70:</span>                 SectionDefinition definition2 = RegisterSectionDefinition(appHostConfigFirst, <span style="color: #006080">&quot;system.webServer/httpWarmup&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum71">  71:</span>                 definition2.OverrideModeDefault = <span style="color: #006080">&quot;Allow&quot;</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum72">  72:</span>                 definition2.AllowDefinition = <span style="color: #006080">&quot;MachineToApplication&quot;</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum73">  73:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum74">  74:</span>                 <span style="color: #008000">// Write these new settings out to the file, this allows us to add them later, otherwise we will get an exception</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum75">  75:</span>                 <span style="color: #008000">// because the section doesn't have a definition</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum76">  76:</span>                 iisManagerFirst.CommitChanges();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum77">  77:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum78">  78:</span>                 <span style="color: #008000">// Get another instance of our ServerManager as the first one is committed so it is read-only</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum79">  79:</span>                 ServerManager iisManager = <span style="color: #0000ff">new</span> ServerManager();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum80">  80:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum81">  81:</span>                 <span style="color: #008000">// Find our application</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum82">  82:</span>                 Application app = iisManager.Sites[RoleEnvironment.CurrentRoleInstance.Id + <span style="color: #006080">&quot;_Web&quot;</span>].Applications[0];</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum83">  83:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum84">  84:</span>                 <span style="color: #008000">// Get the applicationHost.config file</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum85">  85:</span>                 Configuration appHostConfig = iisManager.GetApplicationHostConfiguration();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum86">  86:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum87">  87:</span>                 <span style="color: #008000">// Get the appPool for this application</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum88">  88:</span>                 ConfigurationSection appPoolSection = appHostConfig.GetSection(<span style="color: #006080">&quot;system.applicationHost/applicationPools&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum89">  89:</span>                 ConfigurationElementCollection poolCollection = appPoolSection.GetCollection();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum90">  90:</span>                 ConfigurationElement appPoolElement = FindElement(poolCollection, <span style="color: #006080">&quot;add&quot;</span>, <span style="color: #006080">&quot;name&quot;</span>, app.ApplicationPoolName);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum91">  91:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum92">  92:</span>                 <span style="color: #0000ff">if</span> (appPoolElement == <span style="color: #0000ff">null</span>) <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> InvalidOperationException(<span style="color: #006080">&quot;App Pool element not found!&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum93">  93:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum94">  94:</span>                 <span style="color: #008000">// Set the attribute startMode=&quot;AlwaysRunning&quot;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum95">  95:</span>                 appPoolElement.SetAttributeValue(<span style="color: #006080">&quot;startMode&quot;</span>, <span style="color: #006080">&quot;AlwaysRunning&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum96">  96:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum97">  97:</span>                 <span style="color: #008000">// Add AppWarmupModule to the globalModules section of system.webServer, only if it doesn't already exist</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum98">  98:</span>                 ConfigurationSection globalSection = appHostConfig.GetSection(<span style="color: #006080">&quot;system.webServer/globalModules&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum99">  99:</span>                 ConfigurationElementCollection globalCollection = globalSection.GetCollection();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum100"> 100:</span>                 ConfigurationElement globalElement = FindElement(globalCollection, <span style="color: #006080">&quot;add&quot;</span>, <span style="color: #006080">&quot;name&quot;</span>, <span style="color: #006080">&quot;AppWarmupModule&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum101"> 101:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum102"> 102:</span>                 <span style="color: #0000ff">if</span> (globalElement == <span style="color: #0000ff">null</span>)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum103"> 103:</span>                 {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum104"> 104:</span>                     ConfigurationElement globalElement2 = globalCollection.CreateElement(<span style="color: #006080">&quot;add&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum105"> 105:</span>                     globalElement2.SetAttributeValue(<span style="color: #006080">&quot;name&quot;</span>, <span style="color: #006080">&quot;AppWarmupModule&quot;</span>);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum106"> 106:</span>                     <span style="color: #0000ff">string</span> appwarmupLocation = System.IO.Path.Combine(Environment.GetEnvironmentVariable(<span style="color: #006080">&quot;RoleRoot&quot;</span>) + <span style="color: #006080">@&quot;\&quot;, @&quot;</span>approot\appwarmup.dll<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum107"> 107:</span>                     System.Diagnostics.Trace.WriteLine(&quot;Location: <span style="color: #006080">&quot; + appwarmupLocation);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum108"> 108:</span>                     globalElement2.SetAttributeValue(&quot;image<span style="color: #006080">&quot;, appwarmupLocation);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum109"> 109:</span>                     globalCollection.Add(globalElement2);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum110"> 110:</span>                 }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum111"> 111:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum112"> 112:</span>                 // Add AppWarmupModule to the modules section of system.webServer, only if it doesn't already exist</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum113"> 113:</span>                 // This is adding to the &lt;location path=&quot;<span style="color: #006080">&quot; ...&gt; section, which is why we have a second parameter</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum114"> 114:</span>                 ConfigurationSection modulesSection = appHostConfig.GetSection(&quot;system.webServer/modules<span style="color: #006080">&quot;, &quot;</span><span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum115"> 115:</span>                 ConfigurationElementCollection modulesCollection = modulesSection.GetCollection();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum116"> 116:</span>                 ConfigurationElement modulesElement = FindElement(modulesCollection, &quot;add<span style="color: #006080">&quot;, &quot;</span>name<span style="color: #006080">&quot;, &quot;</span>AppWarmupModule<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum117"> 117:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum118"> 118:</span>                 if (modulesElement == null)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum119"> 119:</span>                 {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum120"> 120:</span>                     System.Diagnostics.Trace.WriteLine(&quot;Add AppWarmupModule<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum121"> 121:</span>                     ConfigurationElement modulesElement2 = modulesCollection.CreateElement(&quot;add<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum122"> 122:</span>                     modulesElement2.SetAttributeValue(&quot;name<span style="color: #006080">&quot;, &quot;</span>AppWarmupModule<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum123"> 123:</span>                     modulesCollection.Add(modulesElement2);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum124"> 124:</span>                 }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum125"> 125:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum126"> 126:</span>                 // Add httpWarmupEnabled to the new httpWarmupGlobalSettings section of system.webServer</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum127"> 127:</span>                 // This is adding to the &lt;location path=&quot;OurRoleId<span style="color: #006080">&quot; ...&gt; section, which is why we have a second parameter</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum128"> 128:</span>                 ConfigurationSection warmupSection = appHostConfig.GetSection(&quot;system.webServer/httpWarmupGlobalSettings<span style="color: #006080">&quot;, RoleEnvironment.CurrentRoleInstance.Id + &quot;</span>_Web<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum129"> 129:</span>                 System.Diagnostics.Trace.WriteLine(&quot;Add httpWarmupEnabled<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum130"> 130:</span>                 warmupSection.SetAttributeValue(&quot;httpWarmupEnabled<span style="color: #006080">&quot;, &quot;</span><span style="color: #0000ff">true</span><span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum131"> 131:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum132"> 132:</span>                 // Add our requests to the new httpWarmup section of system.webServer</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum133"> 133:</span>                 // This is adding to the &lt;location path=&quot;OurRoleId<span style="color: #006080">&quot; ...&gt; section, which is why we have a second parameter</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum134"> 134:</span>                 ConfigurationSection warmupSection2 = appHostConfig.GetSection(&quot;system.webServer/httpWarmup<span style="color: #006080">&quot;, RoleEnvironment.CurrentRoleInstance.Id + &quot;</span>_Web<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum135"> 135:</span>                 ConfigurationElement requestsElement = warmupSection2.GetChildElement(&quot;requests<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum136"> 136:</span>                 ConfigurationElementCollection warmupCollection = requestsElement.GetCollection();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum137"> 137:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum138"> 138:</span>                 // TODO: change &lt;Warmup File.aspx&gt; to the correct filename we want to browse to warm up the application</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum139"> 139:</span>                 ConfigurationElement warmupElement = FindElement(warmupCollection, &quot;add<span style="color: #006080">&quot;, &quot;</span>requestUrl<span style="color: #006080">&quot;, &quot;</span>&lt;Warmup File.aspx&gt;<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum140"> 140:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum141"> 141:</span>                 if (warmupElement == null)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum142"> 142:</span>                 {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum143"> 143:</span>                     ConfigurationElement warmupElement2 = warmupCollection.CreateElement(&quot;add<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum144"> 144:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum145"> 145:</span>                     // TODO: change &lt;Warmup File.aspx&gt; to the correct filename we want to browse to warm up the application</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum146"> 146:</span>                     warmupElement2.SetAttributeValue(&quot;requestUrl<span style="color: #006080">&quot;, &quot;</span>&lt;Warmup File.aspx&gt;<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum147"> 147:</span>                     warmupElement2.SetAttributeValue(&quot;allowedResponseCodes<span style="color: #006080">&quot;, &quot;</span>200-399<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum148"> 148:</span>                     warmupElement2.SetAttributeValue(&quot;warmupContext<span style="color: #006080">&quot;, &quot;</span>This <span style="color: #0000ff">is</span> a warmup request<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum149"> 149:</span>                     warmupElement2.SetAttributeValue(&quot;sendMode<span style="color: #006080">&quot;, &quot;</span>Asynchronous<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum150"> 150:</span>                     warmupCollection.Add(warmupElement2);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum151"> 151:</span>                 }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum152"> 152:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum153"> 153:</span>                 System.Diagnostics.Trace.WriteLine(&quot;CommitChanges<span style="color: #006080">&quot;);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum154"> 154:</span>                 iisManager.CommitChanges();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum155"> 155:</span>             }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum156"> 156:</span>             catch (Exception e)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum157"> 157:</span>             {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum158"> 158:</span>                 System.Diagnostics.Trace.WriteLine(e.ToString());</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum159"> 159:</span>             }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum160"> 160:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum161"> 161:</span>             return base.OnStart();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum162"> 162:</span>         }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum163"> 163:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum164"> 164:</span>         /// &lt;summary&gt;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum165"> 165:</span>         /// This function will create a SectionDefinition given a configuration and a path, the path can have /'s in it</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum166"> 166:</span>         /// &lt;/summary&gt;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum167"> 167:</span>         /// &lt;param name=&quot;config<span style="color: #006080">&quot;&gt;&lt;/param&gt;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum168"> 168:</span>         /// &lt;param name=&quot;sectionPath<span style="color: #006080">&quot;&gt;&lt;/param&gt;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum169"> 169:</span>         /// &lt;returns&gt;&lt;/returns&gt;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum170"> 170:</span>         private SectionDefinition RegisterSectionDefinition(Configuration config, string sectionPath)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum171"> 171:</span>         {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum172"> 172:</span>             string[] paths = sectionPath.Split('/');</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum173"> 173:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum174"> 174:</span>             SectionGroup group = config.RootSectionGroup;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum175"> 175:</span>             for (int i = 0; i &lt; paths.Length - 1; i++)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum176"> 176:</span>             {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum177"> 177:</span>                 SectionGroup newGroup = group.SectionGroups[paths[i]];</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum178"> 178:</span>                 if (newGroup == null)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum179"> 179:</span>                 {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum180"> 180:</span>                     System.Diagnostics.Trace.WriteLine(&quot;Creating: <span style="color: #006080">&quot; + paths[i]);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum181"> 181:</span>                     newGroup = group.SectionGroups.Add(paths[i]);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum182"> 182:</span>                 }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum183"> 183:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum184"> 184:</span>                 group = newGroup;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum185"> 185:</span>             }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum186"> 186:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum187"> 187:</span>             SectionDefinition section = group.Sections[paths[paths.Length - 1]];</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum188"> 188:</span>             if (section == null)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum189"> 189:</span>             {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum190"> 190:</span>                 System.Diagnostics.Trace.WriteLine(&quot;Creating: <span style="color: #006080">&quot; + paths[paths.Length - 1]);</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum191"> 191:</span>                 section = group.Sections.Add(paths[paths.Length - 1]);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum192"> 192:</span>             }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum193"> 193:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum194"> 194:</span>             return section;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum195"> 195:</span>         }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum196"> 196:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum197"> 197:</span>         /// &lt;summary&gt;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum198"> 198:</span>         /// This function will look for an element with the given name/value pairs and the given elementTagName</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum199"> 199:</span>         /// &lt;/summary&gt;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum200"> 200:</span>         /// &lt;param name=&quot;collection<span style="color: #006080">&quot;&gt;&lt;/param&gt;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum201"> 201:</span>         /// &lt;param name=&quot;elementTagName<span style="color: #006080">&quot;&gt;&lt;/param&gt;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum202"> 202:</span>         /// &lt;param name=&quot;keyValues&quot;&gt;&lt;/param&gt;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum203"> 203:</span>         <span style="color: #008000">/// &lt;returns&gt;&lt;/returns&gt;</span></pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum204"> 204:</span>         <span style="color: #0000ff">private</span> ConfigurationElement FindElement(ConfigurationElementCollection collection, <span style="color: #0000ff">string</span> elementTagName, <span style="color: #0000ff">params</span> <span style="color: #0000ff">string</span>[] keyValues)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum205"> 205:</span>         {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum206"> 206:</span>             <span style="color: #0000ff">foreach</span> (ConfigurationElement element <span style="color: #0000ff">in</span> collection)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum207"> 207:</span>             {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum208"> 208:</span>                 <span style="color: #0000ff">if</span> (String.Equals(element.ElementTagName, elementTagName, StringComparison.OrdinalIgnoreCase))</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum209"> 209:</span>                 {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum210"> 210:</span>                     <span style="color: #0000ff">bool</span> matches = <span style="color: #0000ff">true</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum211"> 211:</span>                     <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; keyValues.Length; i += 2)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum212"> 212:</span>                     {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum213"> 213:</span>                         <span style="color: #0000ff">object</span> o = element.GetAttributeValue(keyValues[i]);</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum214"> 214:</span>                         <span style="color: #0000ff">string</span> <span style="color: #0000ff">value</span> = <span style="color: #0000ff">null</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum215"> 215:</span>                         <span style="color: #0000ff">if</span> (o != <span style="color: #0000ff">null</span>)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum216"> 216:</span>                             <span style="color: #0000ff">value</span> = o.ToString();</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum217"> 217:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum218"> 218:</span>                         <span style="color: #0000ff">if</span> (!String.Equals(<span style="color: #0000ff">value</span>, keyValues[i + 1], StringComparison.OrdinalIgnoreCase))</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum219"> 219:</span>                         {</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum220"> 220:</span>                             matches = <span style="color: #0000ff">false</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum221"> 221:</span>                             <span style="color: #0000ff">break</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum222"> 222:</span>                         }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum223"> 223:</span>                     }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum224"> 224:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum225"> 225:</span>                     <span style="color: #0000ff">if</span> (matches)</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum226"> 226:</span>                         <span style="color: #0000ff">return</span> element;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum227"> 227:</span>                 }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum228"> 228:</span>             }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum229"> 229:</span>  </pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum230"> 230:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">null</span>;</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum231"> 231:</span>         }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum232"> 232:</span>     }</pre>
<!--CRLF-->

        <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum233"> 233:</span> }</pre>
<!--CRLF--></div>
    </div>

    <blockquote>
      <p><em><strong>Update (2/23/2011): </strong>I have made a few updates above based on some testing.</em></p>
    </blockquote>

    <blockquote>
      <p><strong>Note</strong>: On lines 82, 128, 134 this code uses “_Web” as part of the role name.&#160; If you change the name in the ServiceDefinition.csdef file (&lt;Site name=”Web”&gt;) then you will need to adjust that code accordingly.&#160; Also, if you have multiple sites, all 3 of these locations (adding the values there) will need to be done for each site you want to warm up.</p>
    </blockquote>
  </li>

  <li>In the <strong>OnStart</strong> function that we just added above, change the two instances of <strong>&lt;Warmup File.aspx&gt;</strong> (these are on lines 139 and 146 in the above code) to point to the file you want to have browsed for warming up your application. 

    <blockquote>
      <p><strong>Note</strong>: You can add additional requests and more advanced things to this, check out the <strong>Advanced Scenarios</strong> section of <a title="Getting Started with the IIS 7.5 Application Warm-Up Module" href="https://learn.iis.net/page.aspx/688/getting-started-with-the-iis-75-application-warm-up-module/">Getting Started with the IIS 7.5 Application Warm-Up Module</a> for more information.</p>
    </blockquote>
  </li>

  <li>Open the <strong>ServiceConfiguration.cscfg</strong> file and ensure the <strong>osFamily</strong> attribute of the <strong>ServiceConfiguration</strong> element is set to “<strong>2</strong>”.&#160; This will ensure you are using Windows Server 2008 R2 which has IIS 7.5 which is required for the IIS Application Warm-Up module. </li>

  <li>Open the <strong>ServiceDefinition.csdef</strong> file and add the following entry inside the <strong>&lt;WebRole &gt;</strong> section: 

    <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
      <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">&lt;Runtime executionContext=<span style="color: #006080">&quot;elevated&quot;</span> /&gt;</pre>

      <br /></div>
  </li>

  <li>Build your application and upload it to Windows Azure. </li>
</ol>

<p>Once you have done these steps, your application should be running now using the Warm-Up module.&#160; So the first request to a page, once the site is ready to run, should be just as fast as any other request.</p>

<p>There is another alternative, instead of doing all of this in the <strong>OnStart</strong> of your WebRole and forcing your Role to run elevated, you can also create a <a href="https://msdn.microsoft.com/en-us/library/gg456327.aspx">StartupTask</a> to do the same thing and have it run elevated.&#160; That would basically entail doing this same code in your own exe and then running the <a href="https://msdn.microsoft.com/en-us/library/gg456327.aspx">StartupTask</a>.&#160; There is a good discussion of them at <a title="Azure Startup Tasks and Powershell- Lessons Learned - Jim O&#39;Neil" href="https://blogs.msdn.com/b/jimoneil/archive/2011/02/07/azure-startup-tasks-and-powershell-lessons-learned.aspx">Azure Startup Tasks and Powershell- Lessons Learned - Jim O'Neil</a></p><div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"><br /><br /><script type="text/javascript">
</script>
<script type="text/javascript" src="https://tweetmeme.com/i/scripts/button.js"></script></div>]]></content:encoded>
    </item>
  </channel>
</rss>