CDOLive LLC The Premier Resource for Microsoft Collaboration Data Objects             

Threaded Discussion Forum Web Application

This sample Microsoft Active Server Page application displays a Microsoft Exchange Server public folder with messages via CDO anonymous access into a threaded discussion forum, without using the standard Outlook Web Access interface. A visitor can simply step back and force to read all available messages. Also posting of new messages and searching for messages is possible:

If CDO for Windows NT server (also known as CDONTS) is installed it is also possible to forward or reply to the sender of a message and to set a Cc if a new message is posted.

Also an Outlook 98/2000 form is included to directly post new items to the public folder:

This sample is especially useful if you want to put a web based discussion forum to your Intra/Internet Web site without creating a database application.

To use the application start your browser, enter the URL 'http://www.yourdomain.com/discussion' and the HTML page will be loaded.

Known Issues

Note that this sample does not run on Exchange 2000 Server due to product changes. It is currently under investigation why this application will not run on Exchange 2000 Server. After this tests are done the "Checked Build" section of this page will be updated immediately.

The colors used in the message list table view, which displays the folder content, are hardcoded into the folder container renderer, because it is not possible to use constants or variables inside the container renderer 'HeadingRowPrefix' and 'RowPrefix' properties. This seems to be a limitation of the current CDO HTML rendering library. To change that colors open the file 'Folder.inc' with a text editor, locate the keywords above and change the colors to the value you want to use.

This sample uses DHTML with cascading style sheets only tested with Microsoft Internet Explorer 4.x and 5.x. It might not work properly with Netscape Navigator 3x. resp. Netscape Navigator/Communicator 4.x. If you want to use this sample with another browser than Microsoft Internet Explorer you have to modify it yourself.

After installing the Outlook security update this sample will stop working properly because of changes made by Microsoft. For more info on the Outlook security update please check Outlook e-mail Security Update

Note that the Office/Outlook 2000 setup does not install CDO 1.21 by default. You need to run the Office/Outlook 2000 setup and add CDO 1.21 as custom option.

Prerequisites

The Microsoft Internet Information Server anonymous account (default 'IUSR_<YourServerName>') must have 'Log On Locally' rights granted with the Microsoft Windows NT Server 'User Manager' program. To check if the account does work properly try to logon with this account on the Microsoft Windows NT Server which should host the Microsoft Active Server Application in question.

Make sure that Microsoft Exchange Server with Microsoft Outlook Web Access is installed and running properly. To check if Outlook Web Access is running try to load the following url into your browser:
'http://www.yourdomain.com/exchange/logon.asp' and check if you can logon properly to your Microsoft Exchange mailbox.

Checked Build

This sample should run without modifications with any language version of Microsoft Exchange Server 5.x. It is build and checked for a proper function using the following environment:

  • Microsoft Windows NT Server 4.0, with Service Pack 5/6, US English - International
  • Microsoft Exchange Server 5.5, with Service Pack 3/4, US English - International
  • Microsoft Outlook Web Access 5.5, with Service Pack 3/4, US English - International
  • Microsoft Internet Information Server 4.0, US English - International
  • Microsoft Outlook 2000, with Service Release 1, US English - International
  • Microsoft Internet Explorer 5.01, US English - International
  • Microsoft Internet Explorer 5.5, with Service Pack 1, US English - International
Installation and Configuration
Component Description
discus.zip (66 Kbyte) ASP Application Files The Microsoft Active Server Pages application.

To install the application, unzip all files to a new directory called 'discussion'. Make sure that the Microsoft Internet Information Server anonymous account (default 'IUSR_<YourServerName>') does have at least 'Read' permissions on this directory.

The application includes the following files:

File Description
Cdoprops.inc Contains CDO property tags.
Compose.asp Create new message form.
Default.asp Initial application start point, calls title.asp and folder.asp in separate frames. Can be incorporated into own ASP pages.
Default.htm Default HTML document file, redirects to default.asp. Only needed if default.asp can't be the default document of your IIS virtual directory.
Folder.asp Builds the folder renderer output, called from default.asp.
Folder.inc Contains the renderer functions for a single message and the folder container renderer.
Global.asa Global settings to initialize the ASP application and CDO session.
Global.inc Contains global application settings including the application title and color settings. More information is included in the file itself.
Logon.inc Contains methods to create and check an anonymous CDO session.
PreviewBody.asp Display message body if preview is enabled
PreviewHeader.asp Display message header if preview is enabled
Read.asp Display message master frame if preview is disabled.
ReadBody.asp Display message body if preview is disabled, called from read.asp.
ReadHeader.asp Display message header if preview is disabled, called from read.asp.
Search.asp Search message dialog master frame.
SearchBody.asp Builds the search result folder renderer output, called by search.asp.
SearchHeader.asp Builds the search message dialog.
Sendmsg.asp Builds the send message dialog..
Title.asp Implements the application toolbar frame.
attach/read.asp Implements the attachment rendering functions.
*.gif Various images used for items and buttons.

Use the Microsoft Internet Information Server Manager program to create a new virtual directory, name it 'discussion' and allow at least 'Read Access' and 'Script Access'.

Right-click the created virtual directory and open the properties. Select the 'Documents' tab and check if 'Default.htm' is enabled as the default page.

Select the 'Directory Security' tab and click the 'Edit...' button of 'Anonymous Access and Authentication Control'. Make sure that 'Allow Anonymous Access' and 'Basic Authentication (Password is sent in Clear Text)' is enabled.

Click the 'Edit...' button of 'Account used for Anonymous Access' and check if the Microsoft Internet Information Server anonymous account (default 'IUSR_<YourServerName>') is entered in the 'Username' field and 'Enable Automatic Password Synchronization' is enabled.

Click 'OK' to close the dialog box.

Click the 'Edit...' button of 'Default domain for Basic Authentication' and make sure that the Microsoft Windows NT domain which is used to authenticate your NT accounts is entered. This is important if you are using a separate Microsoft Windows NT domain for authentication only.

Start the Microsoft Exchange admin program and expand the 'Protocols' container of your Microsoft Exchange Site in the left-hand pane. Open the 'HTTP (Web) Site Settings' in the right-hand pane.

Make sure that 'Enable protocol' and 'Allow anonymous users to access the anonymous public folders' are checked.

Select the 'Folder Shortcuts' tab and click the 'New...' button. Select the appropriate public folder and click 'OK' to close the dialog box.

The public folder in question should now appear in the list of 'Public folder shortcuts'. If so, highlight the public folder and click on the 'Properties...' button.

Click on the 'Client Permissions...' button of the folder properties dialog and make sure that 'Anonymous' does have at least the 'Editor' role. Click 'OK' until all dialog boxes are closed.

Note that sometimes it is necessary to reboot the Microsoft Windows NT/Exchange server to enable the settings properly.

discform.zip (8 Kbyte) Outlook form The Microsoft Outlook 98/2000 form to post new message to the particular discussion forum public folder.

Click on the Outlook form template to start it and choose 'Disable Macros' if the macro warning dialog is displayed. Change into the forms design mode and click on the publish form button to publish it to the appropriate public folder.

fldrpropv.zip (10 Kbyte) Outlook form The Microsoft Outlook 98/2000 form to obtain the folder entry ID of the appropriate folder. This folder entry ID must be entered into the file 'Global.inc', which includes the basic ASP application settings.

Click on the Outlook form template to start it and choose 'Enable Macros' if the macro warning dialog is displayed. Click on the button 'Browse...', select the folder in question and click 'OK'.

The folder properties are now displayed in the form. Copy the folder entry ID into the clipboard and open the file 'Global.inc' with a plain text editor (e. g. Notepad). This file contains global setting for the ASP application including the folder entry ID.

Locate the constant APP_FOLDER_ID and replace the value with the one from the clipboard. Make sure to not delete the double quotes and save the file.

Note that it is also possible to pass the folder entry ID as a parameter to the file 'Default.asp'. For more information, please take a look at the file 'Global.inc'.