This document contains information concerning the Dundas Upload control and demos .  There is a Requirements section which is then followed by a brief summary of the control.  This is followed  by a description of the four (4) sample applications.  Instructions are also provided for setting up and configuring the demos, and in addition there is a troubleshooting section for your convenience.

For detailed documentation download the compiled Html help from our web site.  This documentation covers all of the free controls and classes currently offered by Dundas Software.

Dundas Upload Control 2.0

Overview of the Four ASP Demos.

Installation Notes.

Troubleshooting.


Requirements

In order to run the demos one of the following sets of conditions must be met:


Dundas Upload Control 2.0

The Dundas Upload Control 2.0 is an ASP COM component which enables users to save and manipulate files uploaded via an html form. Files are uploaded to a server with file input boxes (e.g. <input type="file">) inside a form with the form's encoding (specified by the EncType attribute) set to "Multipart/Form-Data".

This control also lets you retrieve form data incrementally or all at once, create and delete directories as well as assume Windows user accounts other than the default web account (usually IUSR_MACHINENAME).  For more information on the control's features refer to the compiled html help.

Please note that two of the sample applications require the Dundas Mailer Control 1.0.  To download the free, fully-tested Mailer control click here.


Overview of the ASP Sample Applications

Note: If a sample application uses cookies to store state information and the user's browser has cookie support disabled then a message box will be displayed informing the user to enable cookies.

1) Basic Upload Operation Sample

This sample application allows the user to upload up to three (3) files, each file having a maximum allowable size of one MBytes.

The main page is called "main.asp", and it utilizes three file input boxes in a form with an EncType of "multipart/form-data".  It POSTS to Process.asp, which creates an instance of the Upload control and processes the upload.  Once the processing is complete it uses a Response.Redirect along with a query string parameter to redirect the user back to "main.asp" along with a success or failure message. 


2) Sending an Html Email Sample

This demo uses both the Upload control as well as the Dundas Mailer Control 1.0.  If the Mailer control is not installed then a message box will be displayed.  Click here to download the free Dundas Mailer Control 1.0.

The main page is called SendHtmlEmail.asp and is responsible for gathering email particulars as well as allowing the user to select a background picture and background sound for the html email.  This page then POSTS to SendHtmlEmail_Process.asp which processes the email operation.  Once the processing is completed the user is redirected back to the main page along with a success message if the operation was successful.  If the mail sending operation was unsuccesful the user will be redirected to "Errors.asp" which will indicate the nature of the error that occurred.


3) Basic Progress Bar Sample 

This sample allows a user to upload one file with a maximum size of 2 MBytes.  

The main page is called "main.asp", and allows the user to select the file to be uploaded.  It POSTS to "Process.asp" which is responsible for the upload operation.  Main.asp also opens the "ProgressBar.asp" page (via client-side javascript) which constitutes the progress bar window.  This progress bar window will close once the file upload has reached 100% or an error occurs.  Note that a progress bar is simulated by using embedded tables with different colors.

We use the State Server executable (StateServer.exe) to store state information and we also use the ProgressUpload component (DSUpload.dll, the same dll for the Upload component) to perform progress bar operations.

Once the operation is complete the user is redirected back to "main.asp" along with a success or failure message.   


4) Advanced Progress Bar Sample

This sample is the same as the previously mentioned sample except it allows the user to upload up to three (3) files as well as set various upload properties.

The main page is "main.asp" which POSTS to UploadDemoAction.asp.  UploadDemoAction.asp is responsible for the upload operation.  Main.asp also opens the "ProgressBar.asp" page which constitutes the progress bar window.

We use the State Server executable (StateServer.exe) to store state information and we also use the ProgressUpload component (DSUpload.dll, the same dll for the Upload component) to perform progress bar operations.

Once the operation is complete the user is redirected back to "main.asp" along with a success or failure message.  


Installation Notes

This is the second version of the Dundas Upload control (version 2.0).  Version 1.0 (named UploadControl.dll) was originally distributed along with the Dundas Mailer Control 1.0.  The ProgID of this newer version (DSUpload.dll) is "Dundas.Upload[.2]". 

Please note that two of the sample applications require the Dundas Mailer Control 1.0.  To download the free, fully-tested Mailer control click here.

The Dundas State Server (StateServer.exe) when installed is set up to run as a normal executable.  This has the advantage of giving you a GUI which displays the operations which have occurred or are occurring.  Please note, however, that you can run the State Server as a service.  Running the executable as a service can increase its performance up to five times (five hundred percent).       

The windows account under which the install runs needs to have administrative priviledges for a successful installation. 

Start menu entries are as follows:


Hosting the Demos

In order to host these demos you need to be using MS Internet Information Server (IIS) along with either Windows 2000 or Windows NT.  The samples have not been tested for use with Microsoft's Personal Web Server.  Also, in order to set up NTFS permissions the drive in question must be an NTFS drive.

Note: The StateServer executable is a very handy utility which can be used to store state information irregardless of its location (e.g. it is "web-farm ready").  This install, however, obviously installs the State Server to the default installation location.  

    To run these samples:
  1. If you have installed to a directory which is not a web directory or subdirectory then you must create an alias to view/run the ASP pages.  To do this right click (using Windows Explorer) on the directory where the ASP pages are located (the Samples directory) and then select "Properties". Choose the Web Sharing tab folder and select "Share this Folder". Choose an alias for the installation directory and make sure that "Read" and "Scripts" are selected in the Edit Alias window.  When you view the samples the URL in your browser will be "http://localhost/Alias/AnyDemoPath.asp".
       
  2. Use Windows Explorer to set up the  appropriate NTFS permissions for the default web account (usually the IUSR account).  To set NTFS permissions right click on the directory in question and select the "Properties | Security " property page.  Then click on the Permissions button.

    The default web account will need Full Control permissions for the dll (DSUpload.dll) as well Read permission for the ASP pages in the installation directory.

    If you have installed to a web site directory then just reapply permissions.  
  3. Make sure that the Web permissions which are set via the Microsoft Management Console (Internet Service Manager) are set to Read and Script Execute.  Note that if you created an alias (Step#1) then the Web permissions will already have been set.
  4. Run the samples from your browser, making sure that IIS is running.  You may have to reboot your machine because of changed permissions.


How to Delete Uploaded Files and Folders

Any created folders or files saved to disk (temporary uploaded files) may not be deleted by the various sample applications if the default web account does not have the appropriate rights to do so.  If you want to delete these items you will need to either grant the default web account the appropriate rights to the items in question or alternatively you can insert ImpersonateUser statements into the ASP pages themselves and temporarily assume an account with the rights to delete files/folders.


Trouble Shooting

NOTE: Most of the Upload control's methods will throw an exception if an error occurs so it can be very helpful to "rem" out any "On Error Resume Next" statements and then examine thrown exceptions for an indication of the nature of the problem that is ocurring. 

The uninstall does not remove the DSUpload.dll

The inetinfo.exe process may be referencing the dlls during the uninstall process.  Reboot your computer and remove the dlls manually.
 

Server.CreateObject failed.  Invalid class string specified

The specified ProgID of the Upload control is incorrect.  The ProgID of the Upload control is "Dundas.Upload[.2]".  

This can also be caused by a control which is not registered.  Register the control in question by using regsvr32.exe.

HTTP Error 403 Forbidden: Execute Access Forbidden
 
You have not set up the permissions for your ASP files correctly. Use Windows Explorer to set up proper NTFS directory permissions if you are running Win NT or Win 2000 (Read access is required), and also make sure that the Web permissions set in MMC (Microsoft Management Console) are at least Read with Script Execute rights.  Also make sure that the Samples/Images folder has Read permissions as well.

HTTP Error 404 File Not Found
 
The URL you are specifying in your browser is incorrect.  Determine where your ASP pages are and enter the appropriate URL (e.g. http://127.0.0.1/RelativePathFromRootWebDirectory/PostArticle.ASP).


Access is Denied

The appropriate permissions have not been set up for the deletion of files or folders.  You need to either give the default web account (usually IUSR_MACHINENAME) Full Control NTFS permission for the folder in question or you can use the ImpersonateUser method of the Upload control to utilize a user account which does have the right to delete files/folders.  


VBSCript RunTime Error "800a01ad" ActiveX component can not create object

The DSUpload.dll does not have the appropriate permissions.  Make sure that the default web account has Full Control rights for the dll.


Error "800a001e" A required priviledge is not held by the client

This is probably caused by calling the ImpersonateUser method of the Upload control in conjunction with the "Run in Separate Memory Space" box being checked in your Home Directories property page (found in the Microsoft Management Console, or MMC).  To get around this you can either grant the default web account "Act as Part of the Operating System" priviledges or alternatively you can just turn off the "Run in Separate Memory Space" option.  Refer to either the MSDN or the Documentation (examine the ImpersonateUser topic) for details on how to grant operating system priviledges.