Posterous theme by Cory Watilo

Installing Spree on Windows 2003 Server with IIS 6, Thin, Rails 3.0, Ruby 1.9.2 and IIRF

[Edit 12/2011] Added how to install the rmagick gem on Windows.  Forgot that the first time, I had to install the development headers for ImageMagick and learn the command to install rmagick on its own.

Note: The template on my blog currently cuts off long quoted lines, so you can't see all of the commands here. You can still copy and paste correctly. I'm seeing about switching templates to work better. Sorry.

The Spree Commerce project is one of the best open source Ruby on Rails commerce web applications available. That's rather easy to say, since there aren't really a lot of such projects, but Spree is rather good. Built on straightforward core functionality and leveraging Rails' foundation for extensibility, Spree has a small but healthy community and enjoys active development that keeps up with new Rails developments. If you're looking for a Rails 3 commerce site, Spree should definitely be a contender.

This article is certainly not meant to be a review of Spree though. Rather this is a log of my experience getting Spree set up on Windows. Since Windows still at this point seems to be somewhat of a second-class citizen for Ruby and Rails, there were a number of hoops to jump through, although it wasn't a terrible experience by any means.

By way of giving credit to the Ruby community for recognition of this fact, I will plug the RailsInstaller project, which got me up the curve of installing Rails on Windows. While I ended up uninstalling Railsinstaller and installing all of the various components myself later (so that I could mix and match them, which is more difficult with RailsInstaller), I still owe RI the debt of identifying many of the pieces for me and proving that it would all work before I decided to invest more time into it.

Things you need

I'm using the versions listed here. Since I haven't completely tested this, I can't guaran.

During the process, you will also be installing:

Nice to have

It also helps to have a good text editor like Sublime Text 2 (commercial) or Notepad++ (free open source).

Steps

For all installs, if an option is not mentioned, that means go with the default.

I use ZipInstaller to install some of these, so it is first. You don't have to use ZipInstaller, but it makes managing apps and uninstalling nicer.

Install ZipInstaller

Using ZipInstaller 1.21

  1. Download zipinst.zip (near bottom of page, with help in zip)
  2. Double-click zipinst.zip
  3. Double-click zipinst.exe
  4. Select zipinst.zip, click Continue
  5. Select Install for All Users and Remember Settings
  6. Click OK
  7. Run ZipInstaller from Start Menu
  8. Click Options
  9. Select Add ZipInstaller to context menu
  10. Click OK
  11. Cancel out of ZipInstaller

Now all zip files have a context menu entry to run ZipInstaller on them.

Install Ruby

Using RubyInstaller 1.9.2

Note: as of this time, the spree developers don't claim 1.9.2 compatibility, so you may be better off with 1.8.7, which is officially supported.

  1. Download rubyinstaller-1.9.2-p180.exe
  2. Run the installer
  3. Check the box to add the Ruby executables to your path

Update RubyGems and rake

After the install is complete, open a command prompt and issue the commands:

gem update --system
gem install rake

which updated my system to RubyGems 1.8.5 and rake 0.9.2. The rake update is required, but the gems update is just good practice.

If you want you can add --no-ri --no-rdoc to any gem install command to skip installing the developer documentation

Install DevKit

Using DevKit 4.5.1

If you don't want to use ZipInstaller, just unzip the files to C:\DevKit.

  1. Download DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe
  2. Create DevKit subdirectory and extract to there
  3. Zip all the files in the directory (not the directory itself) and use ZipInstaller to install to C:\DevKit (say no when ZipInstaller says it's detected an installer inside)
  4. Open a command prompt and go to C:\DevKit
  5. Run ruby dk.rb init
  6. Run ruby dk.rb install

Note that the download site has instructions for installing DevKit for more than one Ruby install, if you want to go that route.

Install Git

Using Git 1.7.4

  1. Download Git-1.7.4-preview20110204.exe
  2. Run the installer
  3. No Explorer integration for me
  4. Select Run Git from the Windows Command Prompt
  5. [Edit] Set the HOME environment variable to point to your [username] directory (or and Settings[username]) by going to Start Menu > Computer, right-click and select Properties, then Advanced and under User variables, make a new home variable.

Note that Git on Windows is sensitive to the location, since that location is assumed by other tools in the git toolbox. If you don't make it in that location, you're liable to run into a mismatch and be scratching your head as to why it's failing to authenticate.

Install Image Magick

Using Image Magick 6.7.0

  1. Download ImageMagick-6.7.0-8-Q16-windows-dll.exe
  2. Run the installer
  3. When the options page comes up, select to install the development headers

Install SQLite

Using SQLite 3.7.6.3

  1. Download sqlite-shell-win32-x86-3070603.zip and sqlite-dll-win32-x86-3070603.zip
  2. Extract to C:\Ruby192\bin

Optional: Install SQLite2009 Pro Enterprise Manager

Using SQLite2009 Pro Enterprise Manager 2011.05.20

This is the most complete and easiest to use SQLite GUI, although I also like SQLite Administrator. Enterprise Manager has a definite edge in presentation though.

Note that in order to see your SQLite database files in the open file dialog, you have to rename their extension to .db3. You could do this for your development and test databases by changing the filenames and updating your database.yml file, but I prefer to copy the files off to another location and rename them there.

  1. Download SQLite2009Pro-v3.7.6.3.zip
  2. Unzip and run the installer

Install MySQL

Using MySQL 5.5.13

If you already have MySQL installed on your server but it does not have the InnoDB storage engine configured, you can run the Instance Configuration Wizard to turn on the engine. Use the settings below. You do not have to do anything to your existing schemas in the db. Any new schemas will have InnoDB available, which is what you want.

  1. Download mysql-5.5.13-win32.msi
  2. Run the installer
  3. Choose middle server size option (medium memory usage)
  4. Required: Choose default InnoDB storage engine

When the install is complete, copy \lib\libmysql.dll to C:\Ruby192\bin

Install MySQL Workbench

Using MySQL Workbench 5.2.34

  1. Download mysql-workbench-gpl-5.2.34.1-win32.msi
  2. Run the installer

Configure MySQL

When the install is complete, open MySQL Workbench, connect to the database and create a new schema called spree_production.

Install Rails 3.0

Using Rails 3.0.9

Note: working directory doesn't matter when installing gems, they will automatically go in your Ruby install directory.

  1. Open a command prompt
  2. Issue the command:

gem install rails -v 3.0.9

Note: the documentation part of the install failed with an error but it should still run.

Install mysql2

Using mysql2 0.2.8 gem

Still at the command prompt, issue the command:

gem install mysql2 -v 0.2.8 -- '--with-mysql-dir="C:\Program Files\MySQL\MySQL Server 5.5"'

There are more recent versions in the 0.2 line (currently 0.2.10), but some won't compile on Windows.

Install rmagick

Still at the command prompt, issue the command:

gem install rmagick -- '--with-opt-dir="C:\Program Files\ImageMagick-6.7.0-Q16"'

This one will take a while.

Install EventMachine

Issue the command:

gem install eventmachine --pre

Install Thin

Issue the command:

gem install thin

Install Spree

Using Spree master edge

Change directory to the parent directory of your future rails project Issue the command:

rails new spree -d mysql
  1. Now find the Gemfile in the root of your spree directory (for our purposes, let's call it C:)
  2. Open it in a text editor
  3. Before the line for gem 'mysql2', insert the line:

    gem 'sqlite3'

Change the line for mysql2 to specify the version:

gem 'mysql2', '0.2.8'

At the end of the file, add the line:

gem 'spree', :git => 'git://github.com/spree/spree.git'

I also use spree_flexi_variants, so I add:

gem 'spree_flexi_variants', :git => 'git://github.com/jsqu99/spree_flexi_variants'

Save the file.

At the command line, change to the spree directory and issue the command:

bundle install

I like using SQLite for development and test since I can copy the files easily to other environments. To do so, paste in these values, completely replacing the old ones:

development:  adapter: sqlite3  database: db/development.sqlite3  pool: 5  timeout: 5000# Warning: The database defined as "test" will be erased and# re-generated from your development database when you run "rake".# Do not set this db to the same as development or production.test:  adapter: sqlite3  database: db/test.sqlite3  pool: 5  timeout: 5000

Otherwise add the database login password to the existing environments. Don't forget to create the schemas in the db as well.

Also, add the password for the account to the production environment.

Note: It is customary to create a separate, more limited account than the root account, which you would use to connect to the MySQL database in a more secure fashion. I don't go into the details of how to do that here. These instructions are provided AS IS and I'm not liable for any issues that may arise from following them. You've been warned.

Issue the commands:

rake db:createrails g spree:siterake spree:installrake spree_sample:installrake spree_flexi_variants:installrake db:bootstrap

Test the installation by using the command:

thin start

then point your browser at http://localhost:3000/. You should see the default spree install.

This does the install for the development environment. You still need to initialize the production environment:

set RAILS_ENV=productionrake db:migraterake db:seedrake db:admin:create

Put the site under version control

git init

Replace the .gitignore file contents with:

.bundledb/*.sqlite3*log/*.log*.log/tmp/doc/*.swp*~.project.DS_Store

Run:

git add .git commit -m "Initial commit"

Install SRVSTART

Using SRVSTART 1.1

  1. Download srvstart_run.v110.zip
  2. Right-click and run ZipInstaller

Configure SRVSTART

In C:\Program Files\SRVSTART, create the file, srvstart.ini and add the lines:

[spree1]startup=c:\ruby192\bin\ruby.exe C:\ruby192\bin\thin -p 3001 startstartup_dir=e:\spreedebug=0debug_out=>e:\spree\log\thin.log

This will start spree in development mode on port 3001. To switch to production mode, add -e production before start on the startup line.

Note: You can only stop this service when the ruby interpreter it spawns is the direct child of srvstart (it kills the child). This precludes you from running thin.bat, or using bundle exec thin start to run thin. Perhaps you could use bundle exec if it called ruby to start thin, as above, but I didn't play with that.

Install Windows Service Commander

Using Windows Service Commander 1.0.6

  1. Download windows-service-commander-setup.exe
  2. Run the installer

Configure Windows Service Commander

  1. Run Windows Service Commander
  2. Select the Tools > Install new service... menu
  3. Click Next >
  4. For path to the service executable, enter:

c:\Program Files\srvstart\srvstart.exe svc spree1 -c "C:\Program Files\srvstart\srvstart.ini"

  1. Click Next >
  2. For Name, enter 'spreeThin1'
  3. For Display Name, enter 'spreeThin1'
  4. For Description, enter 'Spree commerce web app server'
  5. Click Next >
  6. Click Next > again
  7. For Startup, select Automatic
  8. For Error, select Normal (this is what Bitnami does)
  9. Click Next >
  10. Select Start the service immediately
  11. Click Finish

The service should start immediately. Check Process Manager to see your ruby executable. Test the server by going to http://localhost:3001/ with your web browser. You should see the default spree site.

The service can now be started and stopped with either Windows Service Commander or the regular Services Administrative Tool. Stopping the service means killing ruby outright, which is not very graceful, so be aware that on a high volume site you may kill spree in the middle of writing something important. This is why it's important to use a real database such as MySQL rather than SQLite on the back end in this configuration, which should keep you from borking your db entirely when you stop the service.

Create your website

In IIS manager, make a new website for spree. Point it to C:\spree\public.

If you are running multiple sites, you may need to add a host header for your site so you can listen to port 80 along with other web sites on IIS.

For SSL port, set 443.

Note: if you are running ASP.NET 4.0 or above, you will need to create a new application pool and assign the website to that application pool. Verify that the spree site is not using ASP.NET 4.0 (1.1 is fine) when you do so. This will prevent interference from ASP.NET 4.0's extensionless URL rewriting. See the following URL for a method of disabling extensionless URL rewriting entirely in ASP.NET 4.0 if you can't use another application pool:

http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770153

Install IIRF

Using IIRF 2.1.1.25

The 2.1 latest stable gave an installation error for me, so I used the previous 2.1.1.25 version.

  1. Download Iirf2.1.msi
  2. Run the installer
  3. Choose the spree website you made in the last step (unless you need rewriting on all of your sites, which I don't recommend)

Configure IIRF

Create the file C:\spree\public\iirf.ini and add the lines:

StatusInquiry ONRewriteLogLevel 3RewriteLog ..\log\iirfRewriteCond %{REQUEST_FILENAME} -fRewriteRule ^.*$ - [L]RewriteCond %{HTTPS} onRewriteHeader X_FORWARDED_PROTO ^$ httpsProxyPass ^/(.*)$ http://[your hostname]:3001/$1ProxyPassReverse / http://[your hostname]/

Check the status of IIRF by visiting http://[your hostname]/iirfstatus

After you have a working spree installation, don't forget to ratchet the LogLevel down to 0 or 1.

Optional: Configure hosts file

If you need to use host headers but are not yet in DNS, you can use the hosts file to locally define the IP for your site.

Open C:\WINDOWS\system32\drivers\etc\hosts and append with a space the fully-qualified domain name of your site on the same line as localhost.

Optional: Install IIS 6 Resource Kit Tools

Using IIS 6 Resource Kit Tools 1.0

If you don't already have a certificate installed for your site, you'll need one for SSL access to the administrative portion of your site. The IIS 6 Resource Kit Tools can help you do this.

  1. Download iis6rkt.exe
  2. Run the installer

  3. In IIS Manager, right-click the spree website and click Properties
  4. Under the Web Site tab, click the Properties button next to the log format dropdown
  5. Note the digits after 'W3SVC' in the log file name, this is the site ID
  6. Close the IIS manager dialogs
  7. Go to Start > IIS Resources > SelfSSL > SelfSSL
  8. Run selfssl /T /N:CN=[your FQDN] /S:[your site id]
  9. Respond y

Note: This will overwrite any existing certificate for your site, so use care on a production server.

Notes on the Install

If you have difficulties with the site, the logs are all in C:\spree\log. Between the iirf log (make sure you are checking the latest dated 'live' one), the production log for spree and the thin log (stop and start of the spreeThin service), you should have a good picture of what's happening.

I suggest becoming familiar with the reference materials for some of the important pieces:

I used the next-to-latest release of IIRF because of installation errors but I didn't try working around it by, say, replacing the dll with the latest one after installing the old one. Not enough time and it didn't seem like there were relevant changes to the latest code.

Getting music off of your IPod after your system has to be reinstalled

For the life of me, I don't know why Apple is considered the friendliest of the user experiences when they leave you dangling in the wind in the inevitable case of having lost your system and all of your music is tantalizingly still within your grasp on your Ipod. That you have to appeal to outside software to recover all of that material which you paid them for in the age of illicit free downloading just screams "go elsewhere", which makes no sense for Apple. Apparently they'd rather capitalize on the misfortune of the less-savvy having to replace their music collection which still exists but is kept behind Apple's own locked door on the device you paid them for.

In any case, if this happens to you, here's a link on how to get your music back on Windows.

Announcing clip-pandoc 1.2.7.638

Clip-pandoc home

I'm pleased to share a little tool I made to use Pandoc from Notepad++. It allows you to easily select text and run it through the Pandoc executable, provided you have it installed on your system and in the path.
One important note: the current installer will overwrite any custom Notepad++ "Run" commands, so please do not install it if you have ones. I'm working on addressing this soon.
The tool adds "from" and "to" commands to the Notepad++ "Run" menu for various formats, including:

  • Markdown (Pandoc enhanced and strict)
  • HTML
  • Textile
This is just an initial release, so please understand it's far from perfect for general use. I'm sure some people will find it as handy as I do, though.
I use it primarily for authoring HTML content targeted at my blog and my websites. I typically write in Markdown, convert to HTML and post raw HTML into the blog/site.
To use the tool, write or paste your content in Notepad++, then select your conversion from the "Run" menu. A dialog appears, asking you to select your text. After clicking "OK", the highlighted text is replaced by the output of Pandoc.
I've only tested this on 32-bit Windows 7.
Enjoy.

Configuring mojoPortal to work with Feedburner's URL redirection feature

Note: as of version 2.3.6.1 of mojoPortal this configuration is no longer required as there is a better, supported mojoPortal configuration for it.  See the mojoPortal release notes for the details.  It even solves the auto-detection issue with IE and Firefox! Thanks Joe!


This article is about configuring the excellent open-source ASP.NET content management system, mojoPortal, for use with Feedburner. More specifically, it deals with how to get mojoPortal to agree with Feedburner's url redirection option.

Why would anyone be interested in doing this? Well, Feedburner is a great service for gathering statistics on your RSS subscribers and how they read your feed. Feedburner actually caches your feed contents, and users get the content from Feedburner, while your site is still the original source of the content.

In our case, there is an added benefit that by directing your users to read from Feedburner, their polling doesn't actually put load on your server, but Feedburner instead takes the load. For a bandwidth constrained site, this can be great.

However, the downside is that, unless you use a specific Feedburner feature, your users end up subscribing to their url. This means your audience is captive to Feedburner. Should you decide to stop using Feedburner for whatever reason (a better, free competitor, for example), you are stuck with the unappealing options of shepherding your readers to the new service manually, maintaining the old and new service simultaneously or abandoning your readers entirely. Perhaps they have a 301 redirect option which will work at that point, but an ounce of prevention, yada yada.

Fortunately, Feedburner offers a solution, although one not without it's problems. Still, it's better than the choices above. This is their url redirection feature. Or rather, yours, with some support from them.

In fact, this feature is recommended by them and others precisely because it mitigates the reader migration problem.

So where does mojoPortal fit in this? Well, the feature takes some support from your site. Many of the major blogs support this feature, and some CMSs do as well. In fact, mojoPortal's blog feature already supports publishing your feed via Feedburner's url in its Feed settings. Note, however that this doesn't support Feedburner's url redirection feature, so it still faces the reader migration issue.

Since using the url redirection feature makes good sense to me, I was surprised to learn that mojoPortal's implementation doesn't have it. I searched the mojoPortal forums, and since I didn't find anything on the subject, I posted my issue. While it didn't get much traction at first, there is some interest there so we'll see what happens with it.  In any case, after having to figure this out on my own, I can say it is indeed useful and if you'd like to implement it yourself, well, you don't have to wait for mojoPortal support, that's what this post is for. Note that it's not perfect and YMMV.

You can probably get away with less than this, especially if you have only one feed, but here's what it took in my case:

  1. A blog module instance (I also used the feed manager feature)
  2. A Feedburner account configured to "burn" the blog feed (one burn for each feed, actually)
  3. Enabling the url redirection feature within Feedburner's BrowserFriendly settings and configuration of a custom message
  4. A new file in the root of the mojoPortal installation directory (not the site), configured with an IIS 6 redirect (one of these for each feed, actually)
  5. A page in the site to list the site feeds
  6. An RSS "chicklet" in the sites layout.master file pointing to the feed list page

While it doesn't sound like a whole lot, the configuration did take me quite some time, so if you're not really needing this, I actually don't recommend taking the time to do it. Support from mojoPortal would have put it within easier reach however, so I'd still like to see that in the future perhaps.

If you only have one feed, I would skip the feed list page and instead link the RSS chicklet to your local feed url. Browsers should handle this correctly. When there's more than one, however, offering the user an explanation of the choices makes sense, although I could also see tying it directly to an aggregate feed for the site using the feed manager module.

So the basic idea is that the user subscribes to a url on your server, which is polled by their RSS reader application to fetch your content. In the meantime, your site is set up to redirect all traffic from that url to feedburner's burn of that feed.

As a quick sidebar, what happens to your users that have already subscribed before you implement this? They're out of luck and you're already stuck with the migration issue. Sorry.

The reader app initially hits your site each time it tries to read but is always directed to feedburner in the end. The type of redirect is a 302 (not a 301), which is a temporary redirect. This means that the reader app should continue using the local url and not try to replace its configuration to go straight to feedburner in the future.

There are a couple methods for accomplishing this result, shown by the feedburner docs here. The reason there is any complication at all is that when feedburner tries to fetch the original content, you don't want it to be redirected to itself like all the rest of the clients. The easiest way to do this with IIS is to use a separate url from the original blog url to perform the redirect. Fortunately, mojoPortal's feedburner configuration is just the tool to enable us to use this model, as we will see.

What does feedburner's url redirection "feature" actually give you, since it's actually your site doing the redirection? While feedburner doesn't explicitly do any of the redirection, it needs to support your url as the canonical one whenever a user lands on your feed's page at feedburner.

If a user does end up clicking on your feed url, they'll be redirected to the feed at feedburner. This does two things. First, rather than showing them the raw xml for your feed, it detects that it's being read by a browser and instead shows a nicely formatted html landing page. This is desirable. Second, the browser detects the redirection and changes the address bar url to the feedburner url. This is undesirable, but can't be changed.

So, when the user gets to the landing page (a feature feedburner calls "BrowserFriendly"), they see a couple other things along with the feed articles. They see a wide range reader application subscription chicklets, supplied by feedburner. They also see a custom message from you, the feed owner. When you use redirection, it's those subscription chicklets that you're concerned about. By offering the redirection feature, feedburner allows you to tell it your local feed url, which it then puts in those chicklets. That way, it all works correctly should the user use one of those buttons.

We can also make use of that customized message, even though it's not necessarily part of url redirection feature. When the user lands on the feedburner page, they may instinctively go to copy the url from the address bar to paste in their reader. While we can't stop this, we at least have the chance to put up a message that says, "Hey, don't do that...copy this url instead."

So what does the user go through to subscribe? Unfortunately, the answer depends on which of the myriad RSS subscription options they prefer. And there's the rub, since a some of them end up subscribing the user to the feedburner url, which is what this is all trying to avoid. Luckily, this can almost but all be avoided, with the minor inconvenience that we need to avoid the browser's "feed auto-detection" wherever possible.

If the user prefers browser feed detection, Firefox and IE screw it up. Rather than land them on feedburner's landing page, they go straight to the feedburner url and offer to subscribe the user to that. Boo. We can't fix the browsers, so we want to avoid the auto-detection feature. Unfortunately, mojoPortal triggers auto-detection automatically and doesn't have a option to disable that. Feature request. It can be done, it just requires a new option.

It should be noted that at least some of Chrome's auto-detectors work properly (there are several auto-detect extensions, and mine works) and that Firefox 4 does away with auto-detect entirely from the conventional UI, so things are moving in the right direction. Perhaps IE 9 will come into line in some fashion as well.

If the user uses one of the mojoPortal blog's "add to reader x" buttons, everything works. As well, if they go to the feedburner url directly (and this does work in all browsers, it's just auto-detect that's borked), then they receive the landing page which informs them to copy and paste the correct url, or to use one of the subscription buttons for their reader (also correct).

wFinally, if the user right-clicks the blog's feed link and copies that into their reader, it works. Only the layout.master RSS chicklet link won't work, and that's just because I have it configured to point to a page which lists the feeds. If you configure this to be the feed url instead, it will also work.

So the only other way for the user to subscribe to the wrong url, other than the broken auto-detect feature (which is significant), is if after they click on the feed link, they skim over the message dictating the correct url and instead copy it from the address bar. While I can't say this won't happen, we've given the user more attractive options for subscribing as well as telling them what not to do.

Here are the detailed implementation steps:

Blog


  1. Create a blog instance. I recommend enabling the "Add feed links" option, even though I'm not quite sure all of them work since I don't have accounts on all of them.
  2. View it
  3. Right-click the RSS feed chicklet and copy the link address. This is your "back-door" url that only feedburner will use.
    q
    We'll come back to the blog settings later, save for now.

Now choose a "front-door" url for your feed. I've adopted "pagename-rss.aspx" where "pagename" is the name of the page which the blog module inhabits. Since it will be in the root of your mojoPortal install, the url will be "http://www.yoursitename.com/pagename-rss.aspx". We'll configure IIS with this page after Feedburner.

Feedburner


  1. Create an account if you don't have one
  2. Paste in the back-door url for the blog and "burn it now". I used the default settings, but go back later and check out the options.
  3. When you get your feed url, copy it
  4. Open your feed settings and go to "Optimize"
  5. Click "BrowserFriendly" on the left
  6. Enable personal message and put in something like this along with your front-door url:
  7. To subscribe to this feed, do not use the feedburner url in the address bar above. Instead use one of the buttons to the right or copy this url into your feed reader. This will make sure you continue to receive our feed should we stop using the feedburner service: http://www.yoursitename.com/pagename-rss.aspx
  8. Click the "Use your redirected feed URL on your BrowserFriendly landing page" dropdown and put in your front-door url.
  9. Click "Save"

IIS


These directions are for IIS 6. To use IIS 7, you'll need to google the directions for setting up redirects as well as make sure you are configuring 302 redirects. IIS 6 uses 302s by default.

  1. Using Windows Explorer, visit the mojoPortal installation root directory and create the file "pagename-rss.aspx"
  2. Open IIS manager, find the newly created file and right-click, selecting "Properties"
  3. Select "redirect to a url" and paste the feedburner url
  4. Click "Apply" and close

Blog (again)


  1. Go into your blog settings, to feed settings
  2. Under "Feedburner URL" enter your front-door url not the feedburner url
  3. Update

Layout.master (optional)


  1. If you don't have one, add an RSS chicklet to your layout and tie the url to either your front-door url or, if you want to offer users a choice of the feeds on your site, the url of a page on which you list your feeds

If you choose to list your feeds, I suggest changing the title attribute of the image to say something like "Click to view the feeds offered on this site", rather than my layout's default "Click to subscribe". This may give the user a heads-up to not attempt to subscribe directly to that link.

Feeds page (optional)


I made a page with the intro:

The following feeds are available from this site. Choose your desired feed and copy and paste the feed URL into your reader, or use one of the application-specific subscription buttons. (Note: the links on the left take you to the associated web page, not the RSS version)

I followed this with a table with the columns: page, feed url, description and subscribe. "Page" with page title and linked to the site page, "Feed url" with just the text of the link but not a live link (so they can only copy the correct url), and "Subscribe" with my own html version of the application subscription chicklets. The subscription urls I copied from the feedburner landing page (I used these instead of mojoPortal's since they were different). I would have linked to the same images as well but they didn't always show so I copied them from the web and saved locally. I used "myAOL", "Windows Live", "My Yahoo!", "Google" and "newsgator".

That's it. Test by visiting the pages and using the various subscription methods. With the noted exceptions (auto-detection, various reader accounts I couldn't test), they all worked for me.

mojoPortal Support Wishlist


While I'm not holding my breath, the following features would be nice for supporting this setup:

  1. Option to disable rss auto-detection for blogs (feed manager? forums?)
  2. Option to enable 302 redirects in feed settings from a front-door url to a back-door url without the need to use IIS and make a file
  3. A module to create a list of site feeds automatically (just a nice to have). Perhaps feed manager can already be configured to work somewhat like the page I made, but application chicklets per-feed are useful.

Awesome x 2

In my sundry attempts at finding a decent tabbed Windows Explorer replacement, there has always been some fly in the ointment.  My last favorite was a good one, Cubic Explorer was a good one, the best I’ve seen, but alas, problems with Windows 7 and some niggling bugs have kept it from my newly installed OS.  Such is life.

Nothing works like Explorer.  It’s only downfall is its over-minimalist (if that’s not an oxymoron) approach.  Tabs.  Come on.  The Windows 7 version is a big improvement with Libraries and a default-shown folder tree panel, but really.  Tabs.  Come on.

Here’s a solution I’m trying, and it looks great.  As long as it’s not buggy, I’d say it’s a winner above any solution that isn’t based on Explorer itself:

http://qttabbar.sourceforge.net/

If anyone else tries it and likes/dislikes it, feel free to let me know your experience.

Changing the "Edit" context-menu entry for JPGs

If you work on a lot of JPGs, it can be annoying to have a context-menu entry that says "Edit" which takes you to the paltry and useless Microsoft Paint.  Why can't it bring up, say, Paint.NET?

There is a program that will let you edit this and any other "default" program for built-in system actions such as the Edit menu entry.  It's called, aptly enough, Default Programs Editor.  There's a few steps to it but it's simple enough.

For this change you have to choose the "File Types Setting" entry, "Context Menu" and then search for ".jpg".  When you get there, you see the various context menu entries and the programs they call.  Reset the "Edit" entry to point to Paint.NET's executable (don't forget the "%1" with quotes to pass the filename as the argument), and you're done.

Font Loader and Register Server Shell Extensions

Ran across this useful utility since I’m loading a ton of fonts on my XP laptop (Windows 7 already has this kind of thing built-in).  It adds a context menu entry to load/unload or install/uninstall fonts when you right-click font filetypes.  Nifty.

Warning, though.  It installs the fonts in-place, rather than moving them to the Windows fonts directory.  This means two things: put them in their own folder, like My Documents\Fonts, and don’t delete them.

I only realized that after I installed them, so I moved the files then edited the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts to repoint the file locations.

It also supports adding a register/unregister dll context menu entry, something I’ve done with manual registry hacks before.  That’s cool.

MMoon Software Shell Tools

Google Sitemap Generation

Just a quick note.  I've been trying to find a tool to tweak google sitemaps and did an off-the-cuff (read, not thorough) comparison of several free sitemap generators.

The best one seems to be GSiteMapper.  It is fairly sophisticated about what it includes and doesn't include, checking with Google for what is already indexed, respects robots.txt, handles session IDs, etc, etc.  Note it must run as administrator under Windows 7 or else it just sits there doing nothing while it is trying to crawl your site.

Stamping Versions

Ok, well, this isn't the most likely thing you'll need to do today, but I needed to put a four-place version number on an executable built with VB6.  Unfortunately, VB6 only used three of the four place-numbers for versions.  I've been looking for a solution to this for a while, and thought I had one when I came across vbAdvance, but unfortunately vbAdvance only seems to work while you are in the IDE.  Invoking the IDE to make from the command line won't load and use vbAdvance's versioning, even when you tick the optional "command-line" box in the add-in page.

There are a number of resource editors out there that will change executable properties after the compilation step, but they are either commercial, complicated or not command-line.

I finally ran across a simple command-line freeware tool to do just this one thing, called stampver.  You can find it discussed at http://www.codeguru.com/tools/standalonetools/article.php/c1403.  It seems to be doing the trick perfectly, so far.  I'm a little anxious about fussing with a file after compilation, but I don't have any other good options at the moment.

The two things to note about stampver: First, it stamps the file and product version attributes separately, so I've had to run it twice on each file, one for each.  Second, the version stamped can be no more places than the string already compiled into the executable.  This means you need to set extra places in a three-place version if you want space for four places after it has been compiled.  I did this by setting all three places to '9999'.

Free SQL Profiler

I'm using a SQL database from my workstation, which only has the Management Studio installed but the the profiling tools (which don't come with the stand-alone management studio install).

I need to run a trace on the server, but I don't have full access and I don't want to go through the full SQL installer just to get the profiling tools, even if I were to figure out how to do that.

I stumbled across this open-source profiler for SQL Server 2005/2008 Express which looks like it might do the trick:

http://sites.google.com/site/sqlprofiler/

Looks like it does the trick.  I had to run as a user with administrative privileges (access to sys.traces is key), so your mileage may vary.

It's not a very sophisticated tool.  For example, I didn't see a way to save the results of my trace.  That's a big annoyance.

The filtering and event system is fairly straightforward.  I had to identify the database in which I was interested, as well as the events that looked like they might have anything to do with the queries which I was hunting...commits, sql statements, stored procedures and batches looked like they might be events I was interested in.  In the end, this gave me a lot more information than I wanted, which I then had to comb through in the program's UI.  If I had a better idea as to what the events meant, I could probably cut down the volume of info.  Dumping to CSV would allow me to use my favorite data dicing tool, Excel.

But, all in all, I was able to get the information I was looking for, so I appreciate a free tool.  Perhaps it can do you some good as well.