Web.Config Sections

Describes the resource that specified configuration settings apply to.

<configuration>

  <configSections>

    <!-- Start:configSections\sectionGroup Section -->

    <sectionGroup name="mediachase.fileUploader" type="Mediachase.FileUploader.Configuration.MediachaseFileUploaderSectionGroup, Mediachase.FileUploader">

      <section name="fileUploaderContext" type="Mediachase.FileUploader.Configuration.FileUploaderContextSection, Mediachase.FileUploader"/>

      <section name="tempFileStorage" type="Mediachase.FileUploader.Web.Configuration.TempFileStorageSection, Mediachase.FileUploader"/>

      <section name="uploadProgress" type="Mediachase.FileUploader.Web.Configuration.UploadProgressSection, Mediachase.FileUploader"/>

      <section name="fileUploadControl" type="Mediachase.FileUploader.Web.Configuration.FileUploadControlSection, Mediachase.FileUploader"/>

    </sectionGroup>

    <!-- End:configSections\sectionGroup Section -->

  </configSections>

  <!-- Start:mediachase.fileUploader Section -->

  <mediachase.fileUploader>

    <fileUploaderContext sessionUidKey=""

                         tempFileStorageProviderKey=""

                         httpPostMaxSize=""

                         httpPostBufferSize="" >

      <filters>

        <add type="" requestPath="" />

      </filters>

      <contentTypes>

        <add extension="" name="" />

      </contentTypes>

    </fileUploaderContext>

    <tempFileStorage defaultProvider="" enabled="" timeout="">

      <providers>

        <add name="McLocalDiskTempFileStorageProvider"

             type="Mediachase.FileUploader.Web.LocalDiskTempFileStorageProvider, Mediachase.FileUploader"

             description=""

             tempStoragePath="%TEMP%" />

        <add name="McSqlTempFileStorageProvider"

             type="Mediachase.FileUploader.Web.SqlTempFileStorageProvider, Mediachase.FileUploader"

             description=""

             connectionString="Connection String" />

      </providers>

    </tempFileStorage>

    <uploadProgress defaultProvider="" enabled="" timeout="">

      <providers>

        <add name="McInProcessProgressStateProvider"

             type="Mediachase.FileUploader.Web.InProcessUploadProgressProvider, Mediachase.FileUploader"

             description="" />

        <add name="McSqlProgressStateProvider"

             type="Mediachase.FileUploader.Web.SqlProgressStateProvider, Mediachase.FileUploader"

             description=""

             connectionString="Connection String" />

      </providers>

    </uploadProgress>

    <fileUploadControl embeddedModePage="" iframeModePage="" popUpModePage="" />

  </mediachase.fileUploader>

  <!-- End:mediachase.fileUploader Section -->

  <!-- Start:system.web Sections -->

  <system.web>

    <httpModules>

      <add name="Mediachase.FileUploader.McHttpModule"

           type="Mediachase.FileUploader.McHttpModule, Mediachase.FileUploader"/>

    </httpModules>

    <httpHandlers>

      <add verb="GET"

           path="McFileUploaderResources.axd"  

           type="Mediachase.FileUploader.AssemblyResourceHandler, Mediachase.FileUploader" />

    </httpHandlers>

  </system.web>

  <!-- End:system.web Sections -->

</configuration>

sectionGroup Section

Name

Description

mediachase.fileUploader

Register Mediachase FileUploader.NET common web.config section.

fileUploaderContext

Register Mediachase FileUploader.NET context web.config section.

tempFileStorage

Register temporary file storage web.config section.

uploadProgress

Register upload progress web.config section.

fileUploadControl

Register FileUploaderControl web.config section.

mediachase.fileUploader Section

         fileUploaderContext Element

Attribute

Description

sessionUidKey

Query string key of sessionUid.

Default value: SessionUid

tempFileStorageProviderKey

Query string key of temporary file storage provider name.

Default value: TempFileStorageProvider

httpPostMaxSize

64-bit integer that represents the minimal post or file upload size in kilobytes.

Default value: not use

* The Evaluation version of this control has a limit of 25 Megabytes for testing and evaluation purposes.

httpPostBufferSize

64-bit integer that represents the buffer size in bytes, which Mediachase FileUploader will use to process request. You can change this value for better optimization.

Default value: 655360 bytes

fileUploaderContext/filters Element

Page Filter specifies whether to allow or deny the Mediachase FileUploader.NET for the ASP.NET pages.

If you want to modify the behavior, you need to add the filter element into the section. The filters element supports three Subtags: add, remove and clear.

At run time, if the pageFilter element is present: the FileUploader module iterates through the <allow> and <deny> tags until it finds the first access rule that fits a particular Request Path, if the FileUploader module couldn't find tags, it ignores page.

If the pageFilter element is not present: Mediachase FileUploader.NET optimizes all pages. So, the default page filter rule is <add type="Allow" RequestPath="*"/>.

Attribute

Description

type

Supports values Allow and Deny.

Allow – Allows access to a page based on the requestPath.

Deny - Denies access to a page on the requestPath.

requestPath

The pattern match mask expression allows you to use two basic character types: literal (normal) text characters and metacharacters.

Metacharacters used to ? and * characters.

fileUploaderContext/contentTypes Element

Sometime Web Browser doesn't send file content type. Content type uses to resolve content type by file extension. Mediachase FileUploader.NET includes a lot pre-installed content type, but you can extend or override it via web.config section.

The contentTypes element supports three Subtags: add, remove and clear.

Attribute

Description

extension

The file name extension.

Example: “zip”

name

The content type name.

Example: “application/zip”

         tempFileStorage Element

Attribute

Description

defaultProvider

The default temporary file storage provider name.

Default: McLocalDiskTempFileStorageProvider

enabled

Indicating whether the temporary file storage is enabled.

Default: true

timeout

Specifies the time, in minutes, after which delete file (session) from temporary file storage.

Default: 60 minutes.

tempFileStorage/providers element

Attribute

Description

name

The name of temporary file storage provider.

type

Specifies a comma-separated class/assembly combination consisting of version, culture, and public key tokens.

         uploadProgress Element

Attribute

Description

defaultProvider

The default upload progress provider name.

Default: McInProcessProgressStateProvider

enabled

Indicating whether the upload progress is enabled.

Default: true

timeout

Specifies the time, in minutes, after which delete session from upload progress.

Default: 60 minutes.

uploadProgress/providers element

Attribute

Description

name

The name of upload progress provider.

type

Specifies a comma-separated class/assembly combination consisting of version, culture, and public key tokens.



Copyright 2007 Mediachase. All rights reserved.