Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: First published version

...

Enterprise Tester provides the option of storing attachments in a file system rather than in the Enterprise Tester database.  By default Enterprise Tester will store attachments in the database, unless the user configures to do otherwise.

Configuration of Storage Method and Location – New Installations of Enterprise Tester

If you have just installed Enterprise Tester, and have yet to create any data, you can configure the location for storing attachment contents by editing the web.config file.

Open the web.config (normally found in C:\Program Files\Catch Limited\Enterprise Tester\Web\web.config) and locate the appSettings section, which will normally look something like this:

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
</appSettings>

Now, if you wish to use In-database storage of attachments, you can leave the file as-is, however if you wish to use file-system based store, you need to add an additional value using the key "attachment.storage.method" with the value "FileSystemCas".

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
   <add key="attachment.storage.method" value="FileSystemCas" />
</appSettings>

By default this will store attachments in the folder ../Data/Attachments/ (so normally c:\Program Files\Catch Limited\Enterprise Tester\Data\Attachments)

If however you wish store attachments in another location (i.e. if you have a lot of attachments and wish to store them on a NAS disk) you can set the path by adding another entry with the key "attachment.storage.path".

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
   <add key="attachment.storage.method" value="FileSystemCas" />
   <add key="attachment.storage.path" value="f:\et-attachments\" />
</appSettings>

Setting Maximum File Sizes

To support the attachment of very large files change to the configuration of the application are also required. By default Enterprise Tester sets a limit of 64mb for requests. To support attaching larger files you will need to change this value.

In the web.config file, locate this section:

<system.web>
    <httpRuntime executionTimeout="18000" maxRequestLength="65535" />

The value "maxRequestLength" controls the maximum size of requests in kilobytes, changing this to value such as 1024000, will allow you to upload files up to 1gb in size.

Garbage Collection

When you delete an attachment, the associated contents (if stored on say the file system) won't be immediately removed. Instead a periodic process occurs called "garbage collection" where any content no longer referenced by the database is then removed. By default this process runs once every hour.  The frequency can be configured by specifying an additional key "attachment.storage.garbagecollection.dwell":

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
   <add key="attachment.storage.method" value="FileSystemCas" />
   <add key="attachment.storage.garbagecollection.dwell" value="5" />
</appSettings>

In the example above we have set "dwell" to 5 minutes. Attachments will be “cleaned up” every 5 minutes. Generally speaking, it is recommended that unless you are performing tests, this should be set to 30 minutes or higher.

In addition if you wish to disable garbage collection altogether, you can add the key "attachment.storage.garbagecollection.disable" with the value "true".

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
   <add key="attachment.storage.method" value="FileSystemCas" />
   <add key="attachment.storage.garbagecollection.disable" value="false" />

...

file system. Previously, Enterprise Tester defaulted to storing attachments in the database, in order to move to file storage of attachments you will be required to migrate your attachments.

Changing Attachment Storage from Database to File System ( Existing installation of Enterprise Tester)

...

If you are migrating from file system to in-database storage, you will need to manually delete/archive the attachment files after the migration.

Setting Maximum File Sizes

To support the attachment of very large files change to the configuration of the application are also required. By default Enterprise Tester sets a limit of 64mb for requests. To support attaching larger files you will need to change this value.

In the web.config file, locate this section:

<system.web>
    <httpRuntime executionTimeout="18000" maxRequestLength="65535" />

The value "maxRequestLength" controls the maximum size of requests in kilobytes, changing this to value such as 1024000, will allow you to upload files up to 1gb in size.

Garbage Collection

When you delete an attachment, the associated contents (if stored on say the file system) won't be immediately removed. Instead a periodic process occurs called "garbage collection" where any content no longer referenced by the database is then removed. By default this process runs once every hour.  The frequency can be configured by specifying an additional key "attachment.storage.garbagecollection.dwell":

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
   <add key="attachment.storage.method" value="FileSystemCas" />
   <add key="attachment.storage.garbagecollection.dwell" value="5" />
</appSettings>

In the example above we have set "dwell" to 5 minutes. Attachments will be “cleaned up” every 5 minutes. Generally speaking, it is recommended that unless you are performing tests, this should be set to 30 minutes or higher.

In addition if you wish to disable garbage collection altogether, you can add the key "attachment.storage.garbagecollection.disable" with the value "true".

<appSettings>
   <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />   
   <add key="attachment.storage.method" value="FileSystemCas" />
   <add key="attachment.storage.garbagecollection.disable" value="false" />
</appSettings>

Setting Automatic Refresh Lookups

...