Krystalware
SlickUpload logo

Installing SlickUpload

There are three simple steps to install SlickUpload in your application:

  1. Install the assembly

    Add the Krystalware.SlickUpload.dll assembly as a project reference or copy it to your application bin folder. This assembly contains the SlickUpload HttpModule as well as the SlickUpload controls.

  2. Add the SlickUpload Web.config sections

    There are several web.config sections that are required for SlickUpload to function properly. The default configuration is listed below. For more information on the possible configuration options, see the Configuring SlickUpload topic.

    • configSections

      To register the SlickUpload configuration sections, you must add several elements to the configSections element. This element should be the first child of the configuration element. If you already have other configuration sections registered, just append these elements to the list.

      The following example shows the configSections element with the SlickUpload configuration sections added. Add this section to the Web.config as a child of the <configuration> element.

      <configSections>
        <sectionGroup name="slickUpload">
          <section name="uploadParser" type="Krystalware.SlickUpload.Configuration.NameValueConfigurationSectionHandler, Krystalware.SlickUpload" />
          <section name="uploadStreamProvider" type="Krystalware.SlickUpload.Configuration.NameValueConfigurationSectionHandler, Krystalware.SlickUpload" />
          <section name="statusManager" type="Krystalware.SlickUpload.Configuration.StatusManagerConfigurationSectionHandler, Krystalware.SlickUpload" />
        </sectionGroup>
      </configSections>
    • slickUpload

      This section contains the configuration for SlickUpload. The following example shows a default configuration that saves files to C:\somefolder\. For more information about the SlickUpload configuration settings, see the Configuring SlickUpload topic.

      Add this section to the Web.config as a child of the <configuration> element.

      <slickUpload>
        <uploadStreamProvider location="c:\somefolder" existingAction="Overwrite" />
      </slickUpload>
    • system.web/httpModules

      To allow SlickUpload to handle upload requests, you need to add its HttpModule to your application. If you already have other HttpModules in your application, just append the add element to the list.

      The following example shows a typical httpModules element with the SlickUpload HttpModule reference. Add this section to the Web.config as a child of the <system.web> element.

      <httpModules>
        <add name="HttpUploadModule" type="Krystalware.SlickUpload.HttpUploadModule, Krystalware.SlickUpload" />
      </httpModules>
    • system.web/httpHandlers

      To enable AJAX progress updates and the UploadManager control, you need to add the SlickUpload handler to your application. If you already have other HttpHandlers in your application, just append the add element to the list.

      The following example shows a typical httpHandlers element with the SlickUpload HttpHandler reference. Add this section to the Web.config as a child of the <system.web> element.

      <httpHandlers>
        <add path="SlickUpload.axd" verb="GET,POST" type="Krystalware.SlickUpload.SlickUploadHandler, Krystalware.SlickUpload" />
      </httpHandlers>
    • system.web/httpRuntime

      There are two attributes in this element that should be set so that your application can process large uploads:

      • maxRequestLength – The maximum length of all requests for ASP.NET, in kilobytes.
      • executionTimeout – The maximum time an ASP.NET request can continue before timing out, in seconds.

      The following example shows a typical httpRuntime element. Add this section to the Web.config as a child of the <system.web> element.

      <httpRuntime
        maxRequestLength="1024000"
        executionTimeout="600"
      />

      This httpRuntime element sets the maxiumum request length to 1 GB and the execution timeout to 10 minutes.

    These configuration settings are for IIS 5-6, the VS.NET WebDev server, Mono, etc. For IIS 7 settings, see the Using SlickUpload with IIS 7 topic for more details.

How to add the SlickUpload controls to VS.NET

  1. Open VS.NET and your solution
  2. Click the Tools->Choose Toolbox Items menu item
  3. Browse to and select the SlickUpload assembly (Krystalware.SlickUpload.dll)

The SlickUpload controls (UploadManager, ProgressElement, ProgressBarElement, ProgressDisplay, and UploadManagerRequiredFileValidator) will appear in the toolbox.

For information about installing a SlickUpload license to remove branding, see the Installing the license topic.