Note: There is now a .Text support forum on www.asp.net. Go to http://asp.net/Forums/ShowForum.aspx?tabindex=1&ForumID=149 to access it. Ask all questions there, not as comments here!
Ok, after about 4 days of banging my head on .Text I finally got it installed. It shouldn’t have been that hard. There were some OK instructions out there on various sites (listed below), but even after following them (multiple times) I couldn’t get it to work. I finally found the key piece of information required and figured I’d post my own version of instructions for setting up .Text in celebration of my victory (and as my first real blog post)!
So here are my step-by step instructions. These instructions assume you want to accomplish the following:
- You have access to the IIS server that will host your blogs. This means you can run IIS Admin, and create/modify the settings of virtual roots.
- You want to have multiple blogs hosted under a virtual root (e.g. off of www.yourdomain.com/blogs), and you want those blogs to be of the “.Text virtual“ variety.
- You are running Windows Server 2003.
If you are trying to use .Text in it’s other modes, these instructions may be useful, but no promises…
- Download the latest build of .Text “Multiple Blogs“ (0.94) from http://www.gotdotnet.com/community/workspaces/viewuploads.aspx?id=e99fccb3-1a8c-42b5-90ee-348f6b77c407.
- Extract the .ZIP file into a temporary directory. The .ZIP file has stored paths rooted at “Dottext_Binary_Multiple_094“, so make sure you extract with WinZips “Use folder names“ option.
- Create a directory on your webserver volume (e.g. “d:\wwwroot\blogs“).
- In IIS Admin, create a new virtual directory (e.g. named “blogs“, under the root) and point it to the directory you created in step 3.
- In the virtual directory’s properites click the “Configure“ button. You’ll need to add a “Wildcard application map“ pointing to “C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll“. Click the “Insert“ button to do this. In the dialog that pops up, make sure “Verify that file exists“ is NOT checked.
- In IIS Admin, you should see your “blogs“ vroot with a little gear next to it indicating that it is an ASP.NET application and it should have all of the sub-directories that were found in the ZIP file (e.g. Admin, bin, …).
- Now you need to setup your SQL Server database. Run SQL Enterprise Manager and create a new database. I called mine “DotTextDB“. Setup a user to have read/write access to this database (I did “bloguser“).
- Run SQL Query Analyzer and make sure that the DotTextDB database is selected. In the query window copy the contents of blogs\Data_Setup\DottextSetup_09012003.sql. Hit the “Execute Query“ button. This will create all the tables.
- Now you need to modify web.config. Look for a line with the text “UrlReWriteHandlerFactory“ in it. Change the Path=“*.aspx“ to Path=“*“
- In blog.config update the database connection string to match your database. Look for the element named DataStoreLocation and change the Password, ID, Initial Catalog, and Data Source to match your system (and the database user you created in step 7).
- Now here’s the part that was really missing from the original instructions: At the top of blog.config are a set of HttpHandlers. For the “Sub Directory Multiple SetUp“, you need to copy a new set of HttpHandlers from the Data_Setup\Handler Patterns.txt over the set that are in the standard blog.config. Copy the set that are at the top of the file (clearly labeled as “Sub Directory Multiple SetUp“) over the ones in blog.config.
After doing all of this, your setup is almost ready to go. Now all you have to do is create the blogs. To do this you add rows to the table named “blog_Config“. The easiest way do to this is to execute the SQL statement below, replacing the BOLD values with your blog information:
INSERT INTO [blog_Config]
[UserName], [Password], [Email], [Title], [SubTitle],
[Skin], [Host], [Author], [TimeZone],
[IsActive], [Language], [ItemCount], [AllowServiceAccess], [LastUpdated],
‘USERNAME’, ‘PASSWORD’, ‘firstname.lastname@example.org’,’Demo Blog’, ‘A demo blog’,
1,’en-US’, 15, 1,’7/28/2003′, null, null,
You can run this script for each blog you want to create. Once you create the blog, and have it working, most of the settings (all of them?) can be changed with the admin UI. But there is no way (that I could find) to create a new blog with the UI…you have to manually create a row in blog_Config.
So there you go! Hopefully this will help you save some time.