<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Chris Blankenship's Ramblings</title>
    <description>Information from my work and daily life</description>
    <link>http://www.dscoduc.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.0.9</generator>
<language>en-US</language><blogChannel:blogRoll>http://www.dscoduc.com/opml.axd</blogChannel:blogRoll><blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink><dc:creator>Chris Blankenship</dc:creator><dc:title>Chris Blankenship's Ramblings</dc:title><geo:lat>33.202460</geo:lat><geo:long>-117.360800</geo:long><geo:lat>33.202463</geo:lat><geo:long>-117.360774</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DSCODUC" type="application/rss+xml" /><item><title>Collapsible Widgets Extension</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;Tonight I was looking at the Widget framework on BlogEngine.NET and decided that it really needed the ability to have collapsible sections.&amp;#160; Similar to how my blog is currently configured, sections can be expanded and/or collapsed in order to allow the reader to hide info that is of no interest to them.&amp;#160; Often I go to someone’s blog and find so many things on the page that I get overwhelmed.&lt;/p&gt;  &lt;p&gt;I found the meat of the Widget framework contained in the WidgetBase.cs.&amp;#160; All I had to do was to reconfigure how the widget was rendered by this class and then the magic of JavaScript and style would take care of the rest.&amp;#160; So first I had to update a section of the Render routine in the ~/App_Code/Controls/WidgetBase.cs file from the following…&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:f3c540b8-4006-41f2-bcd0-f4f7fc0e75fc" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#"&gt;if (ShowTitle)
  sb.Append("&amp;lt;h4&amp;gt;" + Title + "&amp;lt;/h4&amp;gt;");
else
  sb.Append("&amp;lt;br /&amp;gt;");

sb.Append("&amp;lt;div class=\"content\"&amp;gt;");
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;…to include the following…&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:46105e4f-5a0f-41f2-8fa2-350bd9059b23" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#"&gt;if (ShowTitle) {
  sb.Append("&amp;lt;h4&amp;gt;");
  sb.Append("&amp;lt;a title=\"Click to collapse or expand this item\" onclick=\"return webpartToggleExpansionStatus('" + Title + "');\" class=\"webpartToggleLink\" href=\"javascript:void(0)\"&amp;gt;");
  sb.Append(Title);
  sb.Append("&amp;lt;img id=\"" + Title + "Image\" style=\"vertical-align: bottom;\" title=\"Click to collapse or expand this item\" alt=\"exp/col\" src=\"" + Utils.RelativeWebRoot + "pics/up.png\" border=\"0\" /&amp;gt;");
  sb.Append("&amp;lt;/a&amp;gt;");
  sb.Append("&amp;lt;/h4&amp;gt;");
}
else { 
  sb.Append("&amp;lt;br /&amp;gt;"); }

sb.Append("&amp;lt;div class=\"content\" id=\"" + Title + "Panel\" class=\"webpartExpanded\" &amp;gt;");&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Once this was done it was necessary to load the style and script components.&amp;#160; To accomplish this I just created an Extension that will automatically add the information to the page during the render process.&amp;#160; Lastly I needed to add a couple of images into the ~/pics folder that will reflect whether you can expand or collapse a widget.&lt;/p&gt;

&lt;p&gt;With those few steps you can get the basics of the functionality.&amp;#160; I plan on working more with this feature to allow for writing the user preferences into a cookie for return visits, and adding the ability to individually choose which sections are collapsed and which are expanded by default.&lt;/p&gt;

&lt;p&gt;So tell me, is this useful to anyone other than me?&amp;#160; Is this worth the time spent, and more importantly… would anyone want and/or use the suggested improvements I just mentioned?&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:47b19ec6-c021-400b-b414-18fa3fdd918c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="https://www.dscoduc.com/file.axd?file=WindowsLiveWriter/CollapsibleWidgetsExtension_3AE/DropDownWidget.zip" target="_blank"&gt;DropDownWidget.zip&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=5xBMwJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=5xBMwJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=CI4RqJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=CI4RqJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=9mWJMJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=9mWJMJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=1phpBJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=1phpBJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/15/Collapsible-Widgets-Extension.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/07/15/Collapsible-Widgets-Extension.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=9c91646d-597d-4ecc-a8bb-a2e772b3de92</guid><pubDate>Tue, 15 Jul 2008 00:15:43 -0700</pubDate><category>BlogEngine.NET</category><category>Extension</category><category>Technology</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=9c91646d-597d-4ecc-a8bb-a2e772b3de92</pingback:target><slash:comments>1</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=9c91646d-597d-4ecc-a8bb-a2e772b3de92</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/15/Collapsible-Widgets-Extension.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=9c91646d-597d-4ecc-a8bb-a2e772b3de92</wfw:commentRss></item><item><title>Update to SyntaxHighlighter Extension</title><description>&lt;p&gt;After upgrading to BE 1.4.15 I noticed a javascript popped up on my site.&amp;#160; Looking futher into the errors it became clear the problem was related to the &lt;a href="https://www.dscoduc.com/post/2008/05/01/SyntaxHighlighter-Extension-for-BlogEngineNET.aspx" target="_blank"&gt;SyntaxHighlighter extension&lt;/a&gt;.&amp;#160; I did some digging and the root cause of the problem lies in the Javascript Handler built into BE.&amp;#160; I tried to follow what’s going on inside the StripWhitespace methods but soon ran out of patience.&amp;#160; I will post an issue on the BE issues page but for now I need things to work.&amp;#160; So after making some slight changes to the SyntaxHighlighter extension it is again ready for prime time.&amp;#160; &lt;/p&gt;  &lt;p&gt;Specifically I changed the following line:&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:bd6c6520-0123-498e-a2f3-e6d6e372b264" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#:nogutter"&gt;return Utils.RelativeWebRoot + "js.axd?path=" + Utils.RelativeWebRoot + url;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;with the following syntax:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:52ef4621-9ce3-473f-9b6a-cf054812fb83" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#:nogutter"&gt;return Utils.RelativeWebRoot + HttpUtility.UrlEncode(url);&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And that was all that is needed to get things working again.&amp;#160; I have previously mentioned that &lt;a href="http://www.dscoduc.com/post/2008/05/Grab-it-by-the-Handlers.aspx" target="_blank"&gt;using web handlers&lt;/a&gt; is a better way to write code, but that only applies if things work.&lt;/p&gt;

&lt;p&gt;One thing worth mentioning is that the SyntaxHighlighter JavaScript files are already compressed so the only real thing we are loosing out on by not using the JavaScript handler is the server side caching.&amp;#160; I will keep trying to figure out the issue with the JavaScript that is causing a problem with the web handler but for now just update your ~/App_Code/ExtensionsSyntaxHighlighter.cs file and you should be good to go.&amp;#160; Or you can just &lt;a href="http://www.dscoduc.com/file.axd?file=SyntaxHighlighter.rar" target="_blank" rel="enclosure"&gt;download the extension&lt;/a&gt; again and it will include the change.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=BixuLJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=BixuLJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=tsfCQJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=tsfCQJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=MzpsAJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=MzpsAJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=j4KVVJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=j4KVVJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/14/Update-to-SyntaxHighlighter-Extension.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/07/14/Update-to-SyntaxHighlighter-Extension.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=cc83f9e6-d539-42ba-bcb3-c58dbbb42b0a</guid><pubDate>Mon, 14 Jul 2008 16:08:18 -0700</pubDate><category>BlogEngine.NET</category><category>Extension</category><category>Technology</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=cc83f9e6-d539-42ba-bcb3-c58dbbb42b0a</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=cc83f9e6-d539-42ba-bcb3-c58dbbb42b0a</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/14/Update-to-SyntaxHighlighter-Extension.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=cc83f9e6-d539-42ba-bcb3-c58dbbb42b0a</wfw:commentRss></item><item><title>Look twice, click once</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;This morning an update screen welcomed me on my computer.&amp;#160; Apple was nice enough to let me know that ITunes 7.7 has released and that I should update to this version.&amp;#160; That’s very helpful.&amp;#160; I was just about to install the update when I focused in on the installer menu.&amp;#160; In it included the addition of Safari.&amp;#160; Not in the Updates section but in the “New Software” section.&amp;#160; I didn’t go looking to install the Safari browser but Apple felt it was necessary to add this to my “Update” as a default setting.&amp;#160; Had I just accepted the default installation I would have been installing the Safari browser.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/9c53e2e68000_8192/image_4.png" rel="lightbox"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; margin: 5px 0px; border-left: 0px; border-bottom: 0px" height="484" alt="image" src="https://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/9c53e2e68000_8192/image_thumb_1.png" width="376" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now hold on, this isn’t an entry about Safari.&amp;#160; It’s not even all that much about Apple.&amp;#160; It’s more about how companies try and slide things into updates that you may or may not want.&amp;#160; I noticed this same behavior with the Google Toolbar.&amp;#160; This action of hiding new additions to updates is just dishonest.&amp;#160; It would have been honest for Apple to insert an advertisement about how wonderful Safari is (just click this link to install the latest version…).&amp;#160; But this isn’t the path they chose and it’s really sad.&lt;/p&gt;  &lt;p&gt;So the morale of this story is that you need to look at the installer options twice (to find those pesky additional “features”) and click the install button once.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=dRuPqJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=dRuPqJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=iMeOYJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=iMeOYJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=tImd4J"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=tImd4J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=gvvszJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=gvvszJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/14/Look-twice-click-once.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/07/14/Look-twice-click-once.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=1062d5c8-a04b-42ea-815e-cce54f40eb19</guid><pubDate>Mon, 14 Jul 2008 09:27:39 -0700</pubDate><category>Technology</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=1062d5c8-a04b-42ea-815e-cce54f40eb19</pingback:target><slash:comments>1</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=1062d5c8-a04b-42ea-815e-cce54f40eb19</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/14/Look-twice-click-once.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=1062d5c8-a04b-42ea-815e-cce54f40eb19</wfw:commentRss></item><item><title>Switched to a Hosting Provider</title><description>&lt;p&gt;
Well the time finally came that I decided to move my blog over to a hosting company.&amp;nbsp; This hasn&amp;rsquo;t been my choice from the beginning because I don&amp;rsquo;t like the restrictions (Medium Trust) that most web hosting companies require.&amp;nbsp; I have investigated the cost of a dedicated server and/or a Virtual Server but up till now it has been too expensive.
&lt;/p&gt;
&lt;p&gt;
That is until now&amp;hellip;&amp;nbsp; I became aware of a &lt;a rel="Friend" href="http://vforvictory.dotdotdotdash.org/" target="_blank" title="V for Victory"&gt;friends blog&lt;/a&gt; who uses 1&amp;amp;1 Internet Inc. hosting services.&amp;nbsp; I looked over the usual Web hosting services and noticed their Medium restrictions policy.&amp;nbsp; But then I had a peek at their &lt;a href="http://order.1and1.com/xml/order/VpsWindows;jsessionid=C769B1DDEAF51A24F48A831F8C3F24C7.TC60a?__frame=_top&amp;amp;__lf=Static" target="_blank"&gt;Virtual Private Servers (VPS) pricing&lt;/a&gt; and I was amazed.&amp;nbsp; A virtual server that I can &amp;ldquo;own&amp;rdquo; for as little as $29 per month.&amp;nbsp; Whoa, that&amp;rsquo;s a great price.&amp;nbsp; By owning a VPS I can install FreeSSHD for secure file copies, custom user controls and extensions, SSL certificates, and almost anything else I want to add to the server.&amp;nbsp; With a little skepticism I decided to sign up and give it a try.
&lt;/p&gt;
&lt;p&gt;
I am happy to say that my blog has been on 1&amp;amp;1 for over two weeks and everything has been working great.&amp;nbsp; There was an initial hiccup during the initial setup but since then things have been good.&amp;nbsp; A couple of support emails were promptly returned and I was back online in no time.
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.1and1.com/?k_id=19145895" target="_blank"&gt;&lt;img src="http://banner.1and1.com/xml/banner?size=2%26%number=1" border="0" alt="Banner" width="468" height="60" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
So if you are more inclined to have your very own web server instead of just basic web hosting I would encourage you to give them a try.&amp;nbsp; You might even be so inclined to click on the banner in this entry so that I can get a referral credit.&amp;nbsp; If you do then thank you!
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=J7cwrJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=J7cwrJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=zrMorJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=zrMorJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=3ICPmJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=3ICPmJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=ttb0NJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=ttb0NJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/09/Switched-to-a-Hosting-Provider.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/07/09/Switched-to-a-Hosting-Provider.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=8cb54d35-88c3-4043-bd00-00f3f4ed0d7b</guid><pubDate>Wed, 09 Jul 2008 23:40:00 -0700</pubDate><category>Technology</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=8cb54d35-88c3-4043-bd00-00f3f4ed0d7b</pingback:target><slash:comments>2</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=8cb54d35-88c3-4043-bd00-00f3f4ed0d7b</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/09/Switched-to-a-Hosting-Provider.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=8cb54d35-88c3-4043-bd00-00f3f4ed0d7b</wfw:commentRss></item><item><title>Secure Blogging Revisited</title><description>&lt;p&gt;If you have been following my blog you might have seen a previous post titled &lt;a href="http://www.dscoduc.com/post/2008/03/18/Secure-Blogging.aspx" target="_blank"&gt;Secure Blogging&lt;/a&gt;…&amp;#160; In this entry I talked about the changes I made to BlogEngine.DLL to support SSL connections for MetaWeblogAPI calls.&amp;#160; These changes were proposed to Mads for inclusion in the next version of BlogEngine.Net.&amp;#160; I was disheartened to learn that 1.4.0 did not include the changes.&amp;#160; I decided to press ahead with the upgrade and would follow up with a custom BlogEngine.dll file to include my changes.&amp;#160; Unfortunately I haven’t had time to update the core dll file… &lt;/p&gt;  &lt;p&gt;Imagine my surprise when I noticed that BlogEngine.Net v1.4.0.4 and above includes the suggested MetaWeblogAPI changes.&amp;#160; This is fantastic news!&amp;#160; Check it out… You can see the Settings tab now includes the “Require SSL for MetaWeblog API option. &lt;/p&gt;  &lt;p align="center"&gt;&lt;img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="173" alt="image" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/SecureBloggingRevisited_14590/image_3.png" width="737" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;So after upgrading my site you can clearly see that I have upgraded to a later build by connecting to the &lt;a href="http://www.dscoduc.com/rsd.axd" target="_blank" rel="nofollow"&gt;RSD.AXD&lt;/a&gt; address.&amp;#160; Here you will see the following details:&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:10fcbfbb-765c-4490-8c3d-b51610d6a280" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt; 
  &amp;lt;rsd version="1.0"&amp;gt; 
    &amp;lt;service&amp;gt;  
      &amp;lt;engineName&amp;gt;BlogEngine.NET 1.4.0.9&amp;lt;/engineName&amp;gt;
      &amp;lt;engineLink&amp;gt;http://dotnetblogengine.com&amp;lt;/engineLink&amp;gt;
      &amp;lt;homePageLink&amp;gt;http://www.dscoduc.com/&amp;lt;/homePageLink&amp;gt;
      &amp;lt;apis&amp;gt;
        &amp;lt;api name="MetaWeblog" preferred="true" apiLink="https://www.dscoduc.com/metaweblog.axd" blogID="http://www.dscoduc.com/" /&amp;gt;
        &amp;lt;api name="BlogML" preferred="false" apiLink="http://www.dscoduc.com/api/BlogImporter.asmx" blogID="http://www.dscoduc.com/" /&amp;gt;
      &amp;lt;/apis&amp;gt;
    &amp;lt;/service&amp;gt;
  &amp;lt;/rsd&amp;gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The sharp eyes will notice that my MetaWeblog tag includes anapiLink with HTTPS instead of HTTP.&amp;#160; Now I can be assured that my password isn’t being sent over the internet in the clear.&amp;#160; Sweet! &lt;/p&gt;

&lt;p&gt;This is awesome news and I would encourage everyone concerned about sending passwords in clear text to leverage this option.&amp;#160; Keep in mind that you will need a SSL certificate on your site for this option to work.&amp;#160; To help with that I would recommend looking at some of my previous posts:&amp;#160; &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www.dscoduc.com/post/2007/10/23/The-Joy-of-SelfSSL.aspx" target="_blank"&gt;The Joy of SelfSSL&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a title="Unencrypted login to BlogEngine.Net" href="http://www.dscoduc.com/post/2007/11/28/Unencrypted-login-to-BlogEngineNet.aspx"&gt;Unencrypted login to BlogEngine.Net&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a title="The High Cost of Secure Websites" href="http://www.dscoduc.com/post/2007/10/29/The-High-Cost-of-Secure-Websites.aspx"&gt;The High Cost of Secure Websites&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=GdXHPJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=GdXHPJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=LIDrZJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=LIDrZJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=rxhHeJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=rxhHeJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=IXY7ZJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=IXY7ZJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/09/Secure-Blogging-Revisited.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/07/09/Secure-Blogging-Revisited.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=62b38f94-3d36-49ab-bdf8-10edf4b14b73</guid><pubDate>Wed, 09 Jul 2008 23:14:00 -0700</pubDate><category>BlogEngine.NET</category><category>Security</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=62b38f94-3d36-49ab-bdf8-10edf4b14b73</pingback:target><slash:comments>1</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=62b38f94-3d36-49ab-bdf8-10edf4b14b73</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/09/Secure-Blogging-Revisited.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=62b38f94-3d36-49ab-bdf8-10edf4b14b73</wfw:commentRss></item><item><title>Not ready for Change...</title><description>&lt;p&gt;
Perhaps this isn&amp;#39;t the kind of change that I am ready to believe in... 
&lt;/p&gt;
&lt;p&gt;
&amp;quot;You need to make sure that your child can speak Spanish&amp;quot;, Barack Obama 
&lt;/p&gt;
&lt;div&gt;
&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="425" height="344"&gt;
	&lt;param name="width" value="425" /&gt;
	&lt;param name="height" value="344" /&gt;
	&lt;param name="allowfullscreen" value="true" /&gt;
	&lt;param name="src" value="http://www.youtube.com/v/BZprtPat1Vk&amp;amp;hl=en&amp;amp;fs=1" /&gt;
	&lt;embed type="application/x-shockwave-flash" width="425" height="344" allowfullscreen="true" src="http://www.youtube.com/v/BZprtPat1Vk&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=o0OnHJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=o0OnHJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=Ka9HoJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=Ka9HoJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=sHX1bJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=sHX1bJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=mWccRJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=mWccRJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/09/Not-ready-for-Change.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/07/09/Not-ready-for-Change.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=a738d74b-abcc-4886-afa2-7c28478b1d44</guid><pubDate>Wed, 09 Jul 2008 08:50:00 -0700</pubDate><category>General</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=a738d74b-abcc-4886-afa2-7c28478b1d44</pingback:target><slash:comments>2</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=a738d74b-abcc-4886-afa2-7c28478b1d44</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/09/Not-ready-for-Change.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=a738d74b-abcc-4886-afa2-7c28478b1d44</wfw:commentRss></item><item><title>Using IIF in VBScript</title><description>&lt;p&gt;While writing code in Visual Basic.NET I frequently use the IIF Function.&amp;#160; Reading the &lt;a href="http://msdn.microsoft.com/en-us/library/27ydhh0d(VS.71).aspx" target="_blank"&gt;MSDN definition of IIF&lt;/a&gt; tells you that IIF returns one of two objects, depending on the evaluation of an expression.&amp;#160; Quite the handy function indeed.&amp;#160; Recently I was writing some VBScript code and wanted to use IIF but found it doesn’t exist in VBScript.&amp;#160; Well a quick look around and &lt;a href="http://www.4guysfromrolla.com/ASPScripts/PrintPage.asp?REF=%2Fwebtech%2Ftips%2Ft041301-1.shtml" target="_blank"&gt;I found a function at 4guysfromrolla&lt;/a&gt; that can be used in VBScript to satisfy this need.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:705792bf-0d8e-4c08-a440-bda3b4df7ba1" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="vb"&gt;Function IIF(psdStr, trueStr, falseStr)
  if psdStr then
    iif = trueStr
  else 
    iif = falseStr
  end if
End Function&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Using this syntax allows the following function call to work great:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:08d5459e-971d-475b-b004-02d5579f8489" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="vb"&gt;strStatus = IIF(Process.IsAlive,"available","unavailable")&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;How many of you guys use IIF in your code writing?&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=j1O60J"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=j1O60J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=mhHLRJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=mhHLRJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=JvdTSJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=JvdTSJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/07/02/Using-IIF-in-VBScript.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/07/02/Using-IIF-in-VBScript.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=70939abd-0d48-4b7b-bec0-5310f1b3ac20</guid><pubDate>Wed, 02 Jul 2008 10:26:34 -0700</pubDate><category>Developer</category><category>Technology</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=70939abd-0d48-4b7b-bec0-5310f1b3ac20</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=70939abd-0d48-4b7b-bec0-5310f1b3ac20</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/07/02/Using-IIF-in-VBScript.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=70939abd-0d48-4b7b-bec0-5310f1b3ac20</wfw:commentRss></item><item><title>Passing Laws Make Us Smarter</title><description>&lt;p&gt;&lt;img title="talking_driving" style="border-right: 0px; border-top: 0px; margin: 0px 0px 5px 5px; border-left: 0px; border-bottom: 0px" height="163" alt="talking_driving" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/PassingLawsMakeUsSmarter_14F3F/talking_driving_3.jpg" width="244" align="right" border="0" /&gt; I had a brief conversation with a lady on Sunday that got me a little frustrated.&amp;#160; The topic was the new ban on using your cell phone while driving.&amp;#160; It seems that everyone is happy with themselves for passing such a smart law.&amp;#160; But to me this seems ridiculous.&amp;#160; Before you flame me on my opinion let me explain why I feel this way…&lt;/p&gt;  &lt;p&gt;If you are driving and can’t seem to control your vehicle because you are busy doing something other than driving, then you are an idiot.&amp;#160; It doesn’t really matter if you are adjusting the radio, shaving your beard, applying makeup, or talking to the person in the passenger seat.&amp;#160; There are already laws on the books that prosecute people for driving reckless so why do we really need new laws?&lt;/p&gt;  &lt;p&gt;Okay, so you think that one more law is going to make things better?&amp;#160;&amp;#160; Well then I would insist that we need more laws to cover driving with a dog on your lap, or reading a newspaper, or eating that tasty hamburger.&amp;#160; All of these things cause people to drive like idiots so why not pass a law for them as well.&lt;/p&gt;  &lt;p&gt;See I believe stupid people will do stupid things (see the attached picture for an example…).&amp;#160; Passing new laws for stupid people isn’t the answer.&amp;#160; If it were the answer then the girl in the picture will be much safer because she is applying lipstick while using a hands-free device.&amp;#160; How about we just enforce the existing laws more rigorously and that should take care of the problem.&amp;#160; This way non-stupid people don’t have to suffer with new and more restrictive laws.&lt;/p&gt;  &lt;p&gt;I guess people think it’s possible to pass enough laws to prevent stupid people from doing stupid things.&amp;#160; Unfortunately this isn’t the case and what we’re all left with is stupid people and more laws.&amp;#160; Oh the humanity…&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=WgsG0J"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=WgsG0J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=eI1vIJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=eI1vIJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=eqb4KJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=eqb4KJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/06/30/Passing-Laws-Make-Us-Smarter.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/06/30/Passing-Laws-Make-Us-Smarter.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=ff2f0953-44f6-4bcc-83ba-b1c5974cd146</guid><pubDate>Mon, 30 Jun 2008 23:48:06 -0700</pubDate><category>General</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=ff2f0953-44f6-4bcc-83ba-b1c5974cd146</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=ff2f0953-44f6-4bcc-83ba-b1c5974cd146</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/06/30/Passing-Laws-Make-Us-Smarter.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=ff2f0953-44f6-4bcc-83ba-b1c5974cd146</wfw:commentRss></item><item><title>The Continued Struggle With Spiders</title><description>&lt;p&gt;I have been trying to stop spiders from downloading files from my blog.&amp;#160; Not pages and such, just the different files that I have made available for anyone interested.&amp;#160; I outlined some of this effort in my previous posts regarding the &lt;a href="http://www.dscoduc.com/post/2008/06/The-elusive-Robotstxt-file.aspx"&gt;Robots.txt&lt;/a&gt; file and such.&amp;#160; The problem is that even with all of these precautions some spiders do not follow the rules, skipping your Robots.txt instructions.&amp;#160; Very annoying indeed.&amp;#160; So how can I ensure that the list of downloads is accurate?&amp;#160; Well one additional step I have recently taken, albeit a drastic step, is to create an extension that will block spiders in the file.serving handler. &lt;/p&gt;  &lt;p&gt;I start with a list of known spiders that have been hitting my server.&amp;#160; Currently it’s in my web.config but this could easily be part of the Extension Manager settings: &lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ca2642d9-207e-4c40-a3aa-a796db592c01" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;  &amp;lt;appSettings&amp;gt;
    &amp;lt;add key="crawlers" value ="spider, rulinki, Sogou, Baidu, baiduspider, googlebot, msnbot, Rambler, slurp, AbachoBOT, Accoona, AcoiRobot, ASPSeek, CrocCrawler, Dumbot, FAST-WebCrawler, GeonaBot, Gigabot, Lycos, MSRBOT, Scooter, AltaVista, IDBot, eStyle, Scrubby, Yahoo" /&amp;gt;
  &amp;lt;/appSettings&amp;gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now I need to insert this extension into the FileHandler.Serving event handler: &lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:42eb02b0-ef76-4de4-9e91-42a4e08dd10c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#"&gt;FileHandler.Serving += new EventHandler&amp;lt;EventArgs&amp;gt;(File_Downloading);&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Next I load the list from the web.config file into a string collection: &lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:8f26fd1f-b4a7-4716-9ff4-66b322a162a8" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#"&gt;//Load list of crawlers
string raw = ConfigurationManager.AppSettings["crawlers"];

// Convert comma delimited list into a string array
string[] crawlers = raw.Split(new char[] { ',' });&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then I loop through each entry in the string collection and see if the value exists in the Request.UserAgent: &lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ea55593d-1787-44a4-a174-12889e54d70c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#"&gt;foreach (string crawler in crawlers)
{
    bool isMatch = Regex.IsMatch(context.Request.UserAgent, crawler, RegexOptions.Compiled &amp;amp; RegexOptions.IgnoreCase);
    if (isMatch)
    {
        context.Response.StatusCode = 403;
        context.Response.End();
        break;
    }
}&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And that’s all there is too it.&amp;#160; Now when a spider attempts to download a file using the filehandler module it checks the Request.UserAgent against my list.&amp;#160; Whenever there is a match I see the following in my IIS logs: &lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:adabbc99-586a-47e4-8bd4-1681c6fd5e09" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;2008-06-27 18:16:01 XXX.XXX.XXX.XXX GET /post/2007/12/file.axd file=makecert.zip 80 - 220.181.32.56 Baiduspider+(+http://www.baidu.com/search/spider.htm) - 403 0 0 300&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Again, not completely foolproof since some of the nasty spiders don’t populate their UserAgent properties.&amp;#160; Still working on those blocking those guys… &lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.dscoduc.com/file.axd?file=CrawlerBlockingExtension.rar" rel="enclosure"&gt;CrawlerBlockingExtension.rar (1.08 kb)&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=E7gGyI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=E7gGyI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=2htTrI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=2htTrI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=7MSS9I"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=7MSS9I" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/06/27/The-Continued-Struggle-With-Spiders.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/06/27/The-Continued-Struggle-With-Spiders.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=9e2be477-8702-4516-945b-7c449648f7d0</guid><pubDate>Fri, 27 Jun 2008 12:37:00 -0700</pubDate><category>BlogEngine.NET</category><category>Extension</category><category>Technology</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=9e2be477-8702-4516-945b-7c449648f7d0</pingback:target><slash:comments>3</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=9e2be477-8702-4516-945b-7c449648f7d0</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/06/27/The-Continued-Struggle-With-Spiders.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=9e2be477-8702-4516-945b-7c449648f7d0</wfw:commentRss></item><item><title>Fun with Findstr</title><description>&lt;p&gt;Did you know that reading your IIS logs can be made really simple by using the Findstr.exe command?&amp;#160; This handy executable allows you to filter results based on almost anything you could imagine.&amp;#160; For filtering you can include multiple strings, specific strings, case sensitive/insensitive filters, and even regular expressions.&amp;#160; Using the pipe functionality you can filter the output from other applications into Findstr to get just the results that you want.&lt;/p&gt;  &lt;p&gt;Take for example the need to look at your IIS log files.&amp;#160; Suppose you want to see all of the files that have been downloaded.&amp;#160; Using the command line you could enter:&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:bb65fcaa-c487-493b-842e-87e141027b00" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;type logfile01.log | findstr “file=”&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That command would display all lines in the logfile01.log that included the string &lt;em&gt;file=&lt;/em&gt;.&amp;#160; That’s informative but not exactly what I am looking for.&amp;#160; So let’s try the following syntax:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:e7922989-82f6-494e-89a8-5c1c81f201c2" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;type logfile01.log | findstr /C:“GET /file.axd file=”&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That’s a little better.&amp;#160; Using the /C: I can search for a specific phrase instead of just an occurrence of the string.&amp;#160; But what if I want to exclude any files that may have been downloaded by Microsoft’s msnbot and Yahoo’s Slurp?&amp;#160; Try this syntax:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:21548c51-92a8-4dd2-a52b-36d41e03d31c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;type logfile01.log | findstr /C:“GET /file.axd file=” | findstr /I /V “msnbot slurp”&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Yes, that’s right.&amp;#160; You can pipe the output of Findstr into another Findstr to perform multiple levels of filtering.&amp;#160; In this example I have used the /I for case insensitivity and the /V to filter &lt;u&gt;out&lt;/u&gt; any lines that contain the matching strings.&amp;#160; I could also have used a regular expression to accomplish the same result:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:f1d74d10-80e1-4c4b-9013-9276f9ef5b72" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;type logfile01.log | findstr /C:“GET /file.axd file=” | findstr /I /V  /R “msnbot|slurp”&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What if you only want to see when blog posts have been served?&amp;#160; Try this syntax:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:d864fd4c-8a58-4dd9-a768-213b7952ea43" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;type logfile01.log | findstr "post/2008/06" | findstr /I /V "msnbot slurp baidu snapbot googlebot"&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you want to perform a query on more that one log file then you can use wildcards in your command line syntax.&amp;#160; For example:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:10a6cfe2-3ef7-4c1d-9271-a9eb1ef9abf6" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;type *.log | findstr /C:“GET /file.axd file=”&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;One thing worth noting…&amp;#160; I have noticed that Findstr has a problem when the search filter starts with a forward slash.&amp;#160; For example:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ee9bb165-6563-4d2c-9dbd-e000d73828df" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;C:\temp&amp;gt;type web.log | findstr "/post/2008/06"
FINDSTR: /t ignored
FINDSTR: // ignored
FINDSTR: /2 ignored
FINDSTR: /0 ignored
FINDSTR: /0 ignored
FINDSTR: /8 ignored
FINDSTR: // ignored
FINDSTR: /0 ignored
FINDSTR: /6 ignored
FINDSTR: Bad command line
The process tried to write to a nonexistent pipe.&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I’m not exactly sure why this little bug happens but just remember this detail when you are crafting your search strings.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=rAGRjI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=rAGRjI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=mocaJI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=mocaJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=tcpMRI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=tcpMRI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/06/19/Fun-with-Findstr.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/06/19/Fun-with-Findstr.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=df6f9843-1f06-4181-a677-09e0585da572</guid><pubDate>Thu, 19 Jun 2008 10:26:38 -0700</pubDate><category>Technology</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=df6f9843-1f06-4181-a677-09e0585da572</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=df6f9843-1f06-4181-a677-09e0585da572</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/06/19/Fun-with-Findstr.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=df6f9843-1f06-4181-a677-09e0585da572</wfw:commentRss></item><item><title>Links for 2008-06-17 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-06-17</link><pubDate>Wed, 18 Jun 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-06-17</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://tool.motoricerca.info/robots-checker.phtml">New Robots.txt Syntax Checker: a validator for robots.txt files</a><br/>
Check to see if your Robots.txt file is correct</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://tool.motoricerca.info/robots-checker.phtml"&gt;New Robots.txt Syntax Checker: a validator for robots.txt files&lt;/a&gt;&lt;br/&gt;
Check to see if your Robots.txt file is correct&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>The elusive Robots.txt file</title><description>&lt;p&gt;&lt;img title="spider" style="border-right: 0px; border-top: 0px; margin: 0px 0px 5px 5px; border-left: 0px; border-bottom: 0px" height="139" alt="spider" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/dfg_D621/spider_3.jpg" width="111" align="right" border="0" /&gt; If you haven’t paid much attention to your Robots.txt file then you aren’t alone.&amp;#160; Many times I will come across a blog or website and out of curiosity I will have a look at their Robots.txt file to see if they updated it correctly.&amp;#160; For example, a quick look at &lt;a href="http://www.LearnMSNet.com" target="_blank"&gt;www.LearnMSNet.com&lt;/a&gt; and you will see the Robots.txt file is the one that came with BlogEngine.NET.&amp;#160; In another example &lt;a href="http://www.ckurl.com/techblog/robots.txt" target="_blank"&gt;http://www.ckurl.com/techblog/robots.txt&lt;/a&gt; has the robots.txt file, albeit the one that came with BlogEngine.Net, but only at the blog sub-level of the domain.&amp;#160; At the root of the domain &lt;a href="http://www.ckurl.com"&gt;www.ckurl.com&lt;/a&gt; where the Robots.txt file should be placed there doesn’t seem to be one at all. &lt;/p&gt;  &lt;p&gt;This isn’t a huge deal if you aren’t too interested in your blog showing up in a search result.&amp;#160; But I suspect that many people do want their blogs to be searchable but just don’t pay any attention to this aspect of configuration. &lt;/p&gt;  &lt;p&gt;Today I wanted to verify the exclusion of crawlers from accessing points of my blog that I didn’t want them to access; ex.&amp;#160; download files, contact page, OPML links…&amp;#160; Pretty much all of the http handlers (.axd) should be excluded.&amp;#160; After doing some reading I completed a Robots.txt file that appears to satisfy my needs. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE (6/18/08):&lt;/strong&gt;&amp;#160; I have revised my Robots.txt from my original post to include some specific crawlers. &lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:02388841-b8ff-4cde-bfa6-ed67d050968c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="xml"&gt;User-agent: Slurp
Disallow: /*.rar$
Disallow: /*.zip$
Disallow: /*.exe$
Disallow: /*.txt$

User-agent: msnbot
Disallow: /*.rar$
Disallow: /*.zip$
Disallow: /*.exe$
Disallow: /*.txt$

User-agent: ia_archiver
User-agent: Sosospider
User-agent: sogou
User-agent: BecomeBot
Disallow: /

User-agent: *
Disallow: /login.aspx
Disallow: /search.aspx
Disallow: /error404.aspx
Disallow: /archive.aspx
Disallow: /contact.aspx
Disallow: /file.axd
Disallow: /js.axd
Disallow: /image.axd
Disallow: /opml.axd
Disallow: /css.axd

sitemap: http://www.dscoduc.com/sitemap.axd&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;How do I know this works correctly?&amp;#160; Well there are a couple of tools out there that can assist you.&amp;#160; For example, have a look at the &lt;a href="http://tool.motoricerca.info/robots-checker.phtml" target="_blank"&gt;Robots Tester&lt;/a&gt; site.&amp;#160; This site will tell you if there are any formatting errors.&amp;#160; The output will look something like the following: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/dfg_D621/image4.png" rel="lightbox"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="300" alt="image" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/dfg_D621/image4_thumb.png" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;After you have confirmed the syntax of your file it is a good idea to see if Google interprets the instructions correctly.&amp;#160; Head over to &lt;a href="http://www.google.com/webmasters" target="_blank"&gt;Google Webmaster Tools&lt;/a&gt; and the Tools section.&amp;#160; In this section you will find the option “Analyze robots.txt” which will let you enter a URL to verify.&amp;#160; In my case I wanted to validate that downloadable files were being Disallowed so I entered in the address http://www.dscoduc.com/file.axd?file=Manage_Files.rar.&amp;#160; Here were the results: &lt;/p&gt;

&lt;p&gt;&lt;img title="results" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="90" alt="results" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/dfg_D621/results_3.jpg" width="569" border="0" /&gt; &lt;/p&gt;

&lt;p&gt;According to the results Google will skip any links to my download files…&amp;#160; Goodness! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;Not all web crawlers respect the Robots.txt file and will access the links included in the Disallow list…&amp;#160; This really can’t be helped without explicitly blocking these crawlers at the address level (does anyone know of a better way?). &lt;/p&gt;

&lt;p&gt;What are your thoughts?&amp;#160; Does it make sense to spend so much time worrying about the Robots.txt file? &lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=78rdDI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=78rdDI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=xtGreI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=xtGreI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=ZP4pWI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=ZP4pWI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/06/17/The-elusive-Robotstxt-file.aspx</link><author>support.nospam@nospam.dscoduc.com (chris)</author><comments>http://www.dscoduc.com/post/2008/06/17/The-elusive-Robotstxt-file.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=b2f940fc-7e6b-4c16-a5a1-5ab7d7d45b81</guid><pubDate>Tue, 17 Jun 2008 15:59:00 -0700</pubDate><category>Technology</category><dc:publisher>chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=b2f940fc-7e6b-4c16-a5a1-5ab7d7d45b81</pingback:target><slash:comments>1</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=b2f940fc-7e6b-4c16-a5a1-5ab7d7d45b81</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/06/17/The-elusive-Robotstxt-file.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=b2f940fc-7e6b-4c16-a5a1-5ab7d7d45b81</wfw:commentRss></item><item><title>Manage Files Extension</title><description>&lt;p&gt;
On several occasions I have wanted to view/edit a file on my website but didn&amp;rsquo;t want to make a RDP/SSH connection (say for example, to edit my Robots.txt file).&amp;nbsp; To achieve this I decided to write a simple admin management page that will allow me to perform this task.&amp;nbsp; So for those people out in the web might want to use this tool I am posting it for your consumption.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
One critical point worth mentioning is that you must be running your site at Full Trust, so those using a hosting company with your website set to run at Medium Trust are out of luck, sorry&amp;hellip; 
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="margin: 5px; border-width: 0px" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/ManageFilesExtension_9EF0/ManageFiles_3.jpg" border="0" alt="ManageFiles" title="ManageFiles" width="645" height="366" /&gt; 
&lt;/p&gt;
&lt;p&gt;
To install this page simply copy the ManageFiles.* into your ~/admin/pages folder and then update your ~/web.sitemap to include the link: 
&lt;/p&gt;
&lt;div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:0f25d738-ea3c-444c-b522-afc6c8563648" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;pre class="xml" name="code"&gt;
&amp;lt;siteMapNode url=&amp;quot;~/admin/Pages/ManageFiles.aspx&amp;quot; title=&amp;quot;Manage Files&amp;quot;  description=&amp;quot;&amp;quot;  roles=&amp;quot;administrators&amp;quot;/&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Once you done these steps you should be able to open any text file you wish.&amp;nbsp; If you run into any problems let me know and I will do what I can to help! 
&lt;/p&gt;
&lt;div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:036eac26-ec9c-4b2d-9a9c-95e022fd9cc6" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.dscoduc.com/file.axd?file=Manage_Files.rar" target="_blank"&gt;Manage Files.rar (1.5k)&lt;/a&gt; 
&lt;/p&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=tzNypI"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=tzNypI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=3V2y2I"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=3V2y2I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=IGVp9I"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=IGVp9I" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/06/17/Manage-Files-Extension.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/06/17/Manage-Files-Extension.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=5a12dd19-6455-4663-971a-a519030cf2f8</guid><pubDate>Tue, 17 Jun 2008 11:21:00 -0700</pubDate><category>BlogEngine.NET</category><category>Extension</category><category>Technology</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=5a12dd19-6455-4663-971a-a519030cf2f8</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=5a12dd19-6455-4663-971a-a519030cf2f8</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/06/17/Manage-Files-Extension.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=5a12dd19-6455-4663-971a-a519030cf2f8</wfw:commentRss></item><item><title>Using Search Engines to Exploit Vulnerabilities</title><description>&lt;p&gt;
Imagine a new zero-day web exploit is announced to the world.&amp;nbsp; Some web administrators will immediately update their sites with the corrective code, however others may not be so quick to react.&amp;nbsp; Some may be asking, what&amp;#39;s the big deal?&amp;nbsp; How would anyone find my little site?&amp;nbsp; Security through obscurity, right? 
&lt;/p&gt;
&lt;p&gt;
Well it turns out that one of the best tools for locating vulnerable sites is you friendly local search engine.&amp;nbsp; How&amp;#39;s that you ask?&amp;nbsp; Well a search engine like Google can provide an easy way to search for something common across all vulnerable systems.&amp;nbsp; Take for example the recent vulnerability that was discovered in BlogEngine.Net.&amp;nbsp; No matter what the size of your blog, chances are that your site would be discovered with a simple query like &lt;a href="http://www.google.com/search?q=%22BlogEngine.NET+1.3.0.0%22" title="http://www.google.com/search?q=%22BlogEngine.NET+1.3.0.0%22"&gt;http://www.google.com/search?q=%22BlogEngine.NET+1.3.0.0%22&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
What&amp;#39;s interesting to me is that the information being used is something that many administrators have either added or left on their Blog theme.&amp;nbsp; So I started wondering if simply removing the Powered by BlogEngine.Net tag would be enough to shield a website from being exploited.&amp;nbsp; I believe the obvious answer is, while not completely shielding your site, it would definitely add a layer of insulation from some people wanting to attack your site. 
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&amp;lt;rant&amp;gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;em&gt;Some people may disagree with this statement.&amp;nbsp; I hear it all the time:&amp;nbsp; &amp;quot;Security through obscurity is not security at all&amp;quot;.&amp;nbsp; I strongly disagree with that statement, believing that obscurity keeps some of the people away from your site.&amp;nbsp; I liken it to locks on your doors.&amp;nbsp; Some people know how to pick locks but most people don&amp;#39;t know how to pick the locks.&lt;/em&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&amp;lt;/rant&amp;gt; 
	&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So all this got me thinking, what would happen if the search engines couldn&amp;#39;t see the &amp;quot;Powered by BlogEngine.Net&amp;quot; string.&amp;nbsp; Would this exclude your site from the results of the search string shown above?&amp;nbsp; Perhaps.&amp;nbsp; Interesting idea but I do want this information displayed on my blog.&amp;nbsp; So how can I display the string to actual users but not to search engines? 
&lt;/p&gt;
&lt;p&gt;
One site suggested that search engines can&amp;#39;t accept cookies.&amp;nbsp; The idea being that when a search engine hits your site they are scraping the raw source from your site and won&amp;#39;t accept cookies.&amp;nbsp; Can anyone confirm that suggestion?&amp;nbsp; In any case I decided to see how hard it would be to write some JavaScript that would display the &amp;quot;Powered by BlogEngine.Net&amp;quot; if the client accepts cookies. 
&lt;/p&gt;
&lt;p&gt;
Not too difficult really.&amp;nbsp; Just start with sending a cookie to the client: 
&lt;/p&gt;
&lt;div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:daaa28ba-d385-4e02-855f-4c72307d6128" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;pre class="js" name="code"&gt;
function SetCookie(name,value,expires,path,domain,secure)
{
  var strDNS = GetDNS();
  document.cookie = name + &amp;quot;=&amp;quot; +escape(value) +
  ( (expires) ? &amp;quot;;expires=&amp;quot; + expires.toGMTString() + 1000*60*20 : &amp;quot;&amp;quot;) +
  ( (path) ? &amp;quot;;path=&amp;quot; + path : &amp;quot;&amp;quot;) +
  ( (domain) ? &amp;quot;;domain=&amp;quot; + strDNS : &amp;quot;&amp;quot;) +
  ( (secure) ? &amp;quot;;secure&amp;quot; : &amp;quot;&amp;quot;);
  return true
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Next try and retrieve the cookie: 
&lt;/p&gt;
&lt;div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ca4189ec-e190-4aae-abfc-2d7cbd72004b" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;pre class="js" name="code"&gt;
function GetCookie() {
  var strName = &amp;quot;varCook&amp;quot;;
  if (document.cookie.indexOf(strName) == -1)
  {
    return false;
  }
  else
  {
    cookieStart = document.cookie.indexOf(strName);
    cookieValStart = (document.cookie.indexOf(&amp;quot;=&amp;quot;, cookieStart) + 1);
    cookieValEnd = document.cookie.indexOf(&amp;quot;;&amp;quot;, cookieStart);
    if (cookieValEnd == -1)
    { cookieValEnd = document.cookie.length; }
    cookieValue = document.cookie.substring(cookieValStart, cookieValEnd);
  }
  if (cookieValue = &amp;quot;True&amp;quot;)
  { return (&amp;quot;True&amp;quot;); }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
If the cookie is found then the string is displayed to the user, if not then nothing is displayed. 
&lt;/p&gt;
&lt;div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:773d4d6f-f878-4a25-aef2-46259716e02f" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;pre class="js" name="code"&gt;
function showPoweredByBlogEngine()
{
  if (CheckCookiesEnabled() == true)
  { 
    document.write(&amp;quot;Powered by &amp;lt;a href=&amp;#39;http://www.dotnetblogengine.net/&amp;#39; target=&amp;#39;_blank&amp;#39;&amp;gt;BlogEngine.NET&amp;lt;/a&amp;gt;&amp;quot;);
  }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
All that&amp;#39;s left is to add the script tag where I want the string to be displayed: 
&lt;/p&gt;
&lt;div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:6d3f3f90-7e36-430f-8716-13d2f11e51b3" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;pre class="xml" name="code"&gt;
&amp;lt;script language=&amp;quot;javascript&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;showPoweredByBlogEngine();&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
For the complete JavaScript code simply &lt;a href="http://www.dscoduc.com/js.axd?path=%2fCookiesEnabled.js" target="_blank"&gt;download the one I am using&lt;/a&gt;.&amp;nbsp; I would be interested in what everyone thinks about this idea.&amp;nbsp; Will this make a difference in being able to find my blog using a search engine? 
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=52J4PH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=52J4PH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=MoEplH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=MoEplH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=CjDYhH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=CjDYhH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/05/22/Using-Search-Engines-to-Exploit-Vulnerabilities.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/05/22/Using-Search-Engines-to-Exploit-Vulnerabilities.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=86259eb9-edc7-4209-8208-0af10f4a5fa6</guid><pubDate>Thu, 22 May 2008 23:30:00 -0700</pubDate><category>Developer</category><category>Technology</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=86259eb9-edc7-4209-8208-0af10f4a5fa6</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=86259eb9-edc7-4209-8208-0af10f4a5fa6</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/05/22/Using-Search-Engines-to-Exploit-Vulnerabilities.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=86259eb9-edc7-4209-8208-0af10f4a5fa6</wfw:commentRss></item><item><title>Quick and Dirty TCP Listener Port</title><description>&lt;p&gt;
Following up on &lt;a href="http://www.dscoduc.com/post/2008/05/Handy-Port-Testing-Tool.aspx" target="_blank"&gt;my previous post&lt;/a&gt; about AllScoop&amp;#39;s excellent TCP Listener tool... I decided to look into a change for the application that would allow me to see the IP Address of the connected client.&amp;nbsp; I did a little digging and found an article in the Microsoft forums that had a &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=596932&amp;amp;SiteID=1" target="_blank" title="Get IP Address from TCPClient class"&gt;recommendation&lt;/a&gt; to do a DirectCast from the Net.IPEndPoint.&amp;nbsp; Armed with this information I decided to try and build a quick and dirty TCP listener that would validate if this suggestion would actually work.&amp;nbsp; Here is the code that I ended up with:
&lt;/p&gt;
&lt;div id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:237ba947-1d35-47c4-b2e2-e176433633d9" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; padding: 0px"&gt;
&lt;pre class="vb" name="code"&gt;
Imports System.Net.Sockets
Imports System.Text

Module Module1

  Sub Main()
    Dim port As Integer = 5010
    Dim text As String = &amp;quot;Hello&amp;quot;
    Dim listener As New TcpListener(port)
    Try
      listener.Start()

      Console.WriteLine(&amp;quot;Added listening on port &amp;quot; &amp;amp; port.ToString)
      Do While True
        Dim client As TcpClient = listener.AcceptTcpClient
        Dim ipAddress As String = DirectCast(client.Client.RemoteEndPoint, Net.IPEndPoint).Address.ToString
        Console.WriteLine(&amp;quot;Connection from {0} on port {1}&amp;quot;, ipAddress, port.ToString)
        Dim stream As NetworkStream = client.GetStream
        Dim bytes As Byte() = Encoding.ASCII.GetBytes([text])
        stream.Write(bytes, 0, bytes.Length)
        stream.Close()
        client.Close()
      Loop
    Catch exception1 As Exception
      Console.WriteLine(&amp;quot;An error occured, the port may be in use&amp;quot;)
    End Try

  End Sub

End Module
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
The special sauce this code is on line 16 where the IP Address is pulled from the client&amp;#39;s RemoteEndPoint.&amp;nbsp; I have forwarded this over to AllScoop and hopefully we can see an update to their TCP Listener code.
&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=jbgtwH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=jbgtwH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=gHbSmH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=gHbSmH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=QVkjgH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=QVkjgH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/05/22/Quick-and-Dirty-TCP-Listener-Port.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/05/22/Quick-and-Dirty-TCP-Listener-Port.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=a54b94e1-69a5-4202-9f7f-c113d4c9dba9</guid><pubDate>Thu, 22 May 2008 14:37:00 -0700</pubDate><category>Developer</category><category>Technology</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=a54b94e1-69a5-4202-9f7f-c113d4c9dba9</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=a54b94e1-69a5-4202-9f7f-c113d4c9dba9</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/05/22/Quick-and-Dirty-TCP-Listener-Port.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=a54b94e1-69a5-4202-9f7f-c113d4c9dba9</wfw:commentRss></item><item><title>Handy Port Testing Tool</title><description>&lt;p&gt;Many times I find myself behind a firewall or a NAT device and need to quickly determine if a port passing through this configuration is working as expected.&amp;nbsp; One of the easiest ways, not to mention coolest, is to use the &lt;a title="TCP Listener by AllScoop" href="http://www.allscoop.com/tcp-listen.php" target="_blank"&gt;TCP Listener tool created by AllScoop&lt;/a&gt;.&amp;nbsp; This little gem allows you to configure whatever TCP port you want to publish along with a message that can be displayed when a connection is successfully made on that target port.&lt;/p&gt; &lt;p&gt;The one thing I wish it would provide that isn't included is the IP address of the connection.&amp;nbsp; I have asked for the source code to see if I could make the addition myself but I haven't heard anything back yet.&lt;/p&gt; &lt;p&gt;Here's the screen shot provided by the AllScoop website:&lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://www.allscoop.com/tcp-listen.php" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; margin: 5px; border-left: 0px; border-bottom: 0px" height="543" alt="listen" src="http://www.dscoduc.com/image.axd?picture=WindowsLiveWriter/HandyPortTestingTool_14CA3/listen_bed2d1a0-4ffa-442e-8c45-8c7453823063.png" width="397" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=E2JJkH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=E2JJkH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=bPk4XH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=bPk4XH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DSCODUC?a=ymuaoH"&gt;&lt;img src="http://feeds.feedburner.com/~f/DSCODUC?i=ymuaoH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://www.dscoduc.com/post/2008/05/21/Handy-Port-Testing-Tool.aspx</link><author>support.nospam@nospam.dscoduc.com (Chris)</author><comments>http://www.dscoduc.com/post/2008/05/21/Handy-Port-Testing-Tool.aspx#comment</comments><guid>http://www.dscoduc.com/post.aspx?id=a0017084-c317-4395-89f2-92844686b10b</guid><pubDate>Wed, 21 May 2008 23:39:08 -0700</pubDate><category>Technology</category><dc:publisher>Chris</dc:publisher><pingback:server>http://www.dscoduc.com/pingback.axd</pingback:server><pingback:target>http://www.dscoduc.com/post.aspx?id=a0017084-c317-4395-89f2-92844686b10b</pingback:target><slash:comments>0</slash:comments><trackback:ping>http://www.dscoduc.com/trackback.axd?id=a0017084-c317-4395-89f2-92844686b10b</trackback:ping><wfw:comment>http://www.dscoduc.com/post/2008/05/21/Handy-Port-Testing-Tool.aspx#comment</wfw:comment><wfw:commentRss>http://www.dscoduc.com/syndication.axd?post=a0017084-c317-4395-89f2-92844686b10b</wfw:commentRss></item><item><title>Links for 2008-05-05 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-05-05</link><pubDate>Tue, 06 May 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-05-05</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://www.aspnetresources.com/tools/default.aspx">ASP.NET Resources - Tools</a><br/>
Online automated tools for making ASP.NET development/management easier</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.aspnetresources.com/tools/default.aspx"&gt;ASP.NET Resources - Tools&lt;/a&gt;&lt;br/&gt;
Online automated tools for making ASP.NET development/management easier&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Links for 2008-05-04 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-05-04</link><pubDate>Mon, 05 May 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-05-04</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://blog.gfst.net/post/2008/04/Installing-Vista-from-a-bootable-USB-flash-drive.aspx">Installing Vista from a bootable USB flash drive</a><br/>
Learn how to install Vista from a USB hard drive</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.gfst.net/post/2008/04/Installing-Vista-from-a-bootable-USB-flash-drive.aspx"&gt;Installing Vista from a bootable USB flash drive&lt;/a&gt;&lt;br/&gt;
Learn how to install Vista from a USB hard drive&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Links for 2008-05-03 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-05-03</link><pubDate>Sun, 04 May 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-05-03</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://www.codedigest.com/Articles/ASPNET/70_Useful_GridView_Tips.aspx">Useful GridView Tips</a></li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codedigest.com/Articles/ASPNET/70_Useful_GridView_Tips.aspx"&gt;Useful GridView Tips&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Links for 2008-05-02 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-05-02</link><pubDate>Sat, 03 May 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-05-02</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://naspinski.com/category/aspnet.aspx">naspinski - asp.net</a><br/>
helps understand inline tags in ASP.NET`</li>
<li><a href="http://www.colorblender.com/">ColorBlender.com | Your free online color matching toolbox</a><br/>
Excellent way to mix and match colors</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://naspinski.com/category/aspnet.aspx"&gt;naspinski - asp.net&lt;/a&gt;&lt;br/&gt;
helps understand inline tags in ASP.NET`&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.colorblender.com/"&gt;ColorBlender.com | Your free online color matching toolbox&lt;/a&gt;&lt;br/&gt;
Excellent way to mix and match colors&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Links for 2008-04-25 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-04-25</link><pubDate>Sat, 26 Apr 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-04-25</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://www.15seconds.com/issue/020417.htm">15 Seconds : HTTP Handlers and HTTP Modules in ASP.NET</a><br/>
Excellent explanation on how to create and use HTTP Handlers and Modules</li>
<li><a href="http://www.youtube.com/watch?v=NLlGopyXT_g">The Machine is Us/ing Us (Final Version)</a><br/>
What is Web 2.0</li>
<li><a href="http://www.codingthewheel.com/archives/loop-programming-etiquette">Loop Etiquette - Coding the Wheel</a><br/>
Understanding how to construct proper loops!</li>
<li><a href="http://ingig.net/post/Remove-item-from-Response-Header.aspx">Remove item from Response Header</a></li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.15seconds.com/issue/020417.htm"&gt;15 Seconds : HTTP Handlers and HTTP Modules in ASP.NET&lt;/a&gt;&lt;br/&gt;
Excellent explanation on how to create and use HTTP Handlers and Modules&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=NLlGopyXT_g"&gt;The Machine is Us/ing Us (Final Version)&lt;/a&gt;&lt;br/&gt;
What is Web 2.0&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codingthewheel.com/archives/loop-programming-etiquette"&gt;Loop Etiquette - Coding the Wheel&lt;/a&gt;&lt;br/&gt;
Understanding how to construct proper loops!&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ingig.net/post/Remove-item-from-Response-Header.aspx"&gt;Remove item from Response Header&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Links for 2008-04-04 [del.icio.us]</title><link>http://del.icio.us/dscoduc#2008-04-04</link><pubDate>Sat, 05 Apr 2008 00:00:00 -0500</pubDate><guid isPermaLink="true">http://del.icio.us/dscoduc#2008-04-04</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://www.aspdotnetfaq.com/Faq/How-to-display-the-Last-Modification-Date-and-Time-for-ASP-NET-web-page.aspx">How to display the Last Modification Date and Time for ASP.NET web page?</a></li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.aspdotnetfaq.com/Faq/How-to-display-the-Last-Modification-Date-and-Time-for-ASP-NET-web-page.aspx"&gt;How to display the Last Modification Date and Time for ASP.NET web page?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel>
</rss>
