Blog-HowTo.com

When you want to blog, here is how to do it. Featuring technical solutions.

My Links

News

One way to use this blog is to begin reading at the first posts. You can use the archive link to find the earliest posts. Or you can use the category archive link to start reading the first category. Go to the bottom of the category page to see the first aricles.

Post Categories

Archives

Blog Stats

How to Install Subtext 1.9 at WebHost4Life

Subtext 1.9 has just been released. I am going to show you how to set up your own Subtext-powered blog, step by step. You can host Subtext on your own computer or at most web hosting providers. The Subtext team has had good success using WebHost4Life, so I'm going to use WebHost4Life for this example.

  1. Before doing anything else, make sure your hosting account is ready to go. If you do not have a web hosting account, now is the time to get your account set up at WebHostForLife. I provide step by step instructions here. I recommend this step first because there is usually a short delay between completing the signup process and your WebHostForLife account becoming activated.
  2. Download the latest version of Subtext here. Grab the file named Subtext_1.9.zip. (Or if you have Visual Studio 2005 and want to build from the source, get the other file.)
  3. When the Subtext_1.9.zip download has finished, unzip the file to a folder on your local machine. If you attempt to transfer the Subtext_1.9.zip directly to WebHostForLife and unzip it there, you will run into problems. WebHostForLife's unzip utility does not properly unzip files created by Nant. However, it doesn't have any problem with files create by every other zip utility I have tried. So unzip the Subtext archive on your local machine first.
  4. When the email containing your account information from WebHostForLife arrives, note the following items:
    1. Your Member ID and your password
    2. Your login URL for access to the Hosting Control Panel.
    3. You will get both a website URL and an FTP URL. You will actually get two of each.
      1. You will get temporary URLS that look like this:
        1. ftp://site999.mysite4now.com
        2. http://site999.mysite4now.com/YOURACCOUNT
      2. Once your DNS servers are set up your real URLs will soon work. If you want to understand more about why you need to specify DNS servers and how they work, go here. It can take a while before YOURDOMAINNAME will point to your correct hosting account.
        1. ftp://ftp.YOURDOMAINNAME.com/
        2. http://www.YOURDOMAINNAME.com/
  5. Althought it is not mentioned in the email from WebHostForLife, you do get a static IP address with your account. You can find this by looking in the Control Panel under DNS Zone Editor.
  6. Log in to your WebHostForLife account and go to the Control Panel. In the Control Panel, there are two menus.
    1. The Navigation Menu (nav menu) will be a horizonal toolbar-type ribbon near the top of the Control Panel page -- unless you have changed your Control Panel Settings. 
    2. The Sub Menus are on the left side of the Control Panel in a vertical panel.
  7. Click on "DNS" (globe/arrow icon) in the navigation menu.
  8. Make sure your domain name is selected in the drop down list and click Edit Zone.
  9. Make sure you have an entry for *.YOURDOMAINNAME.com. It should be there without any actions on your part. (If not, contact WebHost4Life support or add it on this page if you are comfortable doing that.)
  10. Click on "Site Admin" (gear icon) in the navigation menu.
  11. At the left of the Control Panel, in the "Sub Menus" section, click File Manager.
  12. In the "Create a new sub-folder in current folder" input box, enter wwwroot and click Create.
  13. Open this folder and repeat the process to create a folder named Subtext.Web inside wwwroot.
  14. Click on "Domains" in the navigation menu.
  15. click "View All Domains and Subdomains" in the Sub Menus (left side). You should see http://www.YOURDOMAINNAME.com listed. Click [Change Path]. (You may have to click [Go] also.)
  16. Specify a type of "Path" and for New Path, add wwwroot\Subtext.Web in the text box and click Update.
  17. Go back to "Domains" in the navigation menu and click "Subdomains Name" in the Sub Menus (left).
  18. Add a subdomain name (for example, blog) and map to wwwroot\Subtext.Web and click Add Domain. This step means that people will be able to navigate to your blog with this style URL: http://blog.YOURDOMAINNAME.com. The other options are all discussed at the link I just provided.
  19. Click "Site Admin" in the nav menu and then ".NET Application" in the sub menu.
  20. Change your web site to .NET 2.0. Click [change root's .net version].
  21. In the drop down list, select version 2.0.X and click Go.
    NOTE: As I write this, .NET 2.0 is listed as ".net v2.0.50727" in these pages. I don't expect any version changes until we reach .NET 3.0.
  22. If you are using multiple domains or subdomains, repeat the above step for each one.
  23. Request a database. Here are the steps:
    1. Click "Database" in the nav menu.
    2. Click "MSSQL Admin" in the sub menu.
    3. Verify that you don't already have a database for Subtext. If you have not already created one, you will not have one. However, if you are hosting multiple blogs on one Subtext installation, you will not need to create another database.
    4. In the row of tabs below the nav menu, click "Create New DB".
    5. For "MS SQL DB Name", I suggest "SubtextData". The name you choose is for internal use only, so pick any name you wish.
    6. For "DB User ID" select the SQL Server Login name you want to use. "SubtextDatabaseUser" would work.
    7. Choose a password.
    8. Make sure "SQL Version" is SQL 2005.
  24. Once your DB is created you will see the MSSQL Admin page. If not, click "Database" in the nav menu and Click "MSSQL Admin" in the sub menu. This will show you the Server IP for your database. It will look like sqlXXX.mysite4now.com. You'll need all the info on this page for your connection string. Copy it.
  25. Click "Database" in the nav menu. Populate the middle set of text boxes. The User ID is the same as what you just specified when you created the database. THe "MSSQL Server IP Address" is not an IP address. It is a domain name that looks like sqlXXX.mysite4now.com. It is part of the info I just told you to copy down. Click Create It.
  26. You will be able to administer this database using either Microsoft's SQL Server Management Studio on your local computer or with WebHost4Life's MSSQL Manager. However, WH4L makes your database user (e.g., SubtextDatabaseUser) the dbo by default, so you do not need to change anything yet.
  27. On your local machine, open the Subtext web.config file and make the following changes:
    1. In the <connectionStrings> section, alter the connection string along these lines:
      <add name="SubtextData" connectionString="Server=sql999.mysite4now.com;User Id=SubtextDatabaseUser;Password=YOURPASSWORD;Initial Catalog=SubtextData;" providerName="System.Data.SqlClient" />
    2. In the <Email> section, set up your smtp server, username and password. You can use your existing email account for now. Later you can set up an email account at WebHost4Life with your domain name, if you wish.
    3. Also in the <Email> section, set an adminEmail. This should be your personal email account. If you forget your Subtext password, login info will be sent to this email address.
    4. Look a little further down in the <appSettings> section and add an email address for HostEmailAddress. This is used similarly to the adminEmail, but it is for the HostAdmin account. In a default Subtext installation the user names and passwords for both accounts are the same, but the accounts are still distinct.
  28. Save web.config.
  29. Optional: customize your other configuration files.
    1. Log4Net.config
    2. ReverseDOS.config
    3. In web.config I also set the timeout value of the .SubtextCookie to a larger value so I can edit larger posts without timeouts.
    4. At WebHost4Life you can leave the trust level at "Full".
    5. You may want to check the ServerTimeZone value... (I have not tried changing it)
  30. Zip the Subtext files back up.
    1. If you are using the source code, get rid of all the hidden ".svn" folders before you zip it up. I do this the hard way (because I cannot locate the download link for a handy utility which does this automatically), which is:
      1. copy the Subtext.Web folder with the release version bin files to another location
      2. use Windows search to list all ".svn" files/folders. Select advanced options to show hidden files/folders.
      3. sort by name
      4. select all ".svn" folders and delete.
      5. You also don't need .pdb files or the obj folder. Likewise for .csproj and most .txt files.
    2. If you are using the Subtext source code to build your own version, all you need to deploy is the Subtext.Web folder and its contents. It doesn't really matter whether the zip file you create has Subtext.Web inside it as a subfolder or whether you put the local contents of Subtext.Web directly into the root of your zip archive. I prefer to the second approach because it is easier when you unzip it to your hosting account at WebHost4Life.
    3. If you are using any custom skins, add the skins folder(s) to the zip. Also add Skins.User.config to the Admin folder.
  31. ftp the zip file to your hosting account. I transfer it to wwwroot\Subtext.Web.
  32. Go back to the WebHost4Life control panel > File Manager and navigate to wwwroot\Subtext.Web. Unzip the file and again specify the location as wwwroot\Subtext.Web. Click Submit. (You will briefly see some messages that you probably can't read.)
  33. If you wish, delete the zip file after you are sure it was correctly unzipped. I personally move it to another folder.
  34. Configure a custom 404 error page.
  35. Click "Site Admin" in the nav menu of the WebHost4Life Control Panel.
  36. Click "Set Custom Error" in the sub menu.
    1. Look for the line with:
      "404,*  FILE  C:\WINDOWS\help\iisHelp\common\404b.htm" and click Edit.
    2. Use a value of "SystemMessages/FileNotFound.aspx"
    3. When you return to the list of IIS Custom Error Pages, make sure the 404 is of type URL now:
      "404,* URL /systemmessages/filenotfound.aspx"
  37. Navigate to your blog (http://blog.YOURDOMAINNAME.com).
  38. If you followed the steps above, your database user specified in the connection string is the dbo already (that's how WH4L does it by default). Read the Subtext installation page that comes up at your blog's adddress and click "On to Step 2" if everything looks OK.
  39. Click "Install Now!"
  40. After the installation, you can change the database user to less privileged (than dbo) user. However, I had to go round and round with WebHost4Life support before they would let me do what I wanted to do. Therefore, I do not have a clearcut set of steps. If anyone else knows an easy way to accomplish this at WebHost4Life, let me know. Otherwise, it's probably just easier to leave the user as is.
  41. You can log in as admin to your blog now and add your first post!

Troubleshooting Ideas, if needed.

    1. You can test your connection to the database via SQL Server Management Studio using the values in your connection string.
    2. See these articles for more troubleshooting help.

Print | posted on Saturday, September 09, 2006 12:56 PM

Feedback

# Building Subtext from the Source Code in Visual Studio 9/24/2006 12:47 PM Blog-HowTo.com

Building Subtext from the Source Code in Visual Studio

# re: How to Install Subtext 1.9 at WebHost4Life 10/9/2006 6:44 AM Eric Stott

I am following you install instructions, and when I get to step 37, I get the following error:
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Have you seen this error message before?

# re: How to Install Subtext 1.9 at WebHost4Life 10/9/2006 10:49 AM Dave

Eric, sorry to hear you are having problems. The people who have written to me about these installation steps have all had success, so far. But I'll try to help you troubleshoot your issue.

Normally when you get an error like this, the first thing to do would be to go to your web.config file and set customErrors mode="Off". However, at WH4L, that will probably not help. That's exactly why I wrote the following article: Troubleshooting - Using log4net . The article is under the "troubleshooting" category here on my blog.

Once you get the log output from Subtext, if the problem isn't obvious, please post the relevant info from your log file here and I'll see if I can spot the problem. Good luck.

# re: How to Install Subtext 1.9 at WebHost4Life 10/11/2006 3:10 PM Dave

It looks like Eric's problem was related to the fact that his subdomain .NET application version was 1.1 instead of 2.0. It's all working now.

The only thing I noticed when reviewing all the above steps is that step 25 is not needed at all. You can just skip step 25, which says, "Click 'Database' in the nav menu. Populate the middle set of text boxes. ..."

Comments have been closed on this topic.