Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 778
How to integrate FileUpSE/EE samples into Visual Studio .NET for development.
Posting to files with a UPLX extension invokes the FileUpSE or FileUpEE HttpModule. The HttpModule is necessary to provide accurate progress indication and adequate memory management when uploading with ASP.NET. Any page receiving an upload post in production should be named with the UPLX extension to take advantage of the HttpModule. Even though UPLX pages are conventional ASP.NET web forms with just a different file extension, you may find that Visual Studio.NET does not handle UPLX files in the same way that it does ASPX files. Visual Studio.NET may not allow you to edit UPLX web forms in the web form designer, or recognize a CodeBehind relationship between the web form and the class file even though such a relationship does exist. If you choose to use Visual Studio.NET to develop your FileUpEE application, read this KB article and follow the steps outlined.
Why use uplx file extension?
  • Utilize FileUpSE/EE's accurate server-side progress indication for uploads
  • Bypass ASP.NET's poor memory management during processing of upload requests
Why change to aspx extension for developing?
  • Utilize Visual Studio's .NET's (VS.NET) advanced developer features like colorized code, intellisense, and drag-and-drop controls
  • Utilize Visual Studio .NET's WebForm and Codebehind pairing

Q: Do I need to change the file extensions to get my samples to run?
A: No. The pages will run in VS.NET whether they are uplx or aspx as long as the file extension is mapped to aspnet_isapi.dll. What you will lose when running uplx pages in VS.NET are the advanced features like the editing with the web form designer.

Q: Which files should I convert from aspx to uplx?
A: Only files that process uploads. For example, these sample files can be converted for development in VS.NET:
  • Checksum.uplx to Checksum.aspx
  • ControlFileType.uplx to ControlFileType.aspx
  • ControlFileType.uplx to ControlFileType.aspx
  • FileAndForm.uplx to FileAndForm.aspx

Although the progress indicator page (ProgressIndicator.aspx) is involved with an upload, the page should remain as aspx because it is not actually processing uploads.

To configure FileUpSE/EE sample files to integrate with VS.NET
  • Rename particular webform and codebehind from uplx extension to aspx. For instance:
    FileAndForm.uplx -> FileAndForm.aspx
    FileAndForm.uplx.cs -> FileAndForm.aspx.cs
  • Import Sample Files:
    1. Open up VS.NET to create a new project
    2. Specify and name either vb.net or c# web project
    3. Right-Click on the project name in the VS.NET Solution Explorer.
    4. Choose 'Add' then 'Add Existing Item'
    5. Browse to and add the FileUp(EE) sample webform and codebehind pages which were just renamed to the aspx extension.
  • Rename the Src directive to CodeBehind at the top of the webform page. For instance:
    <%@ Page Language="c#" Inherits="FileUpSESamples.Simple"  Debug="True" Src="Simple.aspx.cs" 
    AutoEventWireup="false" %>
    <%@ Page Language="c#" Inherits="FileUpSESamples.Simple"  Debug="True" CodeBehind="Simple.aspx.cs" 
    AutoEventWireup="false" %>
  • Add Object References:
    1. Right-Click on 'References' in the VS.NET Solution Explorer
    2. Choose Add References
    3. For FileUp Standard Edition In the .NET tab, click 'Browse' and navigate to FileUp.dll, SAPrgres.dll, and for use when the extension is uplx, FileUpModule.dll. Click 'OK'.*
    4. For FileUp Enterprise Edition In the .NET tab, click 'Browse' and navigate to FileUpEE.dll, MimeClient.dll, FileUpEeProgress.dll, and for use when the extension is uplx, FileUpEeModule.dll. Finally, click 'OK'.*
  • Add configuration to the web.config
    1. The FileUpEE/SE Module intercepts the upload request to bypass ASP.NET's poor memory management. To configure the .NET application to use the filter, add the following node to the application's web.config:
      1. FileUpSE:

        <httpModules> <add name="FileUpModule" type="SoftArtisans.Net.FileUpModule, FileUpModule, Version=5.0.0.***, Culture=neutral, PublicKeyToken=f593502af6ee46ae"/> </httpModules>

      2. FileUpEE:

        <httpModules> <add name="FileUpEeModule" type="SoftArtisans.Net.FileUpEeModule, FileUpEeModule, Version=5.0.0.***, Culture=neutral, PublicKeyToken=f593502af6ee46ae"/> </httpModules>

Note: The version attribute in the web.config must match the dll version exactly. To determine the dll version, locate the file in Windows Explorer, right-click, choose Properties, select the Version tab. The file version is listed at the top.

* Make certain that the version number of the selected dll is the exact version that is registered via Regsvr32.

To revert FileUpSE/EE files for production
  • For the webform that posts to the codebehind page processing uploads, change the file extension from aspx to uplx. For example:
    FileAndForm.aspx -> FileAndForm.uplx
  • Add the FileUpModule.dll or FileUpEEModule.dll to the application's bin directory
  • Add the httpmodule node to the web.config referencing the version of the FileUpModule.dll/FileUpEEModule.dll in that application's bin directory

Note: Do not use the FileUpSE/EE ISAPI filter along with the HttpModule.
Created : 1/12/2004 2:54:30 PM (last modified : 1/12/2004 2:54:29 PM)
Rate this article!