|
|||
Progress State-StoreMediachase FileUploader.NET provides a simple and easy-to-use progress-state model that you can use to get a progress information across multiple file uploads (POST requests). It accomplishes this using either in-memory cash of object references or sql table.When using the in-process progress-state mode consider the following limitations: progress-state data is lost if aspnet_wp.exe or the application domain restarts. These restarts commonly occur in the following circumstances:
Configuring In-process Mode In-process is the default progress state mode. To use in-process mode, set the Mode attribute of the <Mediachase.FileUploader.McHttpModule> <progressState Mode="InProcess"/> </Mediachase.FileUploader.McHttpModule> Configuring Sql Server Mode To use SQL Server, first run either InstallSqlState.sql or InstallPersistSqlState.sql on the computer with SQL Server that will store the progress state. Both scripts create a table called McFileUpForm and several stored procedures. The difference between the scripts is where the McFileUpForm table are placed. The InstallSqlState.sql script adds this tables to the TempDB database, which loses progress data if the computer is restarted. The InstallPersistSqlState.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 Mode attribute of the <progressState> element to SqlServer in the Web.config file of the application. Finally, set the ConnectionString attribute to Integrated Security=SSPI;data source=serverName;Initial Catalog=databaseName; . <Mediachase.FileUploader.McHttpModule> <progressState Mode="SqlServer" ConnectionString="Integrated Security=SSPI;data source=serverName; Initial Catalog =databaseName;"/> </Mediachase.FileUploader.McHttpModule> |
|||