Temporary File-Store

Mediachase FileUploader.NET uses temporary file store to optimize large file upload, because ASP.NET is built in such way that all client requests
are kept in memory as one data thread. Mediachase FileUploader.NET has solved this problem. Files in post-request are saved in temporary location
and replaced with active markers with fixed size (few bytes), which allows to make post request fixed size. 

In local disk mode, temporary files are stored in a local disk.

In Sql mode, progress states are stored in a Sql Server database and the worker process talks directly to Sql. 

Configuring Local Disk Mode

To use local disk mode, set the TempStorage  and TempStoragePath  attributes of the element to httpFile . The following shows a sample
configuration setting for in-process mode.
<Mediachase.FileUploader.McHttpModule>
	<httpFile TempStorage="LocalDisk" ="%TEMP%"/>
</Mediachase.FileUploader.McHttpModule>

Configuring Sql Server Mode

To use SQL Server, first run either InstallSqlTemporaryStorage.sql or InstallPersistSqlTemporaryStorage.sql on the computer with SQL Server that
will store the progress state. Both scripts create a table called McFile. The difference between the scripts is where the McFile table are placed.
The InstallSqlTemporaryStorage.sql script adds this tables to the TempDB database, which loses progress data if the computer is restarted.
The InstallPersistSqlTemporaryStorage.sql script, on the other hand, adds this table to the FileUpState database, which allows progress
data to be retained when the computer is restarted.

Both of these script files are installed by default at the following location:

FileuploaderInstallDir\Sql Scripts\

Next, set the TempStorage attribute of the httpFile element to SqlServer in the Web.config file of the application. Finally, set the TempStorageConnectionString attribute to Integrated Security=SSPI;data source=serverName;Initial Catalog=databaseName; .
<Mediachase.FileUploader.McHttpModule>
	<httpFile TempStorage="SqlServer" TempStorageConnectionString="Integrated Security=SSPI;data source=serverName; Initial Catalog =databaseName;"/>
</Mediachase.FileUploader.McHttpModule>
Note: The TempStorage attribute is optional. You can use it to specify temporary file store if both the attributes (TempStorageConnectionString and TempStoragePath) were set.

Copyright 2005 Mediachase. All rights reserved.