Just a short, simple blog for Bob to share his thoughts.
04 January 2011 • by Bob • Humor, Military
Many years ago - more years than I would care to admit - I spent eight years in the Army as a 98G Voice Intercept Operator, which is a long title for someone that spends a lot of time listening to what other people are saying, taking notes, and then telling someone else what was being said. I won't go into any more details about what I did for a living, but for several years I was stationed in Fulda, Germany, where I was a member of the 511th Military Intelligence Company, which was attached to the 11th Armored Cavalry Regiment.
My fellow soldiers and I spent a lot of time hiding in the forests along what was then the border between East and West Germany, which is where the conditions were generally the best for our line of work. During the day we used an AN/TRQ-32(V) Radio Receiving Set, which we affectionately called the "Turkey 32."
The Turkey 32 was my favorite piece of equipment, and it's primarily used for direction finding operations. (Which means "locating the bad guys.") The only trouble with the Turkey 32 was - it used a great deal of fuel, and its generator was horribly loud, so at night we would shut down the Turkey 32 and use our AN/TRQ-30 Manpack Radio Receiving Set to continue our listening activities... which we called the "Turkey 30."
These radios were left over from a bygone era in the distant past - like the Korean War, or maybe the Civil War - so they were really starting to show their age. One of our radios was falling apart - literally. The knobs on the face panel kept falling off, the reception was terrible, the tuner barely moved, etc. I knew that my Turkey 30 was on its last legs and was in dire need of some kind of emergency maintenance, so one day I hauled my Turkey 30 to our Circuits & Electronics (C&E) office to see what my options were. (I was secretly hoping that C&E would replace the radio, but I was almost certain that it would simply spend a few weeks in the shop for repairs.) I had a good friend who was working in C&E that day, SP4 Villarreal, and he replied that as long as the radio was working, there was nothing that he could do about it.
So I started to pack up the radio, and I was probably muttering something about the fact that I had no idea how long it would take for the radio to eventually die, when Villarreal stopped me and said, "Perhaps you weren't paying attention, so listen to me very closely this time - we can't fix it, but if it doesn't work then we can replace it."
And suddenly - the light bulb turned on.
I blissfully carried the Turkey 30 back to our platoon office in the 511th building and announced to everyone, "Gentlemen, this radio has to die - today." So we spent the next hour or so having a contest to see who could throw the Turkey 30 the furthest from the 2nd-story window where our platoon office was located. After everyone had made their share of attempts at breaking the previous distance record, we declared the contest winners with the usual pomp and circumstance that is called for in such occasions - which means that several people were undoubtedly punched a few times before heading back to work.
Once that was taken care of, I packed up the Turkey 30 and strolled back to the C&E office, where I announced to Villarreal that, "For some reason my Turkey 30 has stopped working." Villarreal didn't blink as he overlooked the massive dents and broken glass and replied, "Well, we'll just have to order you a replacement."
It's times like that when it's great to have friends in the right places.
28 December 2010 • by Bob • IIS
Many years ago I wrote Microsoft KB article 203064 about using Server-Side-Include (SSI) files with IIS 4 and IIS 5, but that KB has long since vanished from Microsoft's support website because it was never updated for IIS 6 or IIS 7. I eventually turned the information from that KB article into a blog post, but that being said, I still see questions about SSI showing up in the IIS forums every once in a while. There was a great deal of useful information in that KB article about general SSI syntax and several practical examples for SSI directives, so I thought that it would make a good blog post if I updated the information from that KB for later versions of IIS.
This blog post details some features that are available in the Microsoft implementation of Server-Side Include (SSI) files for Internet Information Server (IIS) and provides general syntax and examples for SSI directives.
SSI files are most commonly used with IIS to allow content authors to include the contents of one file inside another file, allowing the easy creation of script libraries or page headers and footers to standardize the look and feel of your web content. SSI consists of very simple commands that are contained within HTML comment tokens, and are limited in functionality. Higher-level programming languages like ASP, ASP.NET, PHP, etc. make the need for SSI considerably less necessary than in previous years. In addition, programming features such as ASP.NET's Master Pages and Dynamic Web Template (DWT) files that are used by Dreamweaver, Expression Web, and FrontPage have replaced much of the need for SSI. Because of this, SSI is an outdated technology by today's standards. With that in mind, web developers are highly encouraged to migrate their SSI content to another technology, such as ASP.NET or PHP.
SSI files are mapped by file extension to a preprocessor or handler dynamic-link library (DLL), in the same way that file like ASP, ASP.NET, PHP, etc. are mapped to their requisite handlers. In the case of SSI, the specific handler is ssiinc.dll for IIS 4 through IIS 6 and iis_ssi.dll for IIS 7. SSI files on Windows are often named with .stm file extensions, although extensions of .shtm and .shtml are also supported.
cmd
directive for #exec
is disabled by default in IIS 5 and IIS 6. To enable the cmd
directive, see Microsoft KB article 233969.cmd
directive for #exec
is now disabled for SSI files in IIS 7; you can only use the cgi
directive.SSI is employed by the use of special preprocessing directives in SSI documents that are contained within HTML comment tokens; these directives are parsed by the SSI DLL and processed into HTML that is returned to a web client. All SSI directives take the following general form:
<!--#<DIRECTIVE> [<PARAMETER> = <VALUE>]-->
IIS supports a small set of SSI directives, and each directive has different parameters that configure the output for the directive. Other web servers may support a different set of SSI directives and parameters, so SSI files are not 100% compatible across different technologies.
The following directives are supported in the IIS implementation of SSI:
<!-- #CONFIG <ERRMSG/TIMEFMT/SIZEFMT>="<format>" -->
<html> <body> <!-- #CONFIG TIMEFMT="%m/%d/%y" --> <p>Today's Date = <!--#ECHO VAR = "DATE_LOCAL" --></p> <!-- #CONFIG TIMEFMT="%A, %B %d, %Y" --> <p>Today's Date = <!--#ECHO VAR = "DATE_LOCAL" --></p> </body> </html>
<!--#ECHO VAR = "<CGI_VARIABLE_NAME>"-->
<html> <body> <p>Server Name = <!--#ECHO VAR = "SERVER_NAME"--></p> <p>Date = <!--#ECHO VAR = "DATE_LOCAL" --></p> <p>Page URL = <!--#ECHO VAR = "URL" --></p> </body> </html>
<!-- #EXEC <CGI/CMD>="<command>" -->
<html> <body> <p>Root Directory of C:</p> <pre><!--#EXEC CGI = "/cgi-bin/HelloWorld.exe" --></pre> </body> </html>
233969 SSIEnableCmdDirective is set to FALSE by default
<!--#FLASTMOD <FILE/VIRTUAL> = "filename.ext"-->
<html> <body> <!-- #CONFIG TIMEFMT="%m/%d/%y" --> <p>Modified Date = <!--#FLASTMOD FILE="filename.ext"--></p> <!-- #CONFIG TIMEFMT="%B %d, %Y" --> <p>Modified Date = <!--#FLASTMOD FILE="filename.ext"--></p> </body> </html>
<!--#FSIZE <FILE/VIRTUAL> = "filename.ext"-->
<html> <body> <!-- #CONFIG SIZEFMT="BYTES" --> <p>File Size = <!--#FSIZE FILE="filename.ext"--> bytes</p> <!-- #CONFIG SIZEFMT="ABBREV" --> <p>File Size = <!--#FSIZE FILE="filename.ext"--> KB</p> </body> </html>
<!--#INCLUDE <FILE/VIRTUAL> = "filename.ext"-->
<html> <body> <!--#INCLUDE FILE = "header.inc"--> <p>Hello World!</p> <!--#INCLUDE VIRTUAL = "/includes/footer.inc"--> </body> </html>
The #config directive supports a large array of possible parameter values, which are listed in the following table. Note: All of these values are case-sensitive.
Value | Description | Example |
---|---|---|
%A |
Full Weekday Name | Tuesday |
%a |
Short Weekday Name | Tue |
%B |
Full Month Name | December |
%b |
Short Month Name | Dec |
%c |
Full Date & Time | 12/28/10 19:52:19 |
%d |
Day of Month as a Number | 28 |
%H |
Hours as a Number on a 24-Hour Clock | 19 |
%I |
Hours as a Number on a 12-Hour Clock | 07 |
%j |
Julian Date (Offset from Start of Year) | 362 |
%M |
Minutes as a Number | 52 |
%m |
Month as a Number | 12 |
%p |
AM or PM Indicator | PM |
%S |
Seconds as a Number | 19 |
%U |
Week Number (Offset from Start of Year) | 52 |
%W |
Week Number (Offset from Start of Year) | 52 |
%w |
Day of the Week as a Number | 2 |
%X |
Short Time | 19:52:19 |
%x |
Short Date | 12/28/10 |
%Y |
Four-Digit Year as a Number | 2010 |
%y |
Two-Digit Year as a Number | 10 |
%Z |
Time Zone Name | Pacific Standard Time |
%z |
Time Zone Name | Pacific Standard Time |
Note: The following Windows Script Host (WSH) code will create a sample SSI page that you can use to test the parameter values for the #config directive:
Option Explicit
Dim objFSO, objFile, intCount
Set objFSO = WScript.CreateObject("Scripting.Filesystemobject")
Set objFile = objFSO.CreateTextFile("ssitest.stm")
objFile.WriteLine("<html>")
objFile.WriteLine("<body>")
For intCount = Asc("A") To Asc("Z")
objFile.WriteLine("<!-- #CONFIG TIMEFMT=""%" & _
UCase(Chr(intCount)) & """ --><p>%" & _
UCase(Chr(intCount)) & _
" = <!--#ECHO VAR = ""DATE_LOCAL"" --></p>")
objFile.WriteLine("<!-- #CONFIG TIMEFMT=""%" & _
LCase(Chr(intCount)) & """ --><p>%" & _
LCase(Chr(intCount)) & _
" = <!--#ECHO VAR = ""DATE_LOCAL"" --></p>")
Next
objFile.WriteLine("</body>")
objFile.WriteLine("</html>")
SSI directives that use file paths can reference files by using a file or virtual path.
<!--#include file="myfile.txt"-->
<!--#include virtual="/scripts/myfile.txt"-->
For additional information on using SSI with IIS, click the following article numbers to view the articles in the Microsoft Knowledge Base:
For more Microsoft Knowledge Base articles about using SSI with IIS, click here.
Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/
28 December 2010 • by Bob • Guitar, Rants
There was a time long ago in a galaxy far, far away where Rolling Stone Magazine (RSM) had an ounce or two of actual journalistic and editorial credibility. Sadly, that time and place is long gone. Each time RSM puts out another list of the "100 Greatest This" or "50 Greatest That," RSM continues to show just how out of date and out of touch its editors really are.
This leads me to my current rant, which is the following article by RSM:
100 Greatest Guitarists of All Time
http://www.rollingstone.com/music/lists/100-greatest-guitarists-of-all-time-19691231
I realize that these types of lists are highly subjective, and as such no single person will ever be 100% happy with the results - with the notable exception of the guy that made the list. But just the same, here's how I would measure any guitarist's legacy - I use the TOAD elements to gauge their level of impact:
With this in mind, I took a long look at the RSM list, and it's really quite pathetic. Most of the guitarists in their list simply don't belong on anybody's list of guitar greats, while many others are badly slighted or given way more credit than they are due.
Here's a few of my thoughts on the top ten, in the order that they appear on the list:
That wraps up my tirade for the top ten, so here are some assorted thoughts for the rest of the list:
So who got missed? A lot of truly great guitarists. Here are just a few:
I am, of course, leaving out the incredible number of great classical, fingerstyle, and country guitar players; people like Chet Atkins, Andres Segovia, Leo Kottke, Julian Bream, Doc Watson, Christopher Parkening, etc. Each of these guitarists have talent, originality, influence, and durability way beyond most of the guitar players that made the list. Leaving them out is just as dim-witted as the omission of the other guitarists that I had already mentioned.
So there you have it - Rolling Stone Magazine put out another worthless list, and once again they demonstrated that their editorial staff is so out of touch with musical reality that their journalistic credibility is probably beyond reconciliation with their readers. Perhaps someone should explain to them what a guitar is and how it's played, and then build on that foundation until these idiots people understand what it means to be a truly great guitarist.
17 December 2010 • by Bob • IIS, Windows
I've run into this situation more times that I can count: I set up a new web server and no matter what I do, I cannot log into websites on the server that require authentication while I am browsing to them from the console. I used to pull my hair out over this problem until I discovered the problem is in the Windows Local Security Authority (LSA) and it can be easily remedied.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
in the registry editor.Several years later someone wrote the following KB article that includes this fix with a description of the problem, as well as an alternate workaround:
http://support.microsoft.com/kb/896861
HTH
08 December 2010 • by Bob • BlogEngine.NET, IIS, Windows Phone 7
I love BlogEngine.NET, and I love my Windows Phone 7 mobile phone, so it goes without saying that I would want the two technologies to work together. I'm currently using BlogEngine.NET 1.6.1, but Windows Phone 7 is not supported by default. That being said, it's really easy to add support for Windows Phone 7 by modifying your BlogEngine.NET settings. To do so, open your Web.config file and locate the following section:
<appSettings>
<add key="BlogEngine.FileExtension" value=".aspx" />
<!-- You can e.g. use "~/blog/" if BlogEngine.NET is not located in the root of the application -->
<add key="BlogEngine.VirtualPath" value="~/" />
<!-- The regex used to identify mobile devices so a different theme can be shown -->
<add key="BlogEngine.MobileDevices" value="(nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)" />
<!-- The name of the role with administrator permissions -->
<add key="BlogEngine.AdminRole" value="Administrators" />
<!--This value is to provide an alterantive location for storing data.-->
<add key="StorageLocation" value="~/App_Data/" />
<!--A comma separated list of script names to hard minify. It's case-sensitive. -->
<add key="BlogEngine.HardMinify" value="blog.js,widget.js,WebResource.axd" />
</appSettings>
The line that you need to modify is the BlogEngine.MobileDevices
line, and all that you need to do is add iemobile
to the list. When you finish, it should look like the following:
<add key="BlogEngine.MobileDevices" value="(iemobile|nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)" />
You could also add support for Apple products by using the following syntax:
<add key="BlogEngine.MobileDevices" value="(iemobile|iphone|ipod|nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)" />
That's all there is to it. ;-]
Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/
05 December 2010 • by Bob • Humor
I spent the weekend in Leavenworth, Washington, with my wife, our kids, and my future son-in-law. It was a fun-filled weekend of bright lights, snow-capped mountains, hot apple cider, chestnuts roasting on open fires, and Christmas carols sung by choirs. But the more that I listened to Christmas carols, the more I started to get an interesting picture of Santa Claus.
Like many other people, I grew up with the concept of Santa Claus as a kindly old gentleman that brought gifts at Christmas to all the good children of the world. Santa was like the ultimate grandfather - with a bright red suit, a cheery disposition, a full beard of whiskers, and a sleigh that flew through the air by magic reindeer.
But this year the words to some of the traditional Christmas carols began to really sink in, and I started to see a different Santa. A darker Santa. A scary Santa. Let me give you just a few examples:
My childhood illusion is finally shattered - this Christmas Eve Santa isn't filling STOCKINGS hung by the chimney with care, he's STALKING you by the chimney with care. That's why he's sneaking into your house like a burglar, and why he has so many aliases around the globe - even James Bond doesn't use as many pseudonyms: Saint Nicholas, Father Christmas, Kris Kringle, Grandfather Frost, Yule Man, Sinterklaas, Дед Мороз, etc.
So this Christmas Eve I suggest that you heed the wise advice found in the "Here Comes Santa Claus" Christmas carol: "Jump in bed and cover up your head, Because Santa Claus comes tonight."
11 November 2010 • by Bob • Military
It is the soldier, not the reporter,
who has given us freedom of the press.
It is the soldier, not the poet,
who has given us freedom of speech.
It is the soldier, not the campus organizer,
who has given us the freedom to demonstrate.
It is the soldier, not the lawyer,
who has given us the right to a fair trial.
It is the soldier,
who salutes the flag,
who serves under the flag,
and whose coffin is draped by the flag,
who allows the protester to burn the flag.
--By Father Dennis Edward O'Brien, USMC
21 October 2010 • by Bob • Humor, Military
I served in the Army for 8 years as a Russian translator. When I was still in Russian school, we were required to attend "conversation" class, where a group of students would sit down and discuss various topics with one of the instructors.
One day the instructor asked me what I had been doing the previous evening, and I said that I had played soccer. She asked what position I played, and since I didn't know the Russian noun for a goal keeper, I took a chance and replied in Russian that "I played goalie." She looked surprised, and asked if I was often goalie when playing soccer, and I replied yes - I usually play goalie. After that we chatted back and forth about how I preferred to play goalie, why I preferred to play goalie, etc. This conversation continued for about a minute, when she switched to English and informed me that in Russian "goalie" (голый) is the adjective for "naked".
So I had spent the last part of the conversation waxing poetic about my preference for playing soccer... well... you know. ;-)
04 August 2010 • by Bob • IIS
One of my coworkers (Mike Pope) sent me the link to a great blog post by Raymond Chen that was titled "Don't forget to replace your placeholder bitmaps with real bitmaps". Raymond's blog was a good story, but he referenced another great blog post titled "We Burned the Poop", and let's be honest - who can resist reading a blog post with a great title like that? (Note: I won't spoil the impact of that blog - you should read it first.)
But reading those two blog posts made me think back about the various code blunders that I've made over the years, which have [thankfully] never been as bad as the stories in those blog posts.
But one mistake that I made which I have never been able to live down is when I wrote the MetaEdit 2.x utility for editing the IIS metabase.
Every day I was making a huge number of changes to the MetaEdit code, and it was getting hard to keep track of everything that I needed to finish. Of course, there are several ways to track work items, and the preferred method is to keep track of everything in a bug database. But I also like to flag sections of code with comments that say things like "TODO" or "BUGBUG", that makes it easier to do a search on the code before inadvertently checking it in with something that needed to be completed.
As the deadline was rapidly approaching for me to check in the final build of MetaEdit for the Windows Server 2000 Resource Kit, I decided to add a dialog box that MetaEdit would display if you were using it with a version of IIS that was later than IIS 5.0, which we were shipping with Windows Server 2000. I wanted to make sure that MetaEdit would warn users that they might have problems using MetaEdit with a later version of IIS since I didn't know how the metabase would work in the future, or if we would deprecate the metabase like we eventually did in Windows Server 2008. I was obviously distracted for some reason and I didn't finish that section of code, but I hadn't added a comment with the text "TODO" or "BUGBUG", so I dutifully checked the code into the Resource Kit database and I didn't think anything about it.
At least I didn't think about it until we released Windows Server 2003.
If you'll recall, IIS 6.0 was shipped with Windows Server 2003, which meant that anyone who wanted to use MetaEdit in order to modify their metabase was rudely greeted with the following nonsensical and ultimately useless dialog box:
Suddenly I was receiving emails from all over the place asking me what the heck that dialog box meant. The text was supposed to have a generic warning about damaging your metabase with some sort of "use-at-your-own-risk" verbiage and a set of Yes/No buttons that would allow you to opt out of opening the application.
(Deep Sigh)
Eventually Henrik Walther wrote KB 555081 that informed users what to do, but still - I should have fixed that. Darn.
My apologies to everyone that ever saw that dialog box. ;-]
Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/
30 July 2010 • by Bob • FTP
For this installment in my series about FTP Clients I'm going to review the FTP features in Microsoft's Expression Web 4 (EW4). You can find out more about the Microsoft Expression series of products from the following URL:
Note: There are a lot of really cool features that are built into EW4, like Search Engine Optimization (SEO) tools, rich extensibility APIs, previewing content side-by-side in multiple browser windows through SuperPreview, built-in support for programming languages like ASP/ASP.NET/PHP/etc. But that being said, in keeping with the main theme of my FTP client series, this review is focusing on just the FTP aspects of EW4 - not the entire product.
At the time of this blog post, EW4 is a for-retail product that is available as part of the Expression Studio 4 Web Professional and Expression Studio 4 Ultimate suites.
The EW4 user interface follows the same design paradigm as earlier versions of Expression Web, albeit with the darker color scheme that Expression products have been using in recent versions. While EW4 contains many features that you would expect in a Microsoft Office application, it does not resemble the Office 2007/2010 user interface, so there is no ribbon-style toolbar. (This is a bad thing if you love the Office ribbon and a good thing if you hate the Office ribbon; but I'll leave that up to you to decide. <grin>)
One minor personal issue that I have with Expression Web is that VBA was deprecated a while ago, so EW4 doesn't have a macro language that I can use to automate tasks like I would do with previous versions. It's possible to create "add-ins" for Expression Web, but there's a lot of overhead associated with that. From my perspective, that's pretty much like saying to someone, "I know that you would like to get across town and you already have a really nice car, but we're going to take that away. If you take 17 different buses and then walk three or four blocks, you will eventually wind up where you want to go. Of course, it will take you several hours longer and it's a really big hassle, but sooner or later you'll get there." (No comments about carbon footprint - please. <grin>)
That being said, EW4 is a great web site editor and is a good FTP client, and EW4 is much better than its predecessors. (Note: By "predecessors" I mean earlier versions of Expression Web and FrontPage.) I'll explain more in the following sections of this post.
Opening a site is straight-forward, and for the most part the user interface is the same whether you are opening a site over FTP/FTPS or over HTTP using WebDAV or FPSE.
When you are opening an FTP or HTTP site for the first time, your list of managed sites will be empty. As you open sites, the list of sites will be populated for each site there you have the Add to managed sites check box selected.
Once you have entered your site information, EW4 will prompt you for your remote editing options. This allows you to choose between editing the live site over FTP or editing a local copy and publishing your changes at a later date & time.
The last dialog before opening the FTP site is the all-too-familiar prompt for your user credentials, albeit with a warning about FTP credentials being transmitted without encryption. (This is why you should use FTPS, but I'll discuss that later in this post.)
Once the credentials have been verified by the FTP server, EW4 will display your site and you can begin editing your content.
EW4 has some basic site management functionality, which is accessed through the Site -> Manage Site List menu. From there you can add or remove sites from the list. Unfortunately you cannot modify the settings for sites in the list; you have to remove and re-add sites with different settings.
That's it for the simple stuff - now we'll take a look at the specific FTP topics that I've discussed in my other FTP client blog posts.
EW4 supports both Implicit and Explicit FTPS, so the choice is up to you to decide which method to use. The FTPS method is specified by the port number that you choose when you are connecting.
I realize that I have posted the following information in almost all of my posts in this FTP client series, but in the interests of completeness it needs to be said again - the following rules apply for FTP7 when determining whether you are using Implicit or Explicit FTPS:
EW4 doesn't have a way of specifying Explicit or Implicit FTPS other than the port numbers listed above. That being said, more often than not you will probably be using Explicit FTPS on the default port (21) so you won't need to enter a port at all.
For example, if you are using EW4 with Explicit FTPS on the default port, you can skip adding a port number.
However, if you are using Implicit FTPS, you need make sure that you configure EW4 to connect on port 990.
Because EW4's login dialog allows you to specify the virtual host name as part of the user credentials, EW4 works great with FTP7's virtual host names. All that you need to do is use the "ftp.example.com|username" or "ftp.example.com\username" syntax when specifying your username, and when you connect to the FTP7 server it will route your requests to the correct FTP virtual host site.
Unfortunately EW4 does not have built-in for the HOST command, nor does it have support for entering commands that will be sent before the client has logged in, so you cannot use true FTP host names when using EW4 to connect to FTP7 sites that are configured with host names.
This concludes our quick look at some of the FTP features that are available with EW4, and here are the scorecard results:
Client Name | Directory Browsing | Explicit FTPS | Implicit FTPS | Virtual Hosts | True HOSTs |
---|---|---|---|---|---|
Y | Y | Y | Y | N1 | |
1 As noted earlier, EW4 has no way to send a HOST command, so true FTP HOSTs are not supported. |
Note: I've included the following disclaimer in all of my posts, and this post is no exception - there are a great number of additional features that EW4 provides - once again I'm just keeping the focus on those topic areas that apply to FTP7. ;-]
Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/