<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Deep Conversations with Flea#</title>
	<atom:link href="http://fleasharp.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fleasharp.wordpress.com</link>
	<description>Discussions on religion, politics, science and software.</description>
	<lastBuildDate>Sat, 15 Aug 2009 17:25:54 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='fleasharp.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/32ff31b8cc687e85a3d08c15aaa135a0?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Deep Conversations with Flea#</title>
		<link>http://fleasharp.wordpress.com</link>
	</image>
			<item>
		<title>ASP.NET Worker Process Renamed in Windows Vista</title>
		<link>http://fleasharp.wordpress.com/2009/08/15/asp-net-worker-process-renamed-in-windows-vista/</link>
		<comments>http://fleasharp.wordpress.com/2009/08/15/asp-net-worker-process-renamed-in-windows-vista/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 17:25:02 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/?p=40</guid>
		<description><![CDATA[So apparently the aspnet worker process has been renamed to w3wp.exe on Windows Vista. I hate this operating system more and more each day.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=40&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So apparently the aspnet worker process has been renamed to <strong>w3wp.exe </strong>on<strong> </strong>Windows Vista. I hate this operating system more and more each day.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=40&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2009/08/15/asp-net-worker-process-renamed-in-windows-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring WCF on IIS 7.0 on Windows Vista</title>
		<link>http://fleasharp.wordpress.com/2009/08/15/configuring-wcf-on-iis-7-0-on-windows-vista/</link>
		<comments>http://fleasharp.wordpress.com/2009/08/15/configuring-wcf-on-iis-7-0-on-windows-vista/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 13:33:49 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/?p=38</guid>
		<description><![CDATA[First of all, I want to say I hate Vista.
Ok, so this was my first experience using IIS 7.0 on Windows Vista for some local development and ohmigosh; what a pain. I am trying to test some WCF services and I needed to be able to debug. When attempting to view one of my services [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=38&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>First of all, I want to say I hate Vista.</p>
<p>Ok, so this was my first experience using IIS 7.0 on Windows Vista for some local development and ohmigosh; what a pain. I am trying to test some WCF services and I needed to be able to debug. When attempting to view one of my services just to ensure it could be found, I received the following error:</p>
<h3 style="font-size:1.4em;color:#cc0000;margin:10px 0 0;">The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.</h3>
<p>I mean it makes sense right; why on Earth would you expect IIS 7.0 to be able to understand a svc file!?!</p>
<p>Luckily I found a solution to this problem from <a href="https://blogs.msdn.com/rjohri/archive/2009/06/29/the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration.aspx" target="_blank">Rahul&#8217;s Blog</a> on MSDN on how to fix the problem. The basic steps are:</p>
<ol>
<li>Open a new command prompt</li>
<li>Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation</li>
<li>Execute <strong>servicemodelreg –i</strong></li>
</ol>
<p>After that, try navigating to your service again and it should work. Thanks again Rahul for this helpful tip!</p>
<p>-Flea#</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=38&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2009/08/15/configuring-wcf-on-iis-7-0-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Only Allow Numbers in A TextBox</title>
		<link>http://fleasharp.wordpress.com/2008/10/13/how-to-only-allow-numbers-in-a-textbox/</link>
		<comments>http://fleasharp.wordpress.com/2008/10/13/how-to-only-allow-numbers-in-a-textbox/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 14:23:12 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/?p=33</guid>
		<description><![CDATA[I came across a problem the other day. I was working on a ASP.NET application written on the .NET 1.1 Framework and I need to restrict two text box controls to only allow numbers. Being written for 1.1, I did not have access to the slick AJAX Control Toolkit which I could had easily thrown [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=33&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I came across a problem the other day. I was working on a ASP.NET application written on the .NET 1.1 Framework and I need to restrict two text box controls to only allow numbers. Being written for 1.1, I did not have access to the slick AJAX Control Toolkit which I could had easily thrown on a extender to force only numbers, thus I had to resort to good old JavaScript!</p>
<p>There actually were lots of examples of doing this on the Internet, but it was challenging to find one that worked period or would work in multiple browsers! Finally, after doing extensive searches and tweaks, here is the final function I used to restrict a text box to only accept numbers:</p>
<p>Javascript Function</p>
<pre class="brush: jscript;">

// A function that only allows numbers to be typed into a text field.
function NumberValidation(event)
{
var charCode = (event.which) ? event.which : event.keyCode;

return !(charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57));
}
</pre>
<p>ASP.NET Code</p>
<pre class="brush: csharp;">

&lt;asp:TextBox ID=&quot;PageSize&quot; Runat=&quot;server&quot; style=&quot;width:30px;&quot; MaxLength=&quot;3&quot; OnKeyPress=&quot;return NumberValidation(event);&quot;&gt;&lt;/asp:TextBox&gt;
</pre>
<p>*Note: Even though Visual Studio will indicate you cannot have OnKeyPress in the aspx, you can still put it there and it will work.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=33&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/10/13/how-to-only-allow-numbers-in-a-textbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting the SSDIR environment variable in Microsoft Visual Source Safe</title>
		<link>http://fleasharp.wordpress.com/2008/07/27/setting-the-ssdir-environment-variable-in-microsoft-visual-source-safe/</link>
		<comments>http://fleasharp.wordpress.com/2008/07/27/setting-the-ssdir-environment-variable-in-microsoft-visual-source-safe/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 17:06:36 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Visual Source Safe]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/?p=30</guid>
		<description><![CDATA[I have this problem crop up every once in awhile with using the command
line of Visual Source Safe 2005. I attempt to perform a task and I receive and error back saying &#8220;No VSS database (srcsafe.ini) found. Set the SSDIR environment variable to the path of srcsafe.ini for your VSS database.&#8221;
To correct this problem, open the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=30&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have this problem crop up every once in awhile with using the command<br />
line of Visual Source Safe 2005. I attempt to perform a task and I receive and error back saying &#8220;<strong><em>No VSS database (srcsafe.ini) found. Set the SSDIR environment variable to the path of srcsafe.ini for your VSS database.&#8221;</em></strong></p>
<p>To correct this problem, open the command window and go to <strong>C:\Program Files\Microsoft Visual SourceSafe</strong></p>
<p>Execute the following command:</p>
<p><strong>set ssdir=\\yourserver\VSS\VSProjects<br />
</strong><br />
This should work, of course, verify where your srcsafe.ini file is located before setting the variable.</p>
<p>-Flea#</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=30&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/07/27/setting-the-ssdir-environment-variable-in-microsoft-visual-source-safe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>The Price of Prejudice &#8211; A Response to Portfolio Magazine</title>
		<link>http://fleasharp.wordpress.com/2008/06/23/the-price-of-prejudice-a-response-to-portfolio-magazine/</link>
		<comments>http://fleasharp.wordpress.com/2008/06/23/the-price-of-prejudice-a-response-to-portfolio-magazine/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 18:08:55 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[Politics]]></category>
		<category><![CDATA[gay marriage]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/?p=17</guid>
		<description><![CDATA[Portfolio Magazine, a left slanted business magazine wrote this edititorial commentary about why business should support gay marriage. I emailed the following response back to their editors (letters@portfolio.com) and also posted it on their blog.
&#8212;&#8212;&#8212;&#8212;&#8211;
To the Editors of Portfolio Magazine,
 
I just finished reading your commentary The Price of Prejudice, where you commend the Supreme Court [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=17&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.portfolio.com/" target="_blank">Portfolio Magazine</a>, a left slanted business magazine wrote this <a href="http://www.portfolio.com/views/columns/2008/06/16/California-Faces-Gay-Marriage-Fight" target="_blank">edititorial commentary </a>about why business should support gay marriage. I emailed the following response back to their editors (<a href="mailto:letters@portfolio.com">letters@portfolio.com</a>) and also posted it on their blog.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">To the Editors of Portfolio Magazine,</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">I just finished reading your commentary <em>The Price of Prejudice,</em> where you commend the Supreme Court of California for overturning the vote of the people to legalize gay marriage. I think your appeal to business and capitalist to push for gay marriage to “recruit, retain and motivate the best and the brightest” is unfortunate and incorrect. The United States has been an economic powerhouse for decades, if not a century, without the need for gay marriage. Your warning to us that countries such as “Canada, Spain and South Africa” are legalizing gay marriage, therefore we should be concerned about losing top notch talent and business is laughable. The United States had an estimated </span><a href="https://www.cia.gov/library/publications/the-world-factbook/print/us.html"><span style="font-size:small;color:#800080;font-family:Times New Roman;">$13.84 trillion GDP</span></a><span style="font-size:small;font-family:Times New Roman;"> <span> </span>in 2007, where as Spain had </span><a href="https://www.cia.gov/library/publications/the-world-factbook/print/sp.html"><span style="font-size:small;font-family:Times New Roman;">$1.352 trillion</span></a><span style="font-size:small;font-family:Times New Roman;">, Canada was at </span><a href="https://www.cia.gov/library/publications/the-world-factbook/print/ca.html"><span style="font-size:small;font-family:Times New Roman;">$1.266 trillion</span></a><span style="font-size:small;"><span style="font-family:Times New Roman;"> and South Africa…..wait are you ready for this….<span>  </span></span></span><a href="https://www.cia.gov/library/publications/the-world-factbook/print/sf.html"><span style="font-size:small;font-family:Times New Roman;">$467.1 billion</span></a><span style="font-size:small;font-family:Times New Roman;"> GDP. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">The most unfortunate realization about this article you wrote is that you completely deny the fact that the voters of California were overruled by the courts. You then go on to say how the “majority of Americans” oppose same-sex marriage. You should be writing an article about how disgusting and un-American it is for courts to overrule the people.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Your socialist agenda is going down a slippery slope when you favor activist courts over the vote of the people. I would hate for your magazine some day to get squelched by some activist court or government as your brethren in Iran have recently faced with the </span><a href="http://www.reuters.com/article/worldNews/idUSDAH22263220080622"><span style="font-size:small;font-family:Times New Roman;">shut down of that Iranian Daily newspaper</span></a><span style="font-size:small;font-family:Times New Roman;"> who simply opposed the Government.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">I would protest your magazine by not paying for it and cancelling my subscription, but I don’t pay for it, I read it for free at the library.<span>  </span>Isn’t socialism great? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=17&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/06/23/the-price-of-prejudice-a-response-to-portfolio-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Firewall and C#</title>
		<link>http://fleasharp.wordpress.com/2008/06/19/windows-firewall-and-c/</link>
		<comments>http://fleasharp.wordpress.com/2008/06/19/windows-firewall-and-c/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 16:42:00 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/2008/06/19/windows-firewall-and-c/</guid>
		<description><![CDATA[This is great for any type of application that requires access to a network.  I wrote this WindowsFirewall class that dumps out configuration settings for the Windows Firewall of a local machine. Currently, in this example it just spits it to the console, however, you can dump it to a text file easily. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=15&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is great for any type of application that requires access to a network.  I wrote this WindowsFirewall class that dumps out configuration settings for the Windows Firewall of a local machine. Currently, in this example it just spits it to the console, however, you can dump it to a text file easily. I found a similar example <a href="http://www.webtropy.com/articles/art21-firewall-api.asp?Firewall%20api">here using VB.NET</a>. Also, <a href="http://www.shafqatahmed.com/2008/01/controlling-win.html">Shafqat Ahmed&#8217;s .NET Blog</a> had some other examples!</p>
<p>To begin, you will need to add a reference in your project to the COM assembly <b>hnetcfg.dll</b> which can be found at <b>C:\Windows\System32\hnetcfg.dll</b></p>
<pre class="brush: csharp;">
using System;
using NATUPNPLib;
using NETCONLib;
using NetFwTypeLib;

namespace ListOfProcesses
{
	/// &lt;summary&gt;
	/// A class that contains methods to display the current information
	/// about the local computers Windows Firewall.
	/// &lt;/summary&gt;
	public class WindowsFirewall
	{
		#region Constants

		private const string CLSID_FIREWALL_MANAGER = &quot;{304CE942-6E39-40D8-943A-B913C40C9CD4}&quot;;
		private const NET_FW_PROFILE_TYPE_ NET_FW_PROFILE_DOMAIN = NET_FW_PROFILE_TYPE_.NET_FW_PROFILE_DOMAIN;
		private const string LINE_HEADER = &quot;--------------------------------------------------------------------------------&quot;;
		private const string SHORT_LINE_HEADER = &quot;-----------------&quot;;

		#endregion

		#region Constructor

		public WindowsFirewall()
		{

		}

		#endregion

		#region Public Methods

		/// &lt;summary&gt;
		/// Displays a comprehensive list of information regarding the Windows Firewall
		/// &lt;/summary&gt;
		public void DisplayFirewallInformation()
		{
			INetFwMgr manager = GetFirewallManager();

			this.DisplayFirewallProfile(manager);
		}

		#endregion

		#region Private Methods

		/// &lt;summary&gt;
		/// Returns a firewall manager object
		/// &lt;/summary&gt;
		/// &lt;returns&gt;INetFwMgr interface&lt;/returns&gt;
		private static INetFwMgr GetFirewallManager()
		{
			Type objectType = Type.GetTypeFromCLSID(new Guid(CLSID_FIREWALL_MANAGER));

			return Activator.CreateInstance(objectType) as NetFwTypeLib.INetFwMgr;
		}

		/// &lt;summary&gt;
		/// Writes out various firewall configurations for the local firewall policy.
		/// &lt;/summary&gt;
		/// &lt;param name=&quot;manager&quot;&gt;INetFwMgr object&lt;/param&gt;
		private void DisplayFirewallProfile(INetFwMgr manager)
		{

			INetFwProfile profile = manager.LocalPolicy.CurrentProfile;

			/*
			 *
			 * Profile Information
			 *
			 */

			Console.Write(WindowsFirewall.LINE_HEADER);
			Console.WriteLine(&quot;Windows Firewall Report\n&quot;);
			Console.WriteLine(&quot;\n\n{0}\n{1}&quot;, &quot;Profile&quot;, WindowsFirewall.SHORT_LINE_HEADER);
			Console.WriteLine(&quot;Firewall Policy Type: {0}&quot;, this.GetPolicyType(profile));
			Console.WriteLine(&quot;Exceptions Not Allowed: {0}&quot;, profile.ExceptionsNotAllowed);
			Console.WriteLine(&quot;Notifications Disabled: {0}&quot;, profile.NotificationsDisabled);
			Console.WriteLine(&quot;Remote Administration Enabled: {0}&quot;, profile.RemoteAdminSettings.Enabled);

			/*
			 *
			 * ICMP Settings
			 *
			 */

			Console.WriteLine(&quot;\n\n{0}\n{1}&quot;, &quot;ICMP Settings&quot;, WindowsFirewall.SHORT_LINE_HEADER);
			Console.WriteLine(&quot;Allow Inbound Echo Request: {0}&quot;, profile.IcmpSettings.AllowInboundEchoRequest);
			Console.WriteLine(&quot;Allow Inbound Mask Request: {0}&quot;, profile.IcmpSettings.AllowInboundMaskRequest);
			Console.WriteLine(&quot;Allow Inbound Router Request: {0}&quot;, profile.IcmpSettings.AllowInboundRouterRequest);
			Console.WriteLine(&quot;Allow Inbound TimeStamp Request: {0}&quot;, profile.IcmpSettings.AllowInboundTimestampRequest);
			Console.WriteLine(&quot;Allow Outbound Destination Unreachable: {0}&quot;, profile.IcmpSettings.AllowOutboundDestinationUnreachable);
			Console.WriteLine(&quot;Allow Outbound Packet Too Big: {0}&quot;, profile.IcmpSettings.AllowOutboundPacketTooBig);
			Console.WriteLine(&quot;Allow Outbout Parameter Problem: {0}&quot;, profile.IcmpSettings.AllowOutboundParameterProblem);
			Console.WriteLine(&quot;Allow Outbound Source Quench: {0}&quot;, profile.IcmpSettings.AllowOutboundSourceQuench);
			Console.WriteLine(&quot;Allow Outbound Time Exceeded: {0}&quot;, profile.IcmpSettings.AllowOutboundTimeExceeded);
			Console.WriteLine(&quot;Allow Redirect: {0}&quot;, profile.IcmpSettings.AllowRedirect);

			/*
			 *
			 * Port Information
			 *
			 */

			Console.WriteLine(&quot;\n\n{0}\n{1}&quot;, &quot;Port Information&quot;, WindowsFirewall.SHORT_LINE_HEADER);
			Console.WriteLine(&quot;Globally Opened Ports: {0}&quot;, profile.GloballyOpenPorts.Count);

			// Display detailed port information.
			foreach (INetFwOpenPort port in profile.GloballyOpenPorts)
			{
				Console.WriteLine(&quot;\n\nPort Name: {0}&quot;, port.Name);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port Number: &quot;, port.Port);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port Protocol: &quot;, this.GetPortType(port));
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port IP Version: &quot;, this.GetIPVersion(port));
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port Enabled: &quot;, port.Enabled);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Remote Addresses: &quot;, port.RemoteAddresses);
			}

			/*
			 *
			 * Service Information
			 *
			 */

			Console.WriteLine(&quot;\n\n{0}\n{1}&quot;, &quot;Services Information&quot;, WindowsFirewall.SHORT_LINE_HEADER);
			Console.WriteLine(&quot;# of Services: {0}&quot;, profile.Services.Count);

			// Display detailed service information.
			foreach (INetFwService service in profile.Services)
			{
				Console.WriteLine(&quot;\n\nService Name: {0}&quot;, service.Name);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Enabled: &quot;, service.Enabled);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Scope: &quot;, this.GetServiceScope(service));

				// Obtain all the port information the service is utilizing.
				foreach (INetFwOpenPort port in service.GloballyOpenPorts)
				{
					Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port Number: &quot;, port.Port);
					Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port Protocol: &quot;, this.GetPortType(port));
					Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port IP Version: &quot;, this.GetIPVersion(port));
					Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Port Enabled: &quot;, port.Enabled);
					Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Remote Addresses: &quot;, port.RemoteAddresses);
				}
			}

			/*
			 *
			 * Authorized Applications
			 *
			 */

			Console.WriteLine(&quot;\n\n{0}\n{1}&quot;, &quot;Authorized Applications&quot;, WindowsFirewall.SHORT_LINE_HEADER);
			Console.WriteLine(&quot;# of Authorized Applications: {0}&quot;, profile.AuthorizedApplications.Count);

			// Display detailed authorized application information.
			foreach (INetFwAuthorizedApplication application in profile.AuthorizedApplications)
			{
				Console.WriteLine(&quot;\n\nApplication Name: {0}&quot;, application.Name);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Enabled: &quot;, application.Enabled);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;Remote Addresses: &quot;, application.RemoteAddresses);
				Console.WriteLine(&quot;{0, 20}{1}&quot;, &quot;File Path: &quot;, application.ProcessImageFileName);
			}

		}

		/// &lt;summary&gt;
		/// Returns a friendly string format of the policy type.
		/// &lt;/summary&gt;
		/// &lt;param name=&quot;profile&quot;&gt;INetFwProfile object&lt;/param&gt;
		/// &lt;returns&gt;string&lt;/returns&gt;
		private string GetPolicyType(INetFwProfile profile)
		{
			string policyType = string.Empty;

			// Displays what type of policy the Windows Firewall is controlled by.
			switch (profile.Type)
			{
				case NET_FW_PROFILE_TYPE_.NET_FW_PROFILE_DOMAIN:
					policyType = &quot;Domain&quot;;
					break;

				case NET_FW_PROFILE_TYPE_.NET_FW_PROFILE_STANDARD:
					policyType = &quot;Standard&quot;;
					break;

				case NET_FW_PROFILE_TYPE_.NET_FW_PROFILE_CURRENT:
					policyType = &quot;Current&quot;;
					break;

				case NET_FW_PROFILE_TYPE_.NET_FW_PROFILE_TYPE_MAX:
					policyType = &quot;Max&quot;;
					break;

			}

			return policyType;
		}

		/// &lt;summary&gt;
		/// Returns a friendly string format of the type of protocol.
		/// &lt;/summary&gt;
		/// &lt;param name=&quot;port&quot;&gt;INetFwOpenPort port object&lt;/param&gt;
		/// &lt;returns&gt;string&lt;/returns&gt;
		private string GetPortType(INetFwOpenPort port)
		{
			string protocolType =  string.Empty;

			switch (port.Protocol)
			{
				case NetFwTypeLib.NET_FW_IP_PROTOCOL_.NET_FW_IP_PROTOCOL_TCP:
					protocolType = &quot;TCP&quot;;
					break;

				case NetFwTypeLib.NET_FW_IP_PROTOCOL_.NET_FW_IP_PROTOCOL_UDP:
					protocolType = &quot;UDP&quot;;

					break;
			}

			return protocolType;
		}

		/// &lt;summary&gt;
		/// Returns a friendly string format of the IP version.
		/// &lt;/summary&gt;
		/// &lt;param name=&quot;port&quot;&gt;INetFwOpenPort port object&lt;/param&gt;
		/// &lt;returns&gt;string&lt;/returns&gt;
		private string GetIPVersion(INetFwOpenPort port)
		{
			string ipVersion = string.Empty;

			switch (port.IpVersion)
			{
				case NetFwTypeLib.NET_FW_IP_VERSION_.NET_FW_IP_VERSION_ANY:
					ipVersion = &quot;Any&quot;;
					break;

				case NetFwTypeLib.NET_FW_IP_VERSION_.NET_FW_IP_VERSION_MAX:
					ipVersion = &quot;Max&quot;;
					break;

				case NetFwTypeLib.NET_FW_IP_VERSION_.NET_FW_IP_VERSION_V4:
					ipVersion = &quot;IPV4&quot;;
					break;

				case NetFwTypeLib.NET_FW_IP_VERSION_.NET_FW_IP_VERSION_V6:
					ipVersion = &quot;IPV6&quot;;
					break;
			}

			return ipVersion;
		}

		/// &lt;summary&gt;
		/// Returns a friendly string format of the service scope.
		/// &lt;/summary&gt;
		/// &lt;param name=&quot;service&quot;&gt;INetFwService object&lt;/param&gt;
		/// &lt;returns&gt;string&lt;/returns&gt;
		private string GetServiceScope(INetFwService service)
		{
			string serviceScope = string.Empty;

			switch (service.Scope)
			{
				case NetFwTypeLib.NET_FW_SCOPE_.NET_FW_SCOPE_ALL:
					serviceScope = &quot;All&quot;;
					break;

				case NetFwTypeLib.NET_FW_SCOPE_.NET_FW_SCOPE_CUSTOM:
					serviceScope = &quot;Custom&quot;;
					break;

				case NetFwTypeLib.NET_FW_SCOPE_.NET_FW_SCOPE_LOCAL_SUBNET:
					serviceScope = &quot;Local Subnet&quot;;
					break;

				case NetFwTypeLib.NET_FW_SCOPE_.NET_FW_SCOPE_MAX:
					serviceScope = &quot;Max&quot;;
					break;
			}

			return serviceScope;
		}

		#endregion
	}
}
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=15&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/06/19/windows-firewall-and-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>IntelliSense stops working in Visual Studio 2008</title>
		<link>http://fleasharp.wordpress.com/2008/05/01/intellisense-stops-working-in-visual-studio-2008/</link>
		<comments>http://fleasharp.wordpress.com/2008/05/01/intellisense-stops-working-in-visual-studio-2008/#comments</comments>
		<pubDate>Thu, 01 May 2008 15:52:00 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/2008/05/01/intellisense-stops-working-in-visual-studio-2008/</guid>
		<description><![CDATA[I had an annoying problem in Visual Studio 2008 that cost me about 3 hours of time. I was working in C# and noticed that my IntelliSense had ceased to work. I went into the options under C# and sure enough IntelliSense was still checked; so I removed the checks, hit OK, restarted Visual Studio, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=14&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had an annoying problem in Visual Studio 2008 that cost me about 3 hours of time. I was working in C# and noticed that my IntelliSense had ceased to work. I went into the options under C# and sure enough IntelliSense was still checked; so I removed the checks, hit OK, restarted Visual Studio, came back in and turned IntelliSense back on. However. It still did not work.</p>
<p>3 hours later, I found the source of my problem. The “Auto list members” check box was no longer checked, thus disabling IntelliSense. This was obscure because one would have thought something with this much control over IntelliSense would have actually been on the IntelliSense settings form but, either way, it fixed the problem as soon as I added the check back.</p>
<p>So if your IntelliSense stops working, make sure you have the “Auto list members” box selected.</p>
<p>1.Goto Tools | Options<br />2.Text Editor<br />3.C#<br />4.General<br />5.Check &#8216;Auto list members&#8217;</p>
<p><a href="http://bp3.blogger.com/_xWoBypoYv-s/SBnn5GIwttI/AAAAAAAAABs/KI4ixNkBs5E/s1600-h/autolistmembers.jpg"><img style="display:block;text-align:center;cursor:hand;margin:0 auto 10px;" src="http://bp3.blogger.com/_xWoBypoYv-s/SBnn5GIwttI/AAAAAAAAABs/KI4ixNkBs5E/s400/autolistmembers.jpg" border="0" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=14&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/05/01/intellisense-stops-working-in-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>

		<media:content url="http://bp3.blogger.com/_xWoBypoYv-s/SBnn5GIwttI/AAAAAAAAABs/KI4ixNkBs5E/s400/autolistmembers.jpg" medium="image" />
	</item>
		<item>
		<title>US Zip Code Table for SQL 2005</title>
		<link>http://fleasharp.wordpress.com/2008/03/23/us-zip-code-table-for-sql-2005/</link>
		<comments>http://fleasharp.wordpress.com/2008/03/23/us-zip-code-table-for-sql-2005/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 03:44:00 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[SQL 2005]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/2008/03/23/us-zip-code-table-for-sql-2005/</guid>
		<description><![CDATA[I am working on a web application that requires that the user to enter in a zip code and then the city and state would be returned. This type of functionality is quite common, but for some of us developers, we don&#8217;t want to pay for the data needed to make this happen.  Granted, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=12&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="margin-bottom:0;">I am working on a web application that requires that the user to enter in a zip code and then the city and state would be returned. This type of functionality is quite common, but for some of us developers, we don&#8217;t want to pay for the data needed to make this happen.  Granted, it didn&#8217;t take me too long to find a free table of zip codes, but I did have to do some minor work to hook it all up.  So, just to add to the bounty of the Internet, I&#8217;ve uploaded the CSV file to one of my servers for you to download along with instructions below for inserting it into your SQL 2005 database. Since this is in a CSV file, you can also use it for MySQL or any other database.</p>
<ol>
<li><a href="http://nicoahsystems.com/zipcodes.zip">Click here for the ZIPCODE CSV  file</a>. Download it to the root of C, just something simple.</p>
</li>
<li>Run the following SQL to create the ZipCode table in your database: </li>
</ol>
<p style="margin-bottom:0;color:rgb(0, 0, 102);">SET ANSI_NULLS ON<br />GO</p>
<p style="margin-bottom:0;color:rgb(0, 0, 102);">SET QUOTED_IDENTIFIER ON<br />GO</p>
<p style="margin-bottom:0;color:rgb(0, 0, 102);">SET ANSI_PADDING ON<br />GO</p>
<p style="margin-bottom:0;color:rgb(0, 0, 102);">CREATE TABLE [dbo].[ZipCode]<br />(<br />[ZipCode] [varchar](10) NOT NULL,<br />[Latitude] [varchar](50) NOT NULL,<br />[Longitude] [varchar](50) NOT NULL,<br />[City] [varchar](200) NOT NULL,<br />[State] [varchar](50) NOT NULL,<br />[County] [varchar](70) NOT NULL,<br />[ZipClass] [varchar](50) NOT NULL<br />) ON [PRIMARY]<br />GO</p>
<p style="margin-bottom:0;"></p>
<ol start="3">
<li>
<p style="margin-bottom:0;">Run the Bulk Insert command to  load the CSV file into the table:</p>
</li>
</ol>
<p style="margin-bottom:0;color:rgb(0, 0, 102);">BULK INSERT ZipCode<br />FROM &#8216;C:\zipcodes.txt&#8217;<br />WITH<br />(<br />FIELDTERMINATOR = &#8216;,&#8217;,<br />ROWTERMINATOR = &#8216;\n&#8217;<br />)<br />GO</p>
<p style="margin-bottom:0;"></p>
<p style="margin-bottom:0;">There ya go, you now have a free zip code table of all 42,000+ United States zip codes! Note that you might need to change the commas and &#8216; &#8216; marks; sometimes these characters are formatted differently when posted on the web and it can cause havoc in SQL because SQL does not recognize the characters. Just be prepared to change them!</p>
<p style="margin-bottom:0;">-Flea#</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=12&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/03/23/us-zip-code-table-for-sql-2005/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a scheduled task using PowerShell</title>
		<link>http://fleasharp.wordpress.com/2008/02/21/how-to-create-a-scheduled-task-using-powershell/</link>
		<comments>http://fleasharp.wordpress.com/2008/02/21/how-to-create-a-scheduled-task-using-powershell/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 20:57:00 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/2008/02/21/how-to-create-a-scheduled-task-using-powershell/</guid>
		<description><![CDATA[I found this insanely easy, thanks to some well written Microsoft documentation (shocking I know). If you need to create a scheduled task of an application in your PowerShell script you can call the Schtasks.exe application. Below is an example I used to create a scheduled task to run my exe every day at 1:00a.m. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=11&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found this insanely easy, thanks to some well written Microsoft documentation (shocking I know). If you need to create a scheduled task of an application in your PowerShell script you can call the Schtasks.exe application. Below is an example I used to create a scheduled task to run my exe every day at 1:00a.m. using the System account:</p>
<p><span style="color:#000099;">Write-Host &#8220;Creating Account Collector Scheduled Task&#8221;</span></p>
<p><span style="color:#000099;">Schtasks /create /sc DAILY /tn AccountCollector /tr &#8220;`&#8221;`&#8221;`&#8221;`&#8221;C:\Program Files\AMF\AMFCollector.exe`&#8221;`&#8221;`&#8221;`&#8221;"  /s devsbvm01 /ru System /st 01:00:00</span></p>
<p><span style="color:#000099;">Write-Host &#8220;Scheduled Task Created&#8221;</span></p>
<p>That&#8217;s it, works painlessly on a local or remote server, which in my example, devsbvm01 is my remote server.  Now, you might be wondering &#8220;whats with all the quotes?&#8221;. Well, I struggled for a long time trying to figure out why the scheduled task would be created but would never run. Turns out that the qoutes were being stripped out, thus causing the path to break. I know its sleazy, but turns out you need four sets of quotes in order to keep them from being stripped out! If anyone ever finds a better way, let me know but this seems to be it for now! So make sure you put those quotes in there!</p>
<p><a href="http://technet2.microsoft.com/windowsserver/en/library/1d284efa-9d11-46c2-a8ef-87b297c68d171033.mspx?mfr=true">Here is the link to the Microsoft tech net article that explains in great detail the Schtasks.exe application.</a></p>
<p>-Flea#</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=11&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/02/21/how-to-create-a-scheduled-task-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
		<item>
		<title>How to check if an object exists in a SQL 2005 Database</title>
		<link>http://fleasharp.wordpress.com/2008/02/13/how-to-check-if-an-object-exists-in-a-sql-2005-database/</link>
		<comments>http://fleasharp.wordpress.com/2008/02/13/how-to-check-if-an-object-exists-in-a-sql-2005-database/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 16:14:00 +0000</pubDate>
		<dc:creator>fleasharp</dc:creator>
				<category><![CDATA[SQL 2005]]></category>

		<guid isPermaLink="false">http://fleasharp.wordpress.com/2008/02/13/how-to-check-if-an-object-exists-in-a-sql-2005-database/</guid>
		<description><![CDATA[When executing some SQL code on an object in database such as a table, stored procedure, or view, it is important to check to see if these objects currently exist in the database. It is important because it makes your code more reusable, especially if multiple developers will be running it on their local databases. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=10&subd=fleasharp&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When executing some SQL code on an object in database such as a table, stored procedure, or view, it is important to check to see if these objects currently exist in the database. It is important because it makes your code more reusable, especially if multiple developers will be running it on their local databases. Here is a simple line of SQL you can run to find various objects in a SQL 2005 database.</p>
<p><span style="color:#ff6600;">How to check if an object exists in a SQL 2005 Database<br /></span><br /><span style="color:#000099;">if exists (select * from sys.objects where [object_id] = object_id(&#8216;the_name_of_your_object&#8217;))<br />begin<br />print &#8216;Hello World&#8217;<br />end</span><br /><span style="color:#000099;"></span><br /><span style="color:#ff6600;">How to check if a stored procedure exists in a SQL 2005 Database<br /></span><br />Say your Database contained several hundred stored procedures and you wanted to know if the stored procedure usp_GetNames existed. Simply run the following example from above:</p>
<p><span style="color:#000099;">if exists (select * from sys.objects where [object_id] = object_id(&#8216;dbo.usp_GetNames&#8217;) )<br />begin<br />print &#8216;Hello World&#8217;<br />end</span></p>
<p><span style="color:#ff6600;">How to check if a view exists in a SQL 2005 Database<br /></span><span style="font-size:130%;"></span><br />What if you wanted to create a new view called dbo.vw_OldCustomers, but wanted to see if that view existed before you created it? Again, run the same SQL code above.</p>
<p><span style="color:#000099;">if exists (select * from sys.objects where [object_id] = object_id(&#8216;dbo.vw_OldCustomers&#8217;) )<br />begin<br /><span style="color:#009900;">&#8211; Logic to create the view and populate it<br /></span>end</span><br /><span style="color:#000099;"></span><br /><span style="color:#000000;">-Flea#</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fleasharp.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fleasharp.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fleasharp.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fleasharp.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fleasharp.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fleasharp.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fleasharp.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fleasharp.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fleasharp.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fleasharp.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fleasharp.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fleasharp.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fleasharp.wordpress.com&blog=4021211&post=10&subd=fleasharp&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fleasharp.wordpress.com/2008/02/13/how-to-check-if-an-object-exists-in-a-sql-2005-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/56bf256062569a394637c3f7622d0670?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fleasharp</media:title>
		</media:content>
	</item>
	</channel>
</rss>