<?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>nPath Ltd. &#187; Uncategorized</title>
	<atom:link href="http://www.npathweb.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.npathweb.com</link>
	<description>Web Development Blog</description>
	<lastBuildDate>Tue, 10 Jan 2012 02:22:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Server Side Include messed up my layout</title>
		<link>http://www.npathweb.com/2012/01/09/server-side-include-messed-up-my-layout/</link>
		<comments>http://www.npathweb.com/2012/01/09/server-side-include-messed-up-my-layout/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:21:21 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=152</guid>
		<description><![CDATA[Here is what happened: I migrated some content to an SSI and when I viewed the page it was different. The file was SHTML. I had a div that was supposed to hug the top of the page. After, it was moved to SSI, it was pushed down 1 line. Tools Used: Fiddler Notepad ++ [...]]]></description>
			<content:encoded><![CDATA[<p>Here is what happened:</p>
<p>I migrated some content to an SSI and when I viewed the page it was different. The file was SHTML.</p>
<p>I had a div that was supposed to hug the top of the page. After, it was moved to SSI, it was pushed down 1 line.</p>
<p>Tools Used:</p>
<p>Fiddler<br />
Notepad ++</p>
<p>The cause:</p>
<p>Shtml SSI streams the bytes of the included file byte for byte. The included file was saved as UTF-8 With BOM.  The BOM bytes were being sent to the client and rendered as a space. A div following a space will move to the next line because a div is a block element.</p>
<p>I saw the extra bytes when I viewed the raw hex response in fiddler.<br />
When I used Notepad++ to save the file as UTF-8 without BOM the problem disappeared.</p>
<p>ASP server side includes don&#8217;t suffer from this, only SHTML.</p>
<p>For some reason I couldn&#8217;t find any sites on the web about this. The 24 hour hosting chat support were clueless. Save yourself some time and save include files as UTF-8 without BOM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2012/01/09/server-side-include-messed-up-my-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log4Net in a Windows Forms app (quick and easy)</title>
		<link>http://www.npathweb.com/2011/08/10/log4net-in-a-windows-forms-app-quick-and-easy/</link>
		<comments>http://www.npathweb.com/2011/08/10/log4net-in-a-windows-forms-app-quick-and-easy/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 15:33:59 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=136</guid>
		<description><![CDATA[This post will show you how get Log4Net working ASAP on a windows forms application. First, get Log4net. The easiest way to do this is to open the Tools, Library Package Manager, Package Manager Console then type Install-Package Log4Net Next add the log4net config to your App.config. WATCH OUT!   &#60;configSections&#62; must be the first child [...]]]></description>
			<content:encoded><![CDATA[<p>This post will show you how get Log4Net working ASAP on a windows forms application.</p>
<p>First, get Log4net.<br />
The easiest way to do this is to open the Tools, Library Package Manager, Package Manager Console then type<br />
Install-Package Log4Net</p>
<p>Next add the log4net config to your App.config.</p>
<p>WATCH OUT!  <span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px; white-space: pre;"> &lt;configSections&gt; must be the first child element of &lt;configuration&gt;</span></p>
<p>WATCH OUT!  Target the 4.0 framework. My project was defaulted to 4.0 Client Profile and would not build</p>
<pre>&lt;configSections&gt;
        &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821" /&gt;
     &lt;/configSections&gt;
    &lt;!-- Log4net Logging Setup --&gt;
    &lt;log4net debug="false"&gt;
        &lt;appender name="LogFileAppender" type="log4net.Appender.FileAppender,log4net" &gt;
            &lt;param name="File" value="Errors.log" /&gt;
            &lt;param name="AppendToFile" value="true" /&gt;
            &lt;layout type="log4net.Layout.PatternLayout,log4net"&gt;
                &lt;param name="ConversionPattern" value="%n%n%n%d [%t] %-5p %c  - %m%n%n" /&gt;
            &lt;/layout&gt;
        &lt;/appender&gt;
        &lt;root&gt;
            &lt;priority value="ALL" /&gt;
            &lt;appender-ref ref="LogFileAppender" /&gt;
        &lt;/root&gt;
        &lt;category name="DesktopLogger.Form1"&gt;
            &lt;priority value="ALL" /&gt;
        &lt;/category&gt;
    &lt;/log4net&gt;</pre>
<p>Notice this line</p>
<pre>&lt;param name="File" value="Errors.log" /&gt;</pre>
<p>I left the path off. That will put the log in the same folder where the executable was run from. We could set it to</p>
<p>value=&#8221;c:\\temp\\Errors.log&#8221;  or what ever you need.</p>
<pre></pre>
<p>Now that setup is complete we have three steps to using the logger. 1.) load the configuration 2.) create a log category 3.) log something  </p>
<pre>-----------------------</pre>
<p>1.) Load the configuration by calling</p>
<pre> log4net.Config.XmlConfigurator.Configure();</pre>
<p>on the line just before</p>
<p>InitializeComponent();</p>
<pre></pre>
<p>2.) Add the log category as a property of the form itself, not in a function</p>
<pre></pre>
<pre>    public partial class Form1 : Form
    {
        private readonly ILog log = LogManager.GetLogger("<span style="color: #0000ff;"><strong>YourAppName.Form1.cs</strong></span>");</pre>
<pre></pre>
<p>3.) Log errors by calling the Error method of your log object</p>
<pre>            int x = 10;
            int y = 10;
            try
            {
                int z= x/(y-10);
            }
            catch (Exception ex) {
              <strong>  <span style="color: #008000;">log.Error("<span style="color: #993300;">onload</span>", ex);</span></strong>
            }</pre>
<pre></pre>
<pre></pre>
<p>Lets look at the log file entry</p>
<pre>2011-08-10 11:07:14,584 [9] <span style="color: #000000;">ERROR</span> <span style="color: #0000ff;">YourAppName.Form1.cs </span> <span style="color: #993300;">- onload</span>

System.DivideByZeroException: Attempted to divide by zero.
   at ProPayMigration.Form1..ctor() in C:\dev\local\ProPayMigration\ProPayMigration\Form1.cs:line 60</pre>
<pre></pre>
<pre></pre>
<p><span style="color: #0000ff;">YourAppName.Form1.cs</span> is the category name we set when the log is initialized</p>
<p><span style="color: #993300;">onload</span> is the string I passed in when I called the method to create the entry</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2011/08/10/log4net-in-a-windows-forms-app-quick-and-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to read a POST&#8217;s raw data</title>
		<link>http://www.npathweb.com/2011/04/13/how-to-read-a-posts-raw-data/</link>
		<comments>http://www.npathweb.com/2011/04/13/how-to-read-a-posts-raw-data/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 00:04:47 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=130</guid>
		<description><![CDATA[I was tasked with accepting data posted from an AS400 to a web page. The only problem is that for some reason the Request.Form was empty. I&#8217;m not sure if this violates the RFC or not but I have to deal with it. Luckily I can adapt with a few short lines. It turns out [...]]]></description>
			<content:encoded><![CDATA[<p>I was tasked with accepting data posted from an AS400 to a web page. The only problem is that for some reason the Request.Form was empty. I&#8217;m not sure if this violates the RFC or not but I have to deal with it. Luckily I can adapt with a few short lines.</p>
<p>It turns out that this is caused by not using the correct content-type when the request was made. The request.form isn&#8217;t parsed unless the content-type is application/x-www-form-urlencoded.</p>
<p>The way to read the raw data is to read the Request&#8217;s InputStream.</p>
<p>Here are the steps.<br />
Create a stream and set it to the Reqest.InputStream<br />
Read it into a byte array<br />
Encode the Byte array to a string.</p>
<pre class="brush: php">
            string sPostData = String.Empty;
            if (Request.RequestType==&quot;POST&quot;)
            {
                System.IO.Stream myStream = Request.InputStream;

                // Read the file into the byte array.
                byte[] input = new byte[Request.InputStream.Length];
                myStream.Read(input, 0, (int)Request.InputStream.Length - 1);

                //encode to a string
                System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
                sPostData = enc.GetString(input);
            }
            if (sPostData!=string.Empty) {

               //parse and process away

            }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2011/04/13/how-to-read-a-posts-raw-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Garage Door Opener Stripped Gear-How do you remove a Roll Pin?</title>
		<link>http://www.npathweb.com/2010/02/18/garage-door-opener-stripped-gear-how-do-you-remove-a-roll-pin/</link>
		<comments>http://www.npathweb.com/2010/02/18/garage-door-opener-stripped-gear-how-do-you-remove-a-roll-pin/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 02:30:19 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Home Repair]]></category>
		<category><![CDATA[Roll Pin]]></category>
		<category><![CDATA[Roll Punch]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=105</guid>
		<description><![CDATA[Q: How do you remove a Roll Pin?
A: With a Craftsman Roll Punch from Sears ]]></description>
			<content:encoded><![CDATA[<p>Q: How do you remove a Roll Pin?<br />
A: With a Craftsman Roll Punch from Sears</p>
<p>After about 10 years my garage door quit working. After a couple of turns of the screw driver I see that the innerds are full of gear dust. My drive gear is stripped!</p>
<p>To fix or replace? That is the question. I quickly discover that a new gear is only $12 on ebay and that includes grease and free shipping. Done.</p>
<p>When it arrives I come to a step in the instructions that simply says &#8220;remove roll pin from under the drive gear&#8221;.</p>
<p>Hmm. That seems to be a problem. As it turns out you need a Roll Punch to remove a Roll Pin.  A tool which I do not own. Home Depot, no. Lowes, no.  Sears, scoreboard! $20 bucks.</p>
<p>My garage door opener is now in full repair.  I could probably return the set but I&#8217;ll probably need it in another 10 years.</p>
<div id="attachment_108" class="wp-caption alignleft" style="width: 310px"><a href="http://www.npathweb.com/wp-content/upLoads/2010/02/24020_1311802519449_1362221554_31082304_3306524_n.jpg"><img class="size-medium wp-image-108" title="drive gear" src="http://www.npathweb.com/wp-content/upLoads/2010/02/24020_1311802519449_1362221554_31082304_3306524_n-300x224.jpg" alt="" width="300" height="224" /></a><p class="wp-caption-text">Drive Gear Stripped</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2010/02/18/garage-door-opener-stripped-gear-how-do-you-remove-a-roll-pin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Watch out Chuck Norris! Scott Guthrie is in town!</title>
		<link>http://www.npathweb.com/2009/09/24/watch-out-chuck-norris-scott-guthrie-is-in-town/</link>
		<comments>http://www.npathweb.com/2009/09/24/watch-out-chuck-norris-scott-guthrie-is-in-town/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 16:09:29 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=79</guid>
		<description><![CDATA[Boosted from http://developerdeveloperdeveloper.com/guathon/Default.aspx Some things you might not know about Scott Guthrie When Scott Guthrie throws exceptions, it’s across the room. All arrays Scott Guthrie declares are of infinite size, because Scott Guthrie knows no bounds. Scott Guthrie doesn’t have disk latency because the hard drive knows to hurry up. Scott Guthrie writes code that [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Boosted from <a href="http://developerdeveloperdeveloper.com/guathon/Default.aspx">http://developerdeveloperdeveloper.com/guathon/Default.aspx</a></em></strong></p>
<p><strong><em>Some things you might not know about Scott Guthrie</em></strong></p>
<ol>
<li>When Scott Guthrie throws exceptions, it’s across the room.</li>
<li>All arrays Scott Guthrie declares are of infinite size, because Scott Guthrie knows no bounds.</li>
<li>Scott Guthrie doesn’t have disk latency because the hard drive knows to hurry up.</li>
<li>Scott Guthrie writes code that optimizes itself.</li>
<li>Scott Guthrie can’t test for equality because he has no equal.</li>
<li>Scott Guthrie doesn’t need garbage collection because he doesn’t call .Dispose(), he calls .DropKick().</li>
<li>Scott Guthrie’s first program was kill -9.</li>
<li>Scott Guthrie burst the dot com bubble.</li>
<li>All browsers support the hex definitions #scott and #guthrie for the colors black and blue.</li>
<li>MySpace actually isn’t your space, it’s Scott’s (he just lets you use it).</li>
<li>Scott Guthrie can write infinite recursion functions &#8230; and have them return.</li>
<li>Scott Guthrie can solve the Towers of Hanoi in one move.</li>
<li>The only pattern Scott Guthrie knows is God Object.</li>
<li>Scott Guthrie finished World of Warcraft.</li>
<li>Project managers never ask Scott Guthrie for estimations &#8230; ever.</li>
<li>Scott Guthrie doesn’t use web standards as the web will conform to him.</li>
<li>“It works on my machine” always holds true for Scott Guthrie.</li>
<li>Whiteboards are white because Scott Guthrie scared them that way.</li>
<li>Scott Guthrie doesn’t do Burn Down charts, he does Smack Down charts.</li>
<li>Scott Guthrie can delete the Recycling Bin.</li>
<li>Scott Guthrie’s red polo shirt can type 140 wpm.</li>
<li>Scott Guthrie can unit test entire applications with a single assert.</li>
<li>Scott Guthrie doesn’t bug hunt as that signifies a probability of failure, he goes bug killing.</li>
<li>Scott Guthrie’s keyboard doesn’t have a Ctrl key because nothing controls Scott Guthrie.</li>
<li>When Scott Guthrie is web surfing, websites get the message “Warning: Internet Explorer has deemed this user to be malicious or dangerous. Proceed?”.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/09/24/watch-out-chuck-norris-scott-guthrie-is-in-town/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My job hunt brain-dump</title>
		<link>http://www.npathweb.com/2009/09/07/my-job-hunt-brain-dump/</link>
		<comments>http://www.npathweb.com/2009/09/07/my-job-hunt-brain-dump/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 04:27:58 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=71</guid>
		<description><![CDATA[A couple of weeks ago I began working as a Web Developer for the American Motorcyclist Association. To me this is a big deal because I have the actual title of &#8220;Web Developer&#8221;. I love it. It&#8217;s a dream job. Nice people, nice gear, nice facilities and they have an adequate budget, I get benefits [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I began working as a Web Developer for the American Motorcyclist Association. To me this is a big deal because I have the actual title of &#8220;Web Developer&#8221;. I love it. It&#8217;s a dream job. Nice people, nice gear, nice facilities and they have an adequate budget, I get benefits and paid over time. WooHoo! Getting here has been a bit of a journey. I&#8217;ve just come off a 3 month period of un-employment. It was hell but everything turned out well in the end.</p>
<p>10%+  of the population is still unemployed in my state so if you are in a similar situation here is what I have learned:</p>
<p>1.) Get as many interviews as possible. Each interview is valuable experience and practice. If you mess up learn from it and fix it next time.  An introvert like me needs lots of practice. Take any one you can get even if you know you don&#8217;t want that particular job.</p>
<p>2.) Sell yourself! The first half of the interview is usually them explaining the job and selling it to you. If you want the job you need to explain how your skills make you a good fit. It sounds simple and obvious but if you want the job ask for it. Enthusiasm is a good thing. Act like your selling the Sham-Wow.</p>
<p>3.) DO NOT B.S. If they ask you a question and you don&#8217;t know the answer, say so.  If you answer wrong it&#8217;s over in their mind. I fudged some answers in an interview once and there was an email rejection letter in my in-box by the time I got home. Some interviewers suck at interviewing and rely on technical questions. That&#8217;s probably a red flag but still don&#8217;t B.S.</p>
<p>4.) Wear a suit and get a hair cut. Hopefully this goes without saying but you never know. You need to look like a professional. The company is about to invest a lot of money in you. You need to look like you have it together.</p>
<p>5.) Be early. Get there 15 minutes early. The interview is probably your first impression. Don&#8217;t blow it. Mapquest the route the night before, get a Garmin, what ever. Take extra copies of your resume and have references printed up and ready.</p>
<p>6.)  Don&#8217;t rely on monster. If you see a posting on Monster or dice use it as a lead.  Try to figure out the  company&#8217;s website based on their  email domain.  Go to their website, look up the HR director and call them . Ask to speak with the hiring manager.  Get on that phone.</p>
<p>7.) Craig&#8217;s list is your friend. I was surprised to find out how many good jobs were posted on Craig&#8217;s list. It makes sense though I guess. Craig&#8217;s list is free. Monster costs hundreds of dollars. I found my job though Craig&#8217;s list.</p>
<p>8.)LinkedIn. Recruiters are now starting to use LinkedIn to find people. Make sure your on it. Get some references out there.</p>
<p>9.) Get good at the cover letter. Download as many examples as you can find. Study them and master the cover letter. It&#8217;s just as important as your resume. This, for me, was why job hunting was a full time job. Each resume sent should have a custom written cover  letter explaining how you are a good fit for the posting.</p>
<p>10.) Have an answer. When you are asked a question in an interview, answer it in specifics. For example &#8220;what kind of environment are you looking for?&#8221;. &#8220;Any kind&#8221; is a bad answer. This is where doing your home work comes in.  If it&#8217;s a big shop you don&#8217;t want to say you are looking for something small. But it&#8217;s more about confidence than anything.</p>
<p>11.) Be ready for rejection. It&#8217;s bound to happen so don&#8217;t let it get you down. Interviewing is hard on both sides.  Just do the best you can, be confident, be positive. Try to learn from every failure. It&#8217;s not enought to say the guy interviewing you was an idiot. You have to develop an idiot strategy for the next time you come across one.No matter how well you do, you could have none better. More eye contact, less mono-tone, firmer handshake, act less nervous, something&#8230;</p>
<p>12.) There is such a thing as over-qualified. When things get really bleak you may find yourself looking at jobs you are over qualified for. I would try to avoid that. They are likely to reject you. It defies logic! I got rejected for every single job I was overqualified for. Many times I was more qualified that the hiring manager. If you  are  trying to downgrade your job and settle for something you may want to alter your resume.  Leave off the Master&#8217;s degree if you applying for a level-one help desk job. There&#8217;s nothing wrong with getting a little desperate when money is tight but it led to a lot of disappointment for me.</p>
<p>Well that&#8217;s it. I hope nobody needs any of this. If you do, Best of luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/09/07/my-job-hunt-brain-dump/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>switch to ssl automatically</title>
		<link>http://www.npathweb.com/2009/02/05/switch-to-ssl-automatically/</link>
		<comments>http://www.npathweb.com/2009/02/05/switch-to-ssl-automatically/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:04:06 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[VB.Net]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/blog/?p=21</guid>
		<description><![CDATA[In this post I&#8217;ll explain how I transparently switch from http to https This same snipit can be put on any page as is and forces certain pages to be https. The nice thing about it is that the user can not edit the url back to http on a page that has this. All [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;ll explain how I transparently switch from http to https</p>
<p>This same snipit can be put on any page as is and forces certain pages to be https. The nice thing about it is that the user can not edit the url back to http on a page that has this. All I did was put it on the login page and payment page.</p>
<p>On page load the server examines the Request.IsSecureConnection flag and redirects if not secure. It&#8217;s that simple. To make it a re-useble snipit I get the page name dynamically.</p>
<p>Be sure not to include the slash after your top level domain.</p>
<p><span style="font-size: x-small;"> </span></p>
<p><span style="color: #0000ff; font-size: x-small;">If</span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;">Not</span><span style="font-size: x-small;"> Page.IsPostBack </span><span style="color: #0000ff; font-size: x-small;">Then</span></p>
<p><span style="font-size: x-small;"> </span></p>
<p><span style="color: #0000ff; font-size: x-small;"> If</span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;">Not</span><span style="font-size: x-small;"> Request.IsSecureConnection </span><span style="color: #0000ff; font-size: x-small;">Then</span></p>
<p><span style="font-size: x-small;"> </span></p>
<p><span style="font-size: x-small;"> Response.Redirect(</span><span style="color: #800000; font-size: x-small;">&#8220;https://www.yourhostname.com&#8221;</span><span style="font-size: x-small;"> &amp; Request.Url.PathAndQuery.ToString)</span></p>
<p><span style="color: #0000ff; font-size: x-small;"> End</span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;">If</span></p>
<p><span style="font-size: x-small;"> </span></p>
<p><span style="color: #0000ff; font-size: x-small;">End</span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;">If</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/05/switch-to-ssl-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Css to center a div</title>
		<link>http://www.npathweb.com/2009/02/05/use-css-to-center-a-div/</link>
		<comments>http://www.npathweb.com/2009/02/05/use-css-to-center-a-div/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:57:52 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/blog/?p=16</guid>
		<description><![CDATA[Using tables to layout a page is considered outdated. The &#8220;new&#8221; way to do it is with Div tags a alot of Cascading Style Sheets. To center a table is easy. You just set align=&#8221;center&#8221;. But what about when using the new way? When you want to center a div in the middle of the [...]]]></description>
			<content:encoded><![CDATA[<p>Using tables to layout a page is considered outdated. The &#8220;new&#8221; way to do it is with Div tags a alot of Cascading Style Sheets.</p>
<p>To center a table is easy. You just set align=&#8221;center&#8221;. But what about when using the new way?</p>
<p>When you want to center a div in the middle of the page use either a style or a css class to set the following attibutes:</p>
<p>width: a fixed width;<br />
margin-right:auto;<br />
margin-left:auto;</p>
<p><em>Note this tip is only for horizontal alignment. Centering vertically will be discussed in a future post.</em></p>
<p>example:</p>
<p><span style="font-family: Courier New;">&lt;div style=&#8221;width:600px; margin-left:auto; margin-right:auto;&#8221;&gt;</span></p>
<p><span style="font-family: Courier New;">Hello Middle.</span></p>
<p><span style="font-family: Courier New;">&lt;/div&gt;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/05/use-css-to-center-a-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the deal with flash videos not working?</title>
		<link>http://www.npathweb.com/2009/02/05/whats-the-deal-with-flash-videos-not-working/</link>
		<comments>http://www.npathweb.com/2009/02/05/whats-the-deal-with-flash-videos-not-working/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:56:09 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash Video]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Windows Server 2003]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/blog/?p=13</guid>
		<description><![CDATA[A few of my clients have used flash videos in their pages. Out of the box this didn&#8217;t work on my server. It was fine in the development environment but once uploaded to production it was a no go. The video just never appeared.  It&#8217;s been a while since I learned this trick but it recently [...]]]></description>
			<content:encoded><![CDATA[<p>A few of my clients have used flash videos in their pages. Out of the box this didn&#8217;t work on my server. It was fine in the development environment but once uploaded to production it was a no go. The video just never appeared.  It&#8217;s been a while since I learned this trick but it recently popped up again so I figure I sould blog it.</p>
<p>On a windows server running IIS flash . swf files that play .flv videos need to have a setting configured in IIS.</p>
<p>You must set MIME type to associate the .flv extention with video.</p>
<p>Specifically you set .flv=video/x-flv</p>
<p>So how do you do it?</p>
<p>For these instructions you need access to the server&#8217;s desktop to implement this tweek. A savy IT person with the right access can do this without remote desktop but I&#8217;ll keep it simple.</p>
<ul>
<li>Right click &#8220;My computer&#8221;</li>
<li>Select &#8220;Manage&#8221; , microsoft management console will load with several snap-ins ready to go</li>
<li>Expand the services and applications node</li>
<li>Expand the Internet Infomation Servicess (IIS) Manager node</li>
<li>Expand the Web Sites node</li>
<li>Right click the web site you want to configure</li>
<li>Select Properties. The site&#8217;s property sheets will appear.</li>
<li>Click the HTTP Headers tab</li>
<li>Click the Mime Types button</li>
<li>Click the New button</li>
<li>in the extention box type &#8220;flv&#8221;</li>
<li>in the MIME Type box type &#8220;video/x-flv&#8221;</li>
<li>Click OK, OK, OK</li>
</ul>
<p>So what is MIME and why do we have to do this? Who cares, it works! Just kidding.  MIME types tell the browser what application to use with a certain file extention. In this case the server is telling the browser to use the flash player to handle flv files.</p>
<p>-edit on IIS7 the mimetype for flv is correct.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/05/whats-the-deal-with-flash-videos-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically reboot an unresponsive Windows Server</title>
		<link>http://www.npathweb.com/2009/02/05/automatically-reboot-an-unresponsive-windows-server/</link>
		<comments>http://www.npathweb.com/2009/02/05/automatically-reboot-an-unresponsive-windows-server/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:54:14 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Windows Automation]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/blog/?p=11</guid>
		<description><![CDATA[My servers are leased so if anything goes wrong and a reboot is needed I have to wait for my provider to preform it. In this post we will create a vb Script that pings an IP address and reboots if it can&#8217;t see it. We will simply run it on a timer using the [...]]]></description>
			<content:encoded><![CDATA[<p>My servers are leased so if anything goes wrong and a reboot is needed I have to wait for my provider to preform it.</p>
<p>In this post we will create a vb Script that pings an IP address and reboots if it can&#8217;t see it. We will simply run it on a timer using the command scheduler.</p>
<p>Here is the script:</p>
<p>Option Explicit</p>
<p>dim strHost</p>
<p>&#8216;The ip address you want to monitor<br />
strHost=&#8221;111.222.333.444&#8243;</p>
<p>if Ping(strHost) = True then</p>
<p>&#8216;You can do stuff here if you want.</p>
<p>Else</p>
<p>&#8216;The next three lines reboot</p>
<p>dim objShell<br />
Set objShell = CreateObject(&#8220;WScript.Shell&#8221;)<br />
objShell.Run &#8220;shutdown /r /t 000&#8243;</p>
<p>end if</p>
<p>&#8216;the following is a subroutine called above</p>
<p>Function Ping(strHost)</p>
<p>dim objPing, objRetStatus</p>
<p>set objPing = GetObject(&#8220;winmgmts:{impersonationLevel=impersonate}&#8221;).ExecQuery(&#8220;select * from Win32_PingStatus where address = &#8216;&#8221; &amp; strHost &amp; &#8220;&#8216;&#8221;)</p>
<p>for each objRetStatus in objPing<br />
if IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode&lt;&gt;0 then</p>
<p>Ping = False</p>
<p>else<br />
Ping = True<br />
end if<br />
next<br />
End Function</p>
<p>Just save this to a vbs file and add</p>
<p>cscript c:\ping.vbs</p>
<p>to &#8220;Scheduled tasks&#8221; every 15 minutes.</p>
<p>&#8216;Till next time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/05/automatically-reboot-an-unresponsive-windows-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

