<?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; Microsoft</title>
	<atom:link href="http://siliconpizza.com/blog/tag/microsoft/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>WordPress MU on IIS7 POC</title>
		<link>http://siliconpizza.com/blog/2008/07/01/wordpress-mu-on-iis7-poc/</link>
		<comments>http://siliconpizza.com/blog/2008/07/01/wordpress-mu-on-iis7-poc/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 09:08:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mod_Rewrite]]></category>
		<category><![CDATA[URL_ReWrite]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/?p=267</guid>
		<description><![CDATA[This Blogging Platform is built on WordPress MU, WordPress MU is slightly different to WordPress in that it has support for multiple independent blogs on top of a single user database, when running in folder per blog mode WordPress MU is totally dependent on the apache MOD-ReWrite feature to rebuild URL in the fly. This [...]]]></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>This Blogging Platform is built on WordPress MU, WordPress MU is slightly different to WordPress in that it has support for multiple independent blogs on top of a single user database, when running in folder per blog mode WordPress MU is totally dependent on the apache MOD-ReWrite feature to rebuild URL in the fly. This is a feature that has been missing from IIS until now, Microsoft have released, albeit CTP1 at the moment, a<a href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1691"> URL rewrite module for IIS7</a>.</p>
<p>WordPress and WordPress MU can also use url-rewrite to create “friendly” permalinks</p>
<p>Well I did it, installed a copy of WordPress MU on IIS7 in folder per blog mode</p>
<ul>
<li>Server 2008 enterprise</li>
<li>IIS7 URL-ReWrite CTP1</li>
<li> WordPress MU 1.5.1</li>
<li> mysql-5.1.25-rc-win32</li>
<li> ZendCore-2.5.0-Windows-x86</li>
</ul>
<p>Using the URL-Write Module and some help from IIS.net, it was fairly straight forward; URL-ReWrite is still in CTP1 and has a few known issues. For instance the import wizard correctly identifies the  [L] parameter in .htaccess and create the correct XML, but the ”stopProcessing” attribute does not get copied to the web.config file and the ReWritecondition flag created a NEW rule with no action , rather than apply the condition to the next rule.</p>
<p>So after a bit of fiddling and some help from <a href="http://forums.iis.net/t/1150095.aspx">IIS.NET </a>I got it all working including CSS and themes for folder based blogs.<br />
The Only issue I did not fix was an issue with ONE of the CSS files which controls the layout of the TOP of the admin pages,</p>
<p>SORTED !!!!!!!!!!</p>
<p>Just so i dont lose it the <a href="http://siliconpizza.com/docs/web.zip">web.config file is here</a></p>
<p><a href="http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress">And dont forget the rewrite server variable fix too</a></p>
<p> </p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/07/01/wordpress-mu-on-iis7-poc/feed/</wfw:commentRss>
		<slash:comments>4</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>Microsoft and I</title>
		<link>http://siliconpizza.com/blog/2008/06/13/microsoft-and-i/</link>
		<comments>http://siliconpizza.com/blog/2008/06/13/microsoft-and-i/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 12:07:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/06/13/microsoft-and-i/</guid>
		<description><![CDATA[After going the full duration, 3 interviews and an assessment day over 3months I had &#8220;the Call&#8221; from Microsoft HR consultants this morning Unfortunately it is a &#8220;NO Hire&#8221; that makes it the first job (ever) I have applied for that I have not got ! BUM Got some good feedback, no surprises for me [...]]]></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>After going the full duration, 3 interviews and an assessment day over 3months<br />
I had &#8220;the Call&#8221; from Microsoft HR consultants this morning</p>
<p>Unfortunately it is a &#8220;NO Hire&#8221; that makes it the first job (ever) I have applied for that I have not got ! BUM</p>
<p>Got some good feedback, no surprises for me though</p>
<p>Good points</p>
<ul>
<li>General Technical knowledge is good, particularly in web services area</li>
<li>Presentation content was well researched and has ALL of the appropriate points</li>
</ul>
<p>Bad points</p>
<ul>
<li>Technical knowledge not deep enough in some areas AD GPO, and high end security got tripped up in duel vendor firewalls, I may have even been tripped up on SQL log shipping recovery process (I need to check), I also struggled to explain some of the decision points when I have built  HUGE intranet platforms</li>
<li>Some of the business stuff is outside my comfort zone , which limits my ability to talk to business people</li>
<li>Presentation style. In hind sight (the wonderful tool that it is) I spent too long researching the content, and not enough time rehearsing, end result is I will TOO reliant on my notes and came across as reading a script,</li>
</ul>
<p>Just not quite what they are looking for at in a consultant at the moment</p>
<p>I can&#8217;t help feeling, the presentation delivery is totally my fault , and I KNOW I can do better<br />
It is not my normal style to be dependent on notes, and running out of time to prior to the event rehearse is totally my fault and in excusable</p>
<p>I will now be wondering if I would have been better missing a few points and get the delivery right</p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/06/13/microsoft-and-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pondering large scale application consolidation</title>
		<link>http://siliconpizza.com/blog/2008/05/21/pondering-large-scale-application-migration/</link>
		<comments>http://siliconpizza.com/blog/2008/05/21/pondering-large-scale-application-migration/#comments</comments>
		<pubDate>Wed, 21 May 2008 11:07:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Application consolidation]]></category>
		<category><![CDATA[Web Sites]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/05/21/pondering-large-scale-application-migration/</guid>
		<description><![CDATA[Historically many bespoke application are developed on the same servers the prodcution application runs on. Often this server was built by the developers with little regards for consistancy. After all developers develop applications for a living, not build server infrastructure. Developing an application on the production server can lead to many problems, particularly if that server build is not quite [...]]]></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>Historically many bespoke application are developed on the same servers the prodcution application runs on. Often this server was built by the developers with little regards for consistancy. After all developers develop applications for a living, not build server infrastructure.</p>
<p>Developing an application on the production server can lead to many problems, particularly if that server build is not quite right or the developer is a little wet behind the ears and does not considure scaling issues and hard coded resource refernces. Then of course it is always possible to cripple the production server by testing <strike>rogue</strike> application code at the whim a developer. I could witter on for ages about this, bit i want to get on towards what needs to be done to consolidate these applications to central managed infrastructure. Putting to one side the issues of supporting the, often extremely large, consolidation platform, many problems need to be over come to ensure the successful migration / consolidation of bespoke applications in the enterprise.</p>
<p><strong>&lt;UPDATE&gt;</strong><br />
It is worth pointing out that these applications should be consolidated to a well defined, well managed platform, where each appliaction exists in a logical container where ALL interfaces and features are defined and controlled by the infrastructure. Hopeful reducing or even eliminating many of the future gotchas</p>
<p>It should also be noted the technology is only a small part of the battle. Accurate recording of succesfull migration, ownership, and reporting of KPIs also need to be considered. i am not talking a few spreadsheets, it needs to be a fully operation CMDB. spreadsheets are not searchable on MASS, so without a proper CMDB you still only have a huge quantity of unstructure data which is be out of data before you can use it<br />
<strong>&lt;/UPDATE&gt;</strong></p>
<p> So this is my list of check points and Gotchas</p>
<p><span id="more-261"></span></p>
<p>Information Required</p>
<ul>
<li>Who owns the application (business owner, not a Project manager) ?</li>
<li>Do they have resource to manage coding changes that may be required ?</li>
<li>Who Need access to develop the application ?</li>
<li>Who supports the APP ?</li>
<li>Does the app have a offical supoprt team ?</li>
<li>Does the app have approval from the corporate security guys?</li>
<li>How many users ?</li>
<li>Does it need access to employ data / GAL ?</li>
<li>.net version requirements</li>
<li>Database Requirements (oracle and SQL), linked Servers</li>
<li>Database requirements (un supported and  will need to migrate)</li>
<li>Downstream dependencies</li>
<li>Upstream dependencies</li>
<li>LOB implications (many corporates have to segragate their LOBs BT Openreach for example)</li>
<li>Any 3rd party access customers (via portals)</li>
<li>Any 3rd party access offshore users</li>
<li>Any 3rd party access offshore support</li>
<li>Any 3rd party access vendors COTS software</li>
<li>Quantity of SMTP traffic generated</li>
<li>Database growth expectations</li>
<li>File Space growth expectations</li>
<li>Any confidential data requirements</li>
<li>Any encryption Key management requirements</li>
</ul>
<p>Things that may need to change</p>
<ul>
<li>Db connect strings</li>
<li>Tnsnames migration to non tns connection strings</li>
<li>SMTP parameters</li>
<li>Cold fusion with ldap queries</li>
<li>Hard coded File paths</li>
<li>Hard coded Server names</li>
<li>Hard coded data (other)</li>
</ul>
<p>Gothchas</p>
<ul>
<li>Oracle client compatibility</li>
<li>File system access by application</li>
<li>3rd party components</li>
<li>Has it been used to running with elevated privileges</li>
<li>Do any DTS/SSIS need access to file systems</li>
<li>Does SQL run as a service account, What perms does this have</li>
<li>Self referencing http calls such as web services (can break on hardware load balanced farms)</li>
<li>SMTP components</li>
<li>Non web based components, windows exe, scripts or services</li>
<li>Use of MS Office components</li>
<li>Use of MSACCESS</li>
<li>Sql optimisation (query and indexes)</li>
<li>Cold fusion version (4.x , 5 code not 100% compatible with MX series)</li>
<li>Cold fusion with AD  authentication (will need code change if using bluedragon CFML engine)</li>
<li>Asp/asp.net auth against local accounts</li>
<li>.net data components and memory usage</li>
<li>SSL</li>
<li>Session management</li>
<li>Web gardens</li>
<li>.net assemblies in bin folder</li>
<li>.net assemblies in GAC</li>
<li>.net trust requirements</li>
<li>Frontpage (Yuck)</li>
<li>WebDAV (Security implications)</li>
<li>Application session variables cannot be seen by other servers in the farm</li>
<li>Do the support guys have SA access to the current SQL server</li>
<li>Do the Support guys have console access to the current  SQL server</li>
<li>Do the support guys have console access to the web current  server</li>
<li>Date time issues on code developed on servers with wrong regional configuration</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/05/21/pondering-large-scale-application-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server, the Queen&#8217;s english and Microsoft english</title>
		<link>http://siliconpizza.com/blog/2008/05/14/sql-server-the-queens-english-and-microsoft-english/</link>
		<comments>http://siliconpizza.com/blog/2008/05/14/sql-server-the-queens-english-and-microsoft-english/#comments</comments>
		<pubDate>Wed, 14 May 2008 14:25:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[UK English]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/05/14/sql-server-the-queens-english-and-microsoft-english/</guid>
		<description><![CDATA[Guess who has just been had by the date format thing between the Queens English and Microsoft English Query Error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated. Datasource: PINBACK Native Error Code: 242 Executing SQL: Data was &#8217;14/05/2008 13:47:30&#8242; [...]]]></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><a href="http://siliconpizza.com/files/2008/05/english.JPG" title="English setting in SQL"></a>Guess who has just been had by the date format thing between the Queens English and Microsoft English</p>
<p>Query Error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.<br />
The statement has been terminated. Datasource: PINBACK Native Error Code: 242 Executing SQL:</p>
<p>Data was &#8217;14/05/2008 13:47:30&#8242;</p>
<p>the Fix was the Language for the SQL user</p>
<p><a href="http://siliconpizza.com/files/2008/05/english.JPG" title="English setting in SQL"><img src="http://siliconpizza.com/files/2008/05/english.JPG" alt="English setting in SQL" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/05/14/sql-server-the-queens-english-and-microsoft-english/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Application Coding best practices</title>
		<link>http://siliconpizza.com/blog/2008/05/06/application-coding-best-practices/</link>
		<comments>http://siliconpizza.com/blog/2008/05/06/application-coding-best-practices/#comments</comments>
		<pubDate>Tue, 06 May 2008 10:01:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Coding Standards]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/05/06/application-coding-best-practices/</guid>
		<description><![CDATA[Over the past 4 years I have had to work with some of the best web application developers I have ever met, unfortunately I have also had the miss-fortune of working with some of the worst developers on the planet. With this in mind, while attending the Microsoft 2008 launch event,  I was very impressed [...]]]></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 4 years I have had to work with some of the best web application developers I have ever met, unfortunately I have also had the miss-fortune of working with some of the worst developers on the planet.<br />
With this in mind, while attending the Microsoft 2008 launch event,  I was very impressed to pick up a book entitled “the Developer Highway code : The drive for safer coding!” <br />
This book is fantastic, and has hundreds of coding guidelines and server configuration recommendations. And absolute MUST read for any ASP, ASP.NET developer and / or web server support staff.</p>
<p>The best bit, it is available as a free ebook, from Microsoft:<br />
<a href="http://download.microsoft.com/documents/uk/msdn/devdave/mic472_dev_highway_all.pdf">http://download.microsoft.com/documents/uk/msdn/devdave/mic472_dev_highway_all.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/05/06/application-coding-best-practices/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>Asp.net and dropdown lists</title>
		<link>http://siliconpizza.com/blog/2008/04/02/241/</link>
		<comments>http://siliconpizza.com/blog/2008/04/02/241/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 19:22:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://siliconpizza.com/blog/2008/04/02/241/</guid>
		<description><![CDATA[I am slowing gaining some good experience in coding with visual studio 2008 and VB.NET and some C# for ASP.NET But I fell into a corker this week I have a simple form with a dropdown list box, the items in this drop down list box are populated from a data string obtained from an [...]]]></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 am slowing gaining some good experience in coding with visual studio 2008 and VB.NET and some C# for ASP.NET</p>
<p>But I fell into a corker this week</p>
<p>I have a simple form with a dropdown list box, the items in this drop down list box are populated from a data string obtained from an external webservice during the page load, Nice solutions or so I thought</p>
<p>1st problem a page load occurs during a post back, so the dropdown list was getting populated twice, once during the initial page load, and AGAIN during a validation post back on a textbox</p>
<p>So I decided to clear the dropdown list before adding the items</p>
<p>Some hours of frustration later I discovered the clearing and reloading the list items was not such a good plan, Pageload also goes off during a form submission which then nukes the selectedvalue data for the dropdown list</p>
<p>End result, test the dropdown list item count before to see if I have already added any item, of not add them</p>
<p>Sorted<br />
1. My selected values work properly<br />
2. My postbacks are quicker as the webservices call only occurs on initial load</p>
<p> <img src='http://siliconpizza.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://siliconpizza.com/blog/2008/04/02/241/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>

