JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing WordPress 2.9.2 on Windows Server 2003 using Microsoft's Web Platform Installer

I recently had need to install and test WordPress for some possible work. While I was tempted to go the Linux route, shortly after the OS was setup I decided to skip that and stick with Windows. Since Microsoft has released a platform that supposedly makes it easy to install Web-related applications, I decided to give it a try to determine just how simple it was.

What follows is an overview of the setup process to install WordPress 2.9.2 on Windows Server 2003, using Microsoft's Web Platform Installer.

Web Platform Installer

The Microsoft Web Platform Installer can be downloaded from Microsoft.com and acts as middle-ground between all of the various applications that it covers, which is fairly robust (a full listing is available).

As you can see in Figure 1, WordPress is available along with a handful of other blogging applications. Upon selecting this and pressing Install, you're presented with the listing of dependencies and other applications that may be required (Figures 2, 3, and 4).

While I was going to install MySQL on a dedicated virtual machine, and was able to deselect that, for ease I've kept in selected here. At this time I'm not sure (yet) of how that would impact the installation process.

Since MySQL was being installed, I was prompted, right away before anything was downloaded, for an administrator password, as seen in Figure 5. Even though I thought I had everything installed for IIS, I was also prompted, as shown in Figure 6, for a Windows Server 2003 disc.

Figure 7 alludes to the fact that the individual requirements are downloaded and installed, moving right into the setup of any Web sites as required, as seen in Figure 8. In this case I kept the defaults. Additional WordPress setups are shown in Figures 9, 10, 11, and 12, where the database is setup. It's been a while since I've installed MySQL, so how this relates to that installation is unknown.

Once all components have been installed, you're presented with a nice little screen, like Figure 13. You can then launch WordPress and go through the setups necessary (Figures 14 and 15), log in (Figure 16) and view the administrative interface (Figure 17) and home page (Figure 18).

Thoughts on the Platform Installer

While I initially didn't think much of the installer, having actually used it, I'm pleasantly surprised. It's an extremely simple process, similar to how one might install applications through, say, Ubuntu.

It takes a lot of the guess-work out of the process, which is rather nice. On the other hand, while I can get going with WordPress at this point (and I was able to do my testing fairly quickly), the disadvantage of this is that I don't know any of the complexities of the setup process. I haven't installed WordPress (or PHP, or MySQL), but rather an installer has. But, I like the challenge of figuring things out on my own.

Which is why while I like the Installer, and will definitely use it when I need to quickly test something, for the most part I'll probably stick with old-fashioned methods of installation.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing SQL Server Express 2008 on Windows Server 2003

SQL Server Express is an easy way to add Microsoft SQL Server to a Windows-based server. While limited in functionality, SQL Server Express is still a viable solution.

In this article I'll be covering a custom install of SQL Server Express 2008 on Windows Server 2003.

Server system

For this install I was running Windows Server 2003 R2, Enterprise Edition, Service Pack 2 on Sun VirtualBox, with 256 MB of RAM. All updates were downloaded and installed.

Downloading the installers

SQL Server Express 2008 can be installed using the Microsoft Web Platform Installer, or a 'custom' install can be downloaded. For the most flexibility and experience, I'll be covering the install using the Runtime with Management Tools option.

You'll also want to grab the Windows PowerShell 1.0 installer for Windows Server 2003, if you haven't installed it already. If you're not sure, you can hold off until later in the install.

Installing Microsoft SQL Server Express 2008

After starting the installer you'll eventually reach the Installation tab, as seen in Figure 1. For our simple installation, we'll use the first option of "New SQL Server stand-alone installation or add features to an existing installation."

A quick check will be run to determine if there might be any issues installing setup files (Figure 2).

Since we we're installing the Express edition of SQL Server 2008, we won't need to enter a product key (Figure 3), so we can continue and install the setup support files (Figure 4).

Once that's complete we start the actual install. A number of checks are run, one of which is for Windows PowerShell, as shown in Figure 5. Run the installer (Figure 6) if needed and re-run the check once it's complete. If you have any other issues, you should fix those until you can continue (Figure 7).

Feature Selection

Next we'll need to choose what features we want to install (Figure 8). Since we want an instance of SQL Server, we'll choose Database Engine Services. We'll also choose Management Tools - Basic so that we can manage our instance (databases, tables, users, etcetera) via a GUI. If you want, you can install the management tools on another machine, if you'd prefer not having them on the server.

Instance Configuration

We'll stick with the default instance name, id, and root directory, as shown in Figure 9. The default generally works just fine.

Disk Space Requirements

Space requirements will be checked. Figure 10 if you need to see.

Server Configuration

At the next stage we'll setup the accounts that SQL Server Database Engine and SQL Server Browser run under. By default the local service account is used for the latter, and nothing by default is selected for the former. Startup types are also set here. See Figure 11.

By default the Network Service account is typically used, for the former, so we'll use that here, with no password needed. See Figure 12.

Database Engine Configuration

The next step is to setup accounts. Windows authentication mode is more secure, but if using Web applications, you'll probably need to switch to Mixed Mode. Enter a password for the built-in account (Figure 13). To continue you'll also need to specify a SQL Server administrator. Adding the current user (which is what I did) is the easiest if using a virtual machine. This leaves us at something like Figure 14.

Error and Usage Reporting

If you want, you can sent error reports and feature usage data to Microsoft automatically. By default (Figure 15) the items are unchecked.

Installation Rules

A quick check will be done to determine if the install will work or not. Fix any issues that may come up, and once everything passes or is skipped (Figure 16), continue with the install.

Ready to Install

At this point you'll be given an overview of your selected options. Once you're ready, press the Install button. (See Figures 17 and 18.)

Installation Progress and Complete

The installation will begin and should complete (Figure 19). The final screen will display a link to the summary log, information about the setup/next steps, and any supplemental information (Figure 20).

Verifying the install

At this point you should be able to start Microsoft SQL Server Management Studio and log into the local instance, as shown in Figure 21.

You can also check to see if the service is running by opening Windows Task Manager and looking for sqlservr.exe and sqlwriter.exe (Figure 22).

And that's all there is to it.

Update: Installing to Windows Server 2008

Differences for installing on Windows Server 2008 (SP2):

No other changes need be made.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Using SQLite as a membership, profile, and role provider in ASP.NET MVC

I'd really like to implement membership providers in my Web applications, but just don't have the user-base that requires SQL Server (Express), nor the memory on my production server.

Having looked at SQLite before, I figured it would be exactly what I'd need, without going to the alternative of XML.

After some research I found Roger Martin's SQLite Membership, Role, and Profile Providers, and finally decided yesterday to implement these on a dummy MVC site.

However, when attempting to add this to my MVC site I kept running into issues, the last of which was an "Unable to open the database file."

The first issue was with the type declared in the examples on the page above; TechInfoSystems.Data.SQLiteProvider should be removed completely, as he suggests just adding the three classes to your site.

The second and last issue was that pesky database issue. At first I didn't think the app_data directory was getting pushed over, so I verified that I was pushing that as part of the Publish process (how they recommend you push a MVC site to production).

Upon further review it looks like the App_Data directory was placed inside the Bin directory. Google didn't help me much on whether that was the expected behavior, but it consistently did that. I added a ton of permissions to NETWORK SERVICE on the bin\app_data directory, but still the same pesky error.

So I commented out the membership, profile, and role items completely from web.config and added the following code to the Index view.

<%= AppDomain.CurrentDomain.GetData("DataDirectory").ToString() %>

Lo and behold, it was looking for it in the root of the site, exactly where I was expecting the App_Data directory to publish to.

Move the App_Data folder and sure enough, the site works (after uncommenting the Web.config provider information, of course) and I'm able to create a new user.

So, why does the publish process require me to move the App_Data directory?

The fix

In order to get the database pushing correctly I changed Copy to Output from Do not copy to Copy always. However, what really needed to happen was the Build Action needed to be changed to Content.

An App_Data directory is now created correctly, and the SQLite database is correctly placed in the directory.

Another gotcha

If you want troubles, change the applicationName in the Web.config for all three items. If you do this, you'll run into errors like "Attempt to write a read-only database attempt to write a readonly database" with a line reference suggesting there's an issue with roleManager. Comment that out, or that and membership and profile, and things will seem okay.

The issue is that the applicationName (SQLite ASP.NET Provider) is baked into the sample SQLite database. Durr.