How to Setup .Text

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:



  1. 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.
  2. 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.
  3. 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…



  1. 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.

  2. 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.

  3. Create a directory on your webserver volume (e.g. “d:\wwwroot\blogs“).

  4. 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.

  5. 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.

  6. 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, …).

  7. 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“).

  8. 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.

  9. Now you need to modify web.config. Look for a line with the text “UrlReWriteHandlerFactory“ in it. Change the Path=“*.aspx“ to Path=“*“

  10. 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).

  11. 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],
[News],  [SecondaryCss],
[Application]
)
VALUES
(
‘USERNAME’, ‘PASSWORD’,
‘demo@demo.com’,’Demo Blog’, ‘A demo blog’,
‘marvin3-red’, ‘HOST’,’Demo’,-5,
1,’en-US’, 15, 1,’7/28/2003′, null, null,
‘APPLICATION’
)


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.


-cek

© Charlie Kindel. All Rights Reserved.

14 comments


  1. Thanks. Everything worked. However, when i clicked on the link to my blogs homepage, it kept saying file doesn’t exist. I had to change the line for getting the aggregate homepage to:

    ^(?:\/\w+((\/default\.aspx|\/)?|(\/?))?)$

  2. doh! I spoke too soon. Still having problems requesting home pages without specifying "default.aspx"

  3. Thanks! Found this in the forums at asp.net and will bookmark it

    for my own installation.

  4. http://

    when i tried to add an image to a newly created gallery, i got an error saying:

    … The error message related to this problem was as follows: Access to the path "C:\Inetpub\wwwroot\blogs\images\localhost\test\4" is denied.

    what might be the problem? i am using Windows 2000 Professional, .NET 1.1

    thanks

  5. http://

    got it, i need to set ASPNET user to have full access to that directory

  6. HELP!!!!

    After following above directions TO A "T", this is what I get…

    .Text – Application Error!

    Details

    Cannot open database requested in login ‘DotTextDB’. Login fails. Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’.

  7. http://

    My aspnet user has full permission to the directory, but still ……

    Failed to start monitoring changes to ‘\\{servidor}\{compartilhamento}’.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Failed to start monitoring changes to ‘\\{servidor}\{compartilhamento}’.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [HttpException (0x80070035): Failed to start monitoring changes to ‘\\{servidor}\{compartilhamento}’.]

    System.Web.FileChangesMonitor.FindDirectoryMonitor(String dir, Boolean addIfNotFound, Boolean throwOnError) +527

    System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback) +477

    System.Web.Caching.CacheDependency.Init(Boolean isPublic, Boolean isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart) +1535

    System.Web.Caching.CacheDependency..ctor(Boolean isSensitive, String[] filenames, DateTime utcStart) +50

    System.Web.Configuration.HttpConfigurationSystem.GetCacheDependencies(Hashtable cachedeps, DateTime utcStart) +151

    System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +697

    System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434

    System.Web.HttpContext.GetCompleteConfig() +48

    System.Web.HttpContext.GetConfig(String name) +195

    System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow) +20

    System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow) +40

    System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +480

    ——————————————————————————–

    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

  8. http://

    Hum…..you cant add a new blog from the Admin UI…..but you can create a stored procedure in the database and just create an asp.net page where you put the username and password parameters in textboxes…….and that would do.

    wouldnt it?? Since Im planning to Install this on a school server next semester and give blogs to my team, i thought of this so i could remotely administer adding blogs instead of having to be physically at the machine.

  9. http://

    Hey Charlie, you forgot to add the last step.

    12. Get Scott’s Missing trigger fix so it will update the post count and blogger list correctly.

    great instructions man.

  10. http://

    Get Scott’s Missing trigger fix ??? Where can i find that thanks

  11. On IIS and Win 2003 server… both ASPNET and NETWORK SERVICE users need access to the directory.

  12. http://

    What a freakin Kluge this is 🙁

  13. http://

    When I run the query I get a hot of errors.

    Server: Msg 170, Level 15, State 1, Line 3

    Line 3: Incorrect syntax near ‘function’.

    Server: Msg 170, Level 15, State 1, Line 3

    Line 3: Incorrect syntax near ‘FUNCTION’.

    Server: Msg 137, Level 15, State 1, Line 20

    Must declare the variable ‘@list’.

    Server: Msg 137, Level 15, State 1, Line 23

    Must declare the variable ‘@list’.

    Server: Msg 137, Level 15, State 1, Line 26

    Must declare the variable ‘@delimiter’.

    Server: Msg 170, Level 15, State 1, Line 31

    Line 31: Incorrect syntax near ‘@tbl’.

    Server: Msg 137, Level 15, State 1, Line 33

    Must declare the variable ‘@delimiter’.

    Server: Msg 170, Level 15, State 1, Line 39

    Line 39: Incorrect syntax near ‘@tbl’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Line 4

    Line 4: Incorrect syntax near ‘COLLATE’.

    Server: Msg 170, Level 15, State 1, Procedure blog_InsertLinkCategoryList, Line 13

    Line 13: Incorrect syntax near ‘@CategoryList’.

    Server: Msg 170, Level 15, State 1, Procedure blog_InsertLinkCategoryList, Line 20

    Line 20: Incorrect syntax near ‘@CategoryList’.

    Server: Msg 170, Level 15, State 1, Procedure blog_Content_Trigger, Line 7

    Line 7: Incorrect syntax near ‘AFTER’.

  14. http://

    This application may work goo, but it is a hack none the less. Good thing it is open source or I would not trust it at all.

Leave a Reply

Your email address will not be published. Required fields are marked *