<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>siliconpizza.com &#187; IIS6</title>
	<atom:link href="http://siliconpizza.com/blog/tag/iis6/feed/" rel="self" type="application/rss+xml" />
	<link>http://siliconpizza.com</link>
	<description>I'll have a slice of that</description>
	<lastBuildDate>Mon, 11 Jul 2011 14:57:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
<div class="cse-branding-right" style="background-color:#FFFFFF;color:#000000">
  <div class="cse-branding-form">
    <form action="http://www.google.co.uk/cse" id="cse-search-box" target="_blank">
      <div>
        <input type="hidden" name="cx" value="partner-pub-0990092444456571:mfibeucn22n" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
        <input type="text" name="q" size="31" />
        <input type="submit" name="sa" value="Search" />
      </div>
    </form>
  </div>
  <div class="cse-branding-logo">
    <img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
  </div>
  <div class="cse-branding-text">
    Custom Search
  </div>
</div>

<script type="text/javascript"><!--
google_ad_client = "pub-0990092444456571";
/* 728x90, created 7/24/08 */
google_ad_slot = "4348084769";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>	<item>
		<title>Web as a Service (shared hosting to you)</title>
		<link>http://siliconpizza.com/blog/2008/09/12/web-as-a-service-shared-hosting-to-you/</link>
		<comments>http://siliconpizza.com/blog/2008/09/12/web-as-a-service-shared-hosting-to-you/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 16:19:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/?p=271</guid>
		<description><![CDATA[Over the past five years I have built several Highly available microsoft web hosting farms , hosted web apps, and associated database servers and supporting services, each one slight better than the last. Web farms No 1. IIS5, NLB base load balancing, every web site usesing same process identity, many sites is shared pool No 2. IIS6, [...]]]></description>
			<content:encoded><![CDATA[<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=8cc0ef4416d627c65d4771f7e5701b17&amp;default=' alt='No Gravatar' width=40 height=40/><p>Over the past five years I have built several Highly available microsoft web hosting farms , hosted web apps, and associated database servers and supporting services, each one slight better than the last.</p>
<p>Web farms<br />
No 1. IIS5, NLB base load balancing, every web site usesing same process identity, many sites is shared pool<br />
No 2. IIS6, Cisco CSM load balanced, 2 Node Physcial, unique ID for every site / application<br />
No 3, IIS6, Cisco ACE Load Balanced, 4 Node Virutal, unique ID for every site / application<br />
No 4, IIS6, Cisco ACE Load Balanced, 4 Node Virutal, unique ID for every site / application, second site<br />
No 5, IIS6, Cisco ACE Load Balanced, 4 Node Virutal, unique ID for every site,  Internet facing with SSL<br />
No 6, IIS6, Cisco ACE Load Balanced, 4 Node Virutal, unique ID for every site,  Intranet facing with SSL<br />
No 7, IIS6, Cisco ACE Load Balanced, 4 Node Virutal, unique ID for every site,  Intranet facing with SSL<br />
No 8, IIS6, Cisco ACE Load Balanced, 4 Node Virutal, unique ID for every site,  Intranet facing with SSL, for UAT use.</p>
<p>FTP, centralise FTP gateway providing a single FTP solution to every windows / Sambe wen server inside the enterprise</p>
<p>WordPress MU, enterprise blog solution</p>
<p>Now Finally I get to build an IIS7 one and FTP7 with FTP over SSL, watch this space</p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/09/12/web-as-a-service-shared-hosting-to-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows WMI Dangers</title>
		<link>http://siliconpizza.com/blog/2008/06/26/windows-wmi-dangers/</link>
		<comments>http://siliconpizza.com/blog/2008/06/26/windows-wmi-dangers/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 14:37:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[WSH]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/?p=266</guid>
		<description><![CDATA[I have been working on a ZERO touch build script for IIS on and off for a few weeks, One of the last stepping stone for formating the &#8220;data&#8221; drive prior to setting everything up &#8220;FORMAT H: /FS:NTFS /V:ASG&#8221; will prompt for &#8220;do you want to erase all yoiu data&#8221;, and again if the disk is in [...]]]></description>
			<content:encoded><![CDATA[<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=8cc0ef4416d627c65d4771f7e5701b17&amp;default=' alt='No Gravatar' width=40 height=40/><p>I have been working on a ZERO touch build script for IIS on and off for a few weeks,</p>
<p>One of the last stepping stone for formating the &#8220;data&#8221; drive prior to setting everything up</p>
<p>&#8220;FORMAT H: /FS:NTFS /V:ASG&#8221; will prompt for &#8220;do you want to erase all yoiu data&#8221;, and again if the disk is in use !</p>
<p> So enter WMI, after only 20 mins of digging around the the internet I found some code to do a defrag, a few tweaks, and I have some VBS code that will format a DRIVE, NO questions, even if the drive is in use, and it is ONLY 7 lines</p>
<p><em>strComputer = &#8220;.&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer &amp; &#8220;\root\cimv2&#8243;)<br />
Set colVolumes = objWMIService.ExecQuery (&#8220;Select * from Win32_Volume Where Name = &#8216;H:\\&#8217;&#8221;)<br />
For Each objVolume in colVolumes<br />
     errResult  = objvolume.dismount(1,0)<br />
     errResult = objVolume.format(&#8220;NTFS&#8221;, 1, 4096, &#8220;ASG&#8221;, 0)<br />
Next<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/06/26/windows-wmi-dangers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Site in IIS6 from ASP.NET</title>
		<link>http://siliconpizza.com/blog/2008/04/14/create-site-in-iis6-from-aspnet/</link>
		<comments>http://siliconpizza.com/blog/2008/04/14/create-site-in-iis6-from-aspnet/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 14:09:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[Web Sites]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/04/14/create-site-in-iis6-from-aspnet/</guid>
		<description><![CDATA[some REALLY rough and not very elegent code but this is my website create code for IIS6 Points to note: I centrally manage the W3SVC instance number, so they are unique across all of the platforms in the enterprise, hence the instance number is specified , not generated in the function I use AD based IWAM accounts [...]]]></description>
			<content:encoded><![CDATA[<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=8cc0ef4416d627c65d4771f7e5701b17&amp;default=' alt='No Gravatar' width=40 height=40/><p>some REALLY rough and not very elegent code but this is my website create code for IIS6</p>
<p>Points to note:</p>
<ul>
<li>I centrally manage the W3SVC instance number, so they are unique across all of the platforms in the enterprise, hence the instance number is specified , not generated in the function</li>
<li>I use AD based IWAM accounts to connect to CIFS (UNC) based content, so these have to be specified</li>
<li>hosts string is a comma separated list of hostheaders,</li>
</ul>
<p><span id="more-243"></span><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">Function</font></font><font size="2"> createsite(</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> StrMachine </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> StrSitenumber </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> StrSiteDesc </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByRef</font></font><font size="2"> Hosts </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> IwamUser </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> IWamPass </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> FilePath </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> AppPool </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">ByVal</font></font><font size="2"> DefaultLogonDomain </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font><font size="2">) </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String</font></font></p>
<p></font><font size="2" color="#008000"><font size="2" color="#008000">&#8216; need to validate the NEW hostheaders first<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> WebServiceObj </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> siteexists </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Boolean<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> Sites </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> DirectoryEntries<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> objSITE </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> Newwebserver </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> objIIS </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> objVirtualDirectory </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> headers() </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">String<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Dim</font></font><font size="2"> counter </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> Int16</font><font size="2">headers = Split(Hosts, <font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;,&#8221;</font></font><font size="2">)<font size="2" color="#0000ff"><font size="2" color="#0000ff">Try</font></font></p>
<p></font></p>
<p></font><font size="2">WebServiceObj = <font size="2" color="#0000ff"><font size="2" color="#0000ff">New</font></font><font size="2"> DirectoryEntry(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIS://&#8221;</font></font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/W3SVC&#8221;</font></font><font size="2">)<br />
siteexists = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">False<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">For</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Each</font></font><font size="2"> objSITE </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">In</font></font><font size="2"> WebServiceObj.Children<br />
</font><font size="2" color="#008000"><font size="2" color="#008000">&#8216;not all object in collection are web sites, so need to test BEFORE drilling into hosts property<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">   If</font></font><font size="2"> UCase(objSITE.SchemaClassName) = </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IISWEBSERVER&#8221;</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Then<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">      If</font></font><font size="2"> UCase(objSITE.Path.ToString) = UCase(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIS://&#8221;</font></font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/W3SVC/&#8221;</font></font><font size="2"> &amp; StrSitenumber) </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Then</font></font><font size="2"> </font><font size="2" color="#008000"><font size="2" color="#008000">&#8216;site already exists<br />
         </font></font><font size="2">siteexists = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">      End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">   End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Next</font></font></p>
<p></font><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">If</font></font><font size="2"> siteexists </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Then<br />
   </font></font><font size="2">Newwebserver = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">New</font></font><font size="2"> DirectoryEntry(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIS://&#8221;</font></font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/W3SVC/&#8221;</font></font><font size="2"> &amp; StrSitenumber)<br />
   createsite = </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;Site Already exists&#8221;<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Else<br />
</font></font><font size="2">   Newwebserver = WebServiceObj.Children.Add(StrSitenumber, </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIsWebServer&#8221;</font></font><font size="2">)<br />
   createsite = </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;Create New Site&#8221;<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If</font></font></p>
<p></font><font size="2">Newwebserver.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;ServerComment&#8221;</font></font><font size="2">).Item(0) = StrSiteDesc<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">For</font></font><font size="2"> counter = 0 </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">To</font></font><font size="2"> UBound(headers)<br />
   Newwebserver.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;ServerBindings&#8221;</font></font><font size="2">).Add(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;:80:&#8221;</font></font><font size="2"> &amp; headers(counter))<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Next<br />
</font></font><font size="2">Newwebserver.CommitChanges()<br />
Newwebserver = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">objIIS = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">New</font></font><font size="2"> DirectoryEntry(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIS://&#8221;</font></font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/W3SVC/&#8221;</font></font><font size="2"> &amp; StrSitenumber)<br />
siteexists = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">False</font></font></p>
<p><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">For</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Each</font></font><font size="2"> objSITE </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">In</font></font><font size="2"> objIIS.Children </font><font size="2" color="#008000"><font size="2" color="#008000">&#8216; check each object in site, if Vdir is it called root<br />
</font></font><font size="2" color="#008000"><font size="2" color="#008000">&#8216;not all object in collection are web sites, so need to test BEFORE drilling into propertys<br />
   </font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If</font></font><font size="2"> UCase(objSITE.SchemaClassName) = </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IISWEBVIRTUALDIR&#8221;</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Then<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">      If</font></font><font size="2"> UCase(objSITE.Path.ToString) = UCase(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIS://&#8221;</font></font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/W3SVC/&#8221;</font></font><font size="2"> &amp; StrSitenumber &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/ROOT&#8221;</font></font><font size="2">) </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Then</font></font><font size="2"> </font><font size="2" color="#008000"><font size="2" color="#008000">&#8216;site already exists<br />
</font></font><font size="2">         siteexists = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">      End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">   End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Next</font></font></p>
<p></font><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">If</font></font><font size="2"> siteexists </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Then</font></font><font size="2"> </font><font size="2" color="#008000"><font size="2" color="#008000">&#8216;Connection to exitsing site<br />
   </font></font><font size="2">objVirtualDirectory = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">New</font></font><font size="2"> DirectoryEntry(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IIS://&#8221;</font></font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/W3SVC/&#8221;</font></font><font size="2"> &amp; StrSitenumber &amp; </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;/Root&#8221;</font></font><font size="2">)<br />
</font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Else</font></font><font size="2"> </font><font size="2" color="#008000"><font size="2" color="#008000">&#8216; create NEW one <br />
</font></font><font size="2">   objVirtualDirectory = objIIS.Children.Add(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;Root&#8221;</font></font><font size="2">, </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;IISWebVirtualDir&#8221;</font></font><font size="2">)<br />
   createsite = </font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;Site Created&#8221;<br />
</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff">End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">If</font></font></p>
<p></font><font size="2"><font size="2" color="#008000"><font size="2" color="#008000">&#8216;fix all the properties</font></font></p>
<p></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AccessScript&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;Path&#8221;</font></font><font size="2">).Item(0) = FilePath<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AnonymousUserName&#8221;</font></font><font size="2">).Item(0) = IwamUser<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AnonymousUserPass&#8221;</font></font><font size="2">).Item(0) = IWamPass<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AnonymousPasswordSync&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">False<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;DefaultLogonDomain&#8221;</font></font><font size="2">).Item(0) = DefaultLogonDomain<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AppFriendlyName&#8221;</font></font><font size="2">).Item(0) = AppPool<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AppIsolated&#8221;</font></font><font size="2">).Item(0) = 2<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AppPoolId&#8221;</font></font><font size="2">).Item(0) = AppPool<br />
   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AccessWrite&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">False<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AccessRead&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AccessExecute&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AccessScript&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AuthAnonymous&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2">   objVirtualDirectory.Properties(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AuthBasic&#8221;</font></font><font size="2">).Item(0) = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True<br />
</font></font><font size="2">   objVirtualDirectory.Invoke(</font><font size="2" color="#a31515"><font size="2" color="#a31515">&#8220;AppCreate&#8221;</font></font><font size="2">, </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">True</font></font><font size="2">)<br />
</font><font size="2">   objVirtualDirectory.CommitChanges() </font><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">Catch</font></font><font size="2"> ex </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">As</font></font><font size="2"> Exception<font size="2" color="#008000"><font size="2" color="#008000">&#8216;createsite = ex.Message</font></font></p>
<p></font></p>
<p></font><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">Finally</font></font></p>
<p></font><font size="2">   WebServiceObj = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">   siteexists = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">   Sites = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">   objSITE = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">   Newwebserver = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">   objIIS = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing<br />
</font></font><font size="2">   objVirtualDirectory = </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Nothing</font></font><font size="2" color="#0000ff"><font size="2" color="#0000ff"><font size="2" color="#0000ff"><font size="2" color="#0000ff">End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Try</font></font></p>
<p></font></font><font size="2"><font size="2" color="#0000ff"><font size="2" color="#0000ff">End</font></font><font size="2"> </font><font size="2" color="#0000ff"><font size="2" color="#0000ff">Function</font></font></p>
<p></font></p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/04/14/create-site-in-iis6-from-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIS6, Creating Application Pools with .NET</title>
		<link>http://siliconpizza.com/blog/2008/03/25/iis6-creating-application-pools-with-net/</link>
		<comments>http://siliconpizza.com/blog/2008/03/25/iis6-creating-application-pools-with-net/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 15:29:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Application Pools]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[VB.Net]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/03/25/iis6-creating-application-pools-with-net/</guid>
		<description><![CDATA[I know this is VB.NET but i was in a hurry and my C# sucks this is mostly cobbled togther from other stuff I found on the net, none of which did EXACTLY what I needed When I get the time i will publish some of my other functions, including IIS6 site create and IIS6 FTP Profile [...]]]></description>
			<content:encoded><![CDATA[<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=8cc0ef4416d627c65d4771f7e5701b17&amp;default=' alt='No Gravatar' width=40 height=40/><p>I know this is VB.NET but i was in a hurry and my C# sucks<br />
this is mostly cobbled togther from other stuff I found on the net, none of which did EXACTLY what I needed<br />
When I get the time i will publish some of my other functions, including IIS6 site create and IIS6 FTP Profile Create</p>
<p>This is a simple VB.NET function to create and IIS6 Application pool<br />
This function is designed to specify the UserId and Password for the AppPool Identity and was used in an environment where domain credentials were used</p>
<p><font size="2"><font size="2" color="#0000ff"><span id="more-239"></span>Function</font><font size="2"> CreateAppPool(</font><font size="2" color="#0000ff">ByVal</font><font size="2"> StrMachine </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff">String</font><font size="2">, </font><font size="2" color="#0000ff">ByVal</font><font size="2"> AppName </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff">String</font><font size="2">, </font><font size="2" color="#0000ff">ByVal</font><font size="2"> UserName </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff">String</font><font size="2">, </font><font size="2" color="#0000ff">ByVal</font><font size="2"> Password </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff">String</font><font size="2">) </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff"> </font></font><font size="2"><font size="2" color="#0000ff">String</font></font><font size="2"> </font></p>
<p><font size="2">CreateAppPool = <font size="2" color="#a31515">&#8220;success&#8221;<br />
</font><font size="2" color="#0000ff">Dim</font><font size="2"> foundapp </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff">Boolean<br />
</font><font size="2" color="#0000ff">Dim</font><font size="2"> apppools </font><font size="2" color="#0000ff">As</font><font size="2"> DirectoryEntries<br />
</font><font size="2" color="#0000ff">Dim</font><font size="2"> apppool2 </font><font size="2" color="#0000ff">As</font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff">Dim</font><font size="2"> apppool </font><font size="2" color="#0000ff">As</font><font size="2"> DirectoryEntry<br />
</font><font size="2" color="#0000ff">Dim</font><font size="2"> NewAppPool </font><font size="2" color="#0000ff">As</font><font size="2"> </font><font size="2" color="#0000ff">Object<br />
</font></font><font size="2"><font size="2">foundapp = <font size="2" color="#0000ff">False<br />
</font><font size="2">apppool2 = </font><font size="2" color="#0000ff">New</font><font size="2"> DirectoryEntry(</font><font size="2" color="#a31515">&#8220;IIS://&#8221;</font><font size="2"> &amp; StrMachine &amp; </font><font size="2" color="#a31515">&#8220;/w3svc/AppPools&#8221;</font><font size="2">)<br />
apppools = apppool2.Children<br />
</font><font size="2" color="#008000">&#8216;test for duplicate poolname<br />
</font><font size="2" color="#0000ff">For</font><font size="2"> </font><font size="2" color="#0000ff">Each</font><font size="2"> apppool </font><font size="2" color="#0000ff">In</font><font size="2"> apppools </font><font size="2" color="#008000">&#8216; scan each current app pool for check its name<br />
</font><font size="2" color="#0000ff">  If</font><font size="2"> UCase(apppool.Name) = UCase(AppName) </font><font size="2" color="#0000ff">Then</font><font size="2"> </font><font size="2" color="#008000">&#8216; no need to check class type as everything at this level is a AppPool<br />
</font><font size="2">    foundapp = </font><font size="2" color="#0000ff">True<br />
</font><font size="2" color="#0000ff">  End</font><font size="2"> </font><font size="2" color="#0000ff">If<br />
</font><font size="2" color="#0000ff">Next<br />
</font><font size="2" color="#0000ff">If</font><font size="2"> </font><font size="2" color="#0000ff">Not</font><font size="2"> foundapp </font><font size="2" color="#0000ff">Then<br />
</font><font size="2" color="#008000">  &#8216;create the APP Pool and set unique information, most of the data is inherited<br />
</font><font size="2">  NewAppPool = apppool2.Children.Add(AppName, </font><font size="2" color="#a31515">&#8220;IIsApplicationPool&#8221;</font><font size="2">)<br />
  NewAppPool.Properties(</font><font size="2" color="#a31515">&#8220;AppPoolIdentityType&#8221;</font><font size="2">).Item(0) = 3<br />
  NewAppPool.Properties(</font><font size="2" color="#a31515">&#8220;WAMUserName&#8221;</font><font size="2">).Item(0) = UserName<br />
  NewAppPool.Properties(</font><font size="2" color="#a31515">&#8220;WAMUserPass&#8221;</font><font size="2">).Item(0) = Password<br />
  NewAppPool.CommitChanges()<br />
  NewAppPool = </font><font size="2" color="#0000ff">Nothing<br />
</font><font size="2" color="#0000ff">Else<br />
</font><font size="2">  CreateAppPool = </font><font size="2" color="#a31515">&#8220;Duplicate AppPool found&#8221;<br />
</font><font size="2" color="#0000ff">End</font><font size="2"> </font><font size="2" color="#0000ff">If<br />
</font><font size="2">  apppool2 = </font><font size="2" color="#0000ff">Nothing<br />
</font><font size="2">  apppools = </font><font size="2" color="#0000ff">Nothing<br />
</font><font size="2" color="#0000ff">End</font><font size="2"> </font><font size="2" color="#0000ff">Function</font></font></font></p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/03/25/iis6-creating-application-pools-with-net/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

