CDOLive LLC The Premier Resource for Microsoft Collaboration Data Objects             

Internet Links Web Application

This sample Microsoft Active Server Page application displays a Microsoft Exchange Server public folder with Outlook contact items via CDO anonymous access, without using the standard Outlook Web Access interface. The latest 20 Outlook contact items of the particular public folder are displayed in a plain list. A visitor can open a single Outlook contact item by simply clicking on the subject. S/he will then be redirected to the Internet link which is stored in the web page field of the Outlook contact item:

Also an Outlook 98/2000 form is included to post new Internet links to a public folder:

This sample is especially useful if you want to put an Internet links list to your Intra/Internet Web site without editing HTML files manually.

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

Known Issues

If you want to run this application on top of Microsoft Exchange 2000 Server you need to follow the steps outlined in the Microsoft Knowledge Base article Q166599 - XWEB: .MMP file Created by MS Exchange Active Server, even if the article talks about Exchange 5.0 Server and Internet Information Server 3.0. Otherwise CDO 1.21 will not be able to use a dynamic MAPI profile to logon anonymously to the Exchange 2000 Server.

The folder ID of the public folder in question needs to be set manually into a configuration file called 'Global.inc'. The folder ID can be obtained with another sample Microsoft Outlook form, which is described below.

The sort order of the items can't be changed with this sample. The newest item is always displayed at the top of the link list.

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

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.

A so called 'Public Folder Shortcut' must be created for each public folder which should be accessed via anonymous access. This must be done with the Microsoft Exchange Server admin program and is described below.

At least 'Read' and 'Folder visible' permissions must be set for anonymous access to the particular Microsoft Exchange Server public folder. This can be done via the permissions tab in Microsoft Outlook or the Microsoft Exchange admin program and is described below.

Also anonymous access to public folders must be enabled for your Microsoft Exchange site. To check if anonymous access is enabled and the public folder in question is available, enter the url above and select 'Public Access'. If you don't see the appropriate public folder it is either not enabled for anonymous access or no public folder shortcut is created. This must be done with the Microsoft Exchange Server admin program and is described below.

Checked Build

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

  • Microsoft Windows NT Server 4.0, with Service Pack 4/5/6a, US English - International
  • Microsoft Windows 2000 Server, with Service Pack 1, US English - International
  • Microsoft Exchange Server 5.5, with Service Pack 2/3/4, US English - International
  • Microsoft Outlook Web Access 5.5, with Service Pack 2/3/4, US English - International
  • Microsoft Exchange 2000 Server, US English - International
  • Microsoft Internet Information Server 4.0, US English - International
  • Microsoft Internet Information Service 5.0, US English - International
  • Microsoft Outlook 98, with Security Patch 2 (aka. outptch2), US English - International
  • Microsoft Outlook 2000, with Service Release 1, US English - International
  • Microsoft Internet Explorer 4.01, with Service Pack 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
netlinks.zip (16 Kbyte) ASP Application Files The Microsoft Active Server Pages application.

To install the application, unzip all files to a new directory called 'netlinks'. 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.
Default.asp Initial application start point, calls folder.asp in a separate frame. 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 by default.asp.
Folder.inc Contains the renderer functions for the folder container renderer.
Global.asa Global settings to initialize the ASP application and CDO session.
Global.inc Contains global application settings including the folder ID, application title and color settings. More information is included in the file itself.
Lang.inc Contains localizable strings.
Logon.inc Contains methods to create and check an anonymous CDO session.
Read.asp Reads the web page url and redirects the user to the URL.

Use the Microsoft Internet Information Server Manager program to create a new virtual directory,  name it 'netlinks' 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.
netlinksform.zip (16 Kbyte) Outlook form The Microsoft Outlook 98/2000 form to post a new Internet link to the particular public folder.

This sample form can be used to create a new Internet link. It also includes some useful features like displaying the link into a preview pane (using the Microsoft Internet Explorer object model), importing a Microsoft Internet Explorer favorite into the form (using Microsoft Windows Scripting Host and the Microsoft Common Dialog ActiveX control). Finally it checks if the Common Dialog ActiveX control is installed and if not it downloads and installs it from a Web site.

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 ID of the appropriate folder. This folder 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 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 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.