Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 1143
Product
FileUpEE
Version
For FileUp/FileUpEE version 5 and higher
Title
Can the HttpModule be configured to cache to a network share?
Problem
How can the HttpModule of FileUp and FileUpEE be configured to cache the uploaded files using a UNC path to a network share?
Solution

The HttpModules of FileUp and FileUpEE can both cache the uploaded files over a UNC path to a network share. This article describes the steps needed to properly configure your file transfer application to achieve this with both FileUp and FileUpEE.

  1. Configure the HttpModule to cache to a UNC path:

    FileUpEE's HttpModule

    FileUpEE's HttpModule is configured differently in version 5.1.1 and above than it was in earlier versions.

    1. For version 5.1.1 and higher:

      With version 5.1.1 and higher of FileUpEE the configuration settings for the HttpModule are no longer in the registry but rather in the web.config file of your ASP.NET application. This allows you to have different settings for different FileUpEE applications on the same machine. (For further information about this Module configuration change in version 5.1.1 and higher see the documentation http://docs.softartisans.com/FileUpEE/5.2.0//Default.aspx?redirect=install/install_httpmodule.htm) To configure the Module to cache the uploaded files to a UNC path, simply locate the FileUpEeTempDir key in the <appSettings> section in your application’s web.config file and set its value to the UNC path.

    2. For versions prior to 5.1.1:

      In versions prior to 5.1.1 all the configuration settings for the HttpModule are in the registry. So the first step is to open up the registry editor (RegEdit or RegEdt32) and browse to the following location: HKEY_LOCAL_MACHINE\SOFTWARE\SoftArtisans\FileUpEe\Parameters. The location where the HttpModule will cache the uploaded files is controlled by the FileUpEeTempDir key. Set this key’s value to the UNC path of the network share where you want the Module to cache the files. In order for this change to the registry to take effect you will need to reset IIS. You can do so by running the “iisreset” command at the command line.

    FileUp SE's HttpModule

    Just like earlier versions of FileUpEE, the caching location for the FileUp’s HttpModule is configured in the registry. So the first step is to open up the registry editor and browse to the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Software Artisans\SA-FileUp\Parameters. The location where the HttpModule will cache the uploaded files is controlled by the FileUpTempDir key. Set this key’s value to the UNC path of the network share where you want the Module to cache the files. In order for this change to the registry to take effect you will need to reset IIS. You can do so by running the “iisreset” command at the command line.

  2. Set the appropriate permissions for the network share:

    There are security issues that need to be taken into account when changing the Module’s caching location from a local directory to a network share. Just like saving a file to a network share from a FileUp/FileUpEe object (which is described in the following KB article: http://support.softartisans.com/kbview.aspx?ID=18), caching to a network share over a UNC path requires that the HttpModule run under an account that also has read/write/modify permissions for that caching location. By default your ASP.NET application will be running as the ASPNET account (in IIS5) or the NETWORK SERVICE account (in IIS6 and above). Since this is a local account, it will not have permissions to access the UNC share. You will need to either use a domain account that has network priviledges, or follow the instructions in KB article #18 in order to setup a local account that is identical on both servers.

  3. Enable ASP.NET impersonation for your application:

    The account that your ASP.NET application runs as can be controlled through impersonation in your application’s web.config file.
    • Setting <identity impersonate="true"/> in your web.config (with no other attributes) will run the application under the account with which IIS authenticates the request. This account is set for the virtual directory in the IIS management console under the "Directory Security" tab.
    • Setting <identity impersonate="true" userName="SomeUserAccount" password="SomePassword"/> can be used to run the application under a specific identity.
    A useful MS article on the effects of impersonation can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp.
Created : 9/6/2005 11:51:06 AM (last modified : 5/15/2009 4:44:47 PM)
Rate this article!
Comments