Some Useful and Obscure FTP Configuration Settings

I get a lot of question about various configuration settings for the IIS FTP service, and most of the settings that I discuss with people can be configured through the FTP features in the IIS Manager. That being said, there are some useful configuration settings for the FTP service which I periodical send to people that have no user interface for setting them. With that in mind, I thought I would write a quick blog to point out a few of these obscure settings that I personally use the most-often or I send to other people.

Using Domain Name Syntax as an FTP Virtual Hostname

I use this setting on all of my FTP servers because it seems a little more natural to me. Here's the scenario: the IIS FTP service supports two kinds of hostnames:

  • "Real" FTP hostnames - these are real FTP hostnames that are specified by using the FTP HOST command (as defined in RFC 7151)
  • "Virtual" ftp hostnames - these are FTP hostnames that are specified as part of the FTP USER command

Real FTP hostnames are pretty straight-forward: an FTP client specifies the hostname with a HOST command when a user is connecting to the server. Once the IIS FTP service receives that command, the FTP service routes the FTP session to the correct FTP site.

That being said, the FTP HOST command is still rather new, so only a handful of FTP clients currently support it. Because of that, you can use FTP "virtual" hostnames with the IIS FTP service. By default that syntax uses the "vertical line" or "pipe" character to differentiate between the hostname and user name. For example:

  • "ftp.contoso.com|username"
  • "ftp.fabrikam.com|username"

When you are specifying your FTP credentials in your FTP client, you would enter your username like the preceding examples. While this syntax is valid for both the IIS FTP service and the underlying FTP protocol, it seems a little odd to most users (including me). With that in mind, we added a configuration setting for the FTP service that will allow you to use the more-familiar domain\username syntax like the following examples:

  • "ftp.contoso.com\username"
  • "ftp.fabrikam.com\username"

To enable this feature, use the following steps:

  1. Open a command prompt as an administrator.
  2. Type the following commands:
    cd /d "%SystemRoot%\System32\Inetsrv"
    appcmd.exe set config -section:system.ftpServer/serverRuntime /hostNameSupport.useDomainNameAsHostName:"True" /commit:apphost
    net.exe stop FTPSVC
    net.exe start FTPSVC
  3. Close the command prompt.

More information about this feature is available in the IIS configuration reference at the following URL:

FTP Credential Caching

The FTP service caches user credentials for successfully-authenticated user sessions in order to help improve login performance, and I wrote the following detailed blog about this a couple of years ago:

Credential Caching in FTP 7.0 and FTP 7.5

I don't want to re-post an old blog, but I have sent several people to that blog over the years, so I thought that it was worth mentioning here since it seems to be referenced quite often. The problem that people seem to run into the most is that their old password is still valid for FTP after they have changed it, and this is caused by the FTP service caching their user credentials.

This is especially annoying for me personally when I am working on a development computer where I am creating an authentication provider. Unless I disable credential caching on my development computer, I can never seem to get any work done. To resolve this issue, I disable credential caching for the FTP service by using the following steps:

  1. Open a command prompt as an administrator.
  2. Type the following commands:
    cd /d "%SystemRoot%\System32\Inetsrv"
    appcmd.exe set config -section:system.ftpServer/caching /credentialsCache.enabled:"False" /commit:apphost
    net.exe stop FTPSVC
    net.exe start FTPSVC
  3. Close the command prompt.

The blog which I mentioned earlier goes into more detail about setting a custom timeout interval for credential caching instead of disabling the feature entirely, and all of the settings for FTP credential caching are in the IIS configuration reference at the following URLs:

FTP Client Certificate Authentication

FTP Client Certificate Authentication is an often-overlooked feature of the IIS FTP service, and I think that this is due to two reasons:

  1. There is no user interface to configure the required settings
  2. Configuring the required settings is very difficult

My second reason cannot be understated; I usually have to set up FTP Client Certificate Authentication once or twice a year in order to test various scenarios, and each time I do so I am reminded of just how difficult it can be to get everything right, and equally how easy it is to get something wrong.

Fortunately I took the time a couple of years ago to write a blog which documents everything that it takes to configure the FTP service, and I have used my notes in that blog several times. In complement to my blog on the subject, Vivek Kumbhar wrote an excellent blog series with additional steps to configure your Active Directory for certificate authentication. With that in mind, here are all of the requisite blog posts that you would need to set up this feature:

As I have mentioned before, configuring this feature is not for the faint-of-heart, but it can be very beneficial from a security standpoint.

For more information about the settings that are required for FTP Client Certificate Authentication, see the following articles in the IIS configuration reference:

That wraps it up for today's post. ;-]


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

A Short Ride on a Hot Summer Day

I thought that I would take a quick 9-mile ride today in the 100F+ afternoon temperatures just to see what that was like. (Spoiler alert - this was a dumb idea.) My friend Keith had done a similar ride several years earlier on the hottest day in Seattle history, and even though he admitted in hindsight that it probably was a bad plan, sometimes experience is the best teacher - so this is a lesson that I had to learn for myself.

It is a measured 4.5 miles from my doorstep to the guard shack at the Saguaro National Park, which makes it a fairly easy 9-mile ride round-trip on a good day, (with the option of adding an additional 8 miles if you ride through the park itself). There is only 250 feet of elevation change from my house to the park, so I can generally average about 15mph without too much effort.

I use CycloMeter on my Windows Phone to track my rides, and it uses the Windows Phone "Zira" text-to-speech voice to announce each mile that I have travelled, every 10 minutes that I have been riding, and every 100 calories that I have burned.

CycloMeter

With that in mind, here is the conversation that ensued between my Windows Phone and me during today's ride:

  • Leaving the house:
    • Me: Hmm... it's a little warm. What's the temperature?
    • Me: [Looks at the Weather Channel app.]
    • Me: 101 degrees, not too bad.
  • At the 0.5-mile mark:
    • Me: Let's just casually glide between these speed bumps and the curb, shall we? No sense beating up the bike.
  • At the 1.0-mile mark:
    • Zira: You've ridden 1 mile.
    • Me: Yeah, yeah. I'm aware of that - I know right where I am.
  • At the 1.7-mile mark:
    • Me: OK - quick break at the Houghton Road stoplight. Time to hydrate.
  • At the 2.0-mile mark:
    • Me: There's the road that marks off 2 miles from my house.
    • Zira: You've ridden 2 miles.
    • Me: Um, yeah - didn't I just say that?
  • At the 2.5-mile mark:
    • Zira: You've burned 100 calories.
    • Me: Cool. Is it me, or is it getting warmer?
  • At the 3.0-mile mark:
    • Me: This was a dumb idea. I hate this hill.
    • Zira: You've ridden 3 miles.
    • Me: I must remember that this big hill with the turn is the 3-mile mark.
    • Me: (Didn't I tell myself that the last time I rode this way?)
  • At the 4.0-mile mark:
    • Me: This was a really dumb idea. It's pretty hot out here. How much Gatorade do I have left? Where am I?
    • Zira: You've ridden 4 miles.
    • Me: Oh, that's where I am. This was a really dumb idea.
  • At the 4.5-mile mark:
    • Me: OK - I'm at the guard shack; time to turn around. Should I stop to refill my water bottle? Nah, takes too long.
    • My Evil Subconscious: Hey, as long as I'm here, should I enter the park and add the 8-mile desert ride onto this?
    • My Good Subconscious: I hate you. Shut up.
  • At the 5.0-mile mark:
    • Zira: You've ridden 5 miles.
    • Me: It's really hot; did I mention that already? This was such a dumb idea.
    • Zira: You've burned 200 calories.
    • Me: Well, that takes care of lunch.
  • At the 6.0-mile mark:
    • Zira: You've ridden 6 miles.
    • Me: I'm almost out of Gatorade; I should have filled up with water at the park entrance. I'm such an idiot.
  • At the 6.7-mile mark:
    • Me: I should be at the 7-mile mark!!! What's up with this stupid GPS??? There's the stupid road that's 2 miles from my house!!!
    • Zira: (Silence.)
    • Me: Oh wait, wrong road; there's the correct road up ahead. This was a dumb idea.
  • At the 7.0-mile mark:
    • Zira: You've ridden 7 miles.
    • Me: Shut up. No one likes a smarty-pants. Why is it so hot?
  • At the 7.3-mile mark:
    • Me: Must catch the stoplight at Houghton Road...
    • Me: Must catch the stoplight at Houghton Road...
    • Me: Must catch the stoplight at Houghton Road...
    • Me: Caught it.
  • At the 7.5-mile mark:
    • Zira: You've burned 300 calories.
    • Me: By the time I get home, I will have burned off breakfast and lunch. How's my blood sugar? Is it crashing yet? Perhaps I should have eaten more?
  • At the 8.0-mile mark:
    • Zira: You've ridden 8 miles.
    • Me: Why does my Gatorade taste like I boiled it? Maybe a black water bottle was a bad idea.
  • At the 8.5-mile mark:
    • Me: Who put these stupid speed bumps here???
  • At the 8.9-mile mark:
    • Me: I'm right by the house!!! Why doesn't this stupid GPS say 9 miles???
    • My OCD Subconscious: You have to ride through the neighborhood to pick up the extra 0.1 miles and make it an even 9.0 miles.
    • My Hindsight Subconscious: You actually fell for that? You're an idiot.
  • At the 9.0-mile mark:
    • Zira: You've ridden 9 miles.
    • Me: I'm done!!! Throw bike in garage... Grab water bottle from fridge... Pour ice water in my hair and drink the rest... Jump in shower... Why is this tap water so warm??? I haven't even turned on the hot water!!!

That's pretty much how the whole ride went down. Just in case you were wondering, the starting and ending temperatures for the ride were both 101 degrees.

Did I mention at any point that this was a dumb idea?

A=444Hz Tuning and the Magic 528Hz Frequency

One of my guitar-playing friends recently posted the following article to Facebook as a joke:

http://themindunleashed.org/2014/03/miracle-528-hz-solfeggio-fibonacci-numbers.html

I know that my friend was just being silly, but the actual content of that piece is more drivel in a long line of mathematical silliness which forces me to heave a deep sigh for the fate of humanity. The article in question reinforces my conviction that some people will believe just about anything: bigfoot, aliens, unicorns, Obamacare, leprechauns, etc. But one of my personal favorites is the assertion that altering the base frequency in a tuning scale will somehow lead to a perfect universe.

What a bunch of hooey.

As I mentioned earlier, I know that my friend was posting the article to be silly, but just for the sake of argument, I can't resist taking a look at the math from the article. At the risk of being overly self-indulgent, I know that I have used my A=432Hz Tuning blog post to refute concepts like this in the past. But that being said, my blog post examines a lot of the actual math behind these sorts of silly ideas, and they just don't stand up to scrutiny. Oh sure, there's a bunch of purported facts in the article that my friend posted, (once you get past the gooey new age crap). But as I said earlier, people will believe just about anything.

Here's a case in point: when I visited Machu Picchu I was assured by my tour guide that one of the stones in one of the walls had been certified by NASA as the harmonic center point of all nature. I didn't believe my guide, but in hindsight her statement seems considerably more plausible than anything that was presented in the "Magic 528Hz" article. (Note: I meant that humorously; you can't trust NASA to find the harmonic center point of anything.)

In any event - let's take a look at some of the math from the 528Hz article, shall we?

If you use A=444Hz as the article suggests, that does NOT make the frequency for C fall on an even interval - it's off by a diminutive fraction:

Note Frequency
A 444.00 Hz
Bb 470.40 Hz
B 498.37 Hz
C 528.01 Hz
C# 559.40 Hz
D 592.67 Hz
Eb 627.91 Hz
E 665.25 Hz
F 704.81 Hz
F# 746.72 Hz
G 791.12 Hz
G# 838.16 Hz
A 888.00 Hz

As you can see, the frequency for C falls pretty close to 528Hz. But as I mentioned in my blog, what your ear actually wants to hear are frequencies which harmonically-derived perfect intervals across the scale. However, the frequencies in the tuning scale that the article's author is using are based on equal-temperament, which is a harmonically imperfect standard. Because of this fact, you would not use equal-tempered tuning if you were actually trying to calculate harmonically-perfect intervals, so the 528Hz article is completely busted right there. (On a side note, even frequencies in a full scale like this do not matter to your ear - because they just don't. Period. You can have uneven decimal points for perfect intervals in a harmonically-derived scale if you do your math correctly; arguing about decimal points is just stupid.)

That being said, the author spends a great deal of time rambling on and on about Fibonacci sequences, (which are really cool by the way). However, the author completely fails to mention (or perhaps to even notice) that 528 doesn't fall in the standard Fibonacci sequence:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377,
610, 987, 1597, 2584, 4181, 6765, 10946, etc.

Now, if the number 528 had actually fallen inside the standard Fibonacci sequence, that would have been a pretty cool factoid for the article. But that being said, it still wouldn't mean anything.

Just for the fun of it, let's see how we can manipulate the math a little, shall we?

For example, if you use A=431.33333Hz as your base frequency, then the frequency for Eb will be 610.00Hz, which is actually a valid number in a standard Fibonacci sequence. That's kind of amusing, but it doesn't mean anything useful. All that means is that I spent a lot of time in Excel typing in random base frequencies until I bumped into a number that worked. Likewise, if you use A=443.99Hz as your base frequency, then your C will actually be 528Hz, but that's just as useless. (And good luck trying to find a tuner that will let you use A=443.99Hz as your base frequency.)

In the end, the article which my friend posted to Facebook is an amusing work of fiction, although reading it will waste several minutes of your life which could have been spent doing something considerably more productive.