file-uploadasp.net-ajaxneatupload

How to Install NeatUpload?


Salvete! Whilst searching for a quality, free asp.net/ajax upload control, I found NeatUpload. I cannot find an online demo for it, but the download package does come with a demo. I need some help installing it on my server (Windows Server 2008).

I followed the directions at http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html (they are basically the same as the directions in the manual.htm that comes with the NeatUpload binary package).

So far, I have

Now, when I browse to the page, I get an asp.net server error on

Line 35: protected MultiFile multiFile;
Line 36: protected MultiFile multiFile2;
Line 37: protected InputFile inputFile;

and

error CS0246: The type or namespace name 'MultiFile' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'MultiFile' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'InputFile' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'InputFile' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'ProgressBar' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'ProgressBar' could not be found (are you missing a using directive or an assembly reference?)

What do I do now? Do I need to copy another dll somewhere, or certain files? I can't figure it out from the documentation.


Solution

  • Figured it out! I am deploying the control to a sharepoint web application. (Below, consider SPVD as "Sharepoint Application's Virtual Directory".) If you are not deploying to a Sharepoint website, then you will use the root of your web application's virtual directory where I have used Sharepoint's instead. Here are the steps I followed to get the demo page to run on my server.

    Firstly, configuration is different if you use a "web-application" instead of a "web-site". I won't go into the difference here. But in my example, I am configuring a simple "web-site". I had to:

    Here is the web.config I put in the folder with the demo page.

    <?xml version="1.0"?>
    <configuration>
    
      <configSections>
        <!--You need this part so that you can have a neatupload configuration section.  You will get .net errors if you try to add the configuration section without this part here.-->
        <section name="neatUpload"
          type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload"
          allowLocation="true"
          />
      </configSections>
    
      <!--This is where you put your neatupload configuration preferences.-->
      <neatUpload xmlns="http://www.brettle.com/neatupload/config/2008"
          useHttpModule="true"
        />
    
      <system.web>
        <customErrors mode="Off"/>
        <!-- Always required to use any of NeatUpload's features.  Without it, ProgressBars won't display and MultiFile will look like a regular HtmlInputFile. -->
        <httpModules>
          <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule,Brettle.Web.NeatUpload,Version=1.3.3798.663,Culture=neutral,PublicKeyToken=c95290d92c5893c8" />
        </httpModules>
    
        <!-- Set these next 2 attributes large enough to accomodate the largest and longest running upload you want to support.  Note that browsers and IIS typically don't support uploads larger than 2GB (2097151 KB). -->
        <httpRuntime maxRequestLength="2097151" executionTimeout="999999"/>
    
        <!-- Not required for NeatUpload but makes it easier to debug in VS. -->
        <compilation debug="true"/>
      </system.web>
    
      <!-- For IIS7's Integrated Pipeline Mode which is used by the DefaultAppPool. -->
      <system.webServer>
        <security>
          <requestFiltering>
            <!-- Increased maxAllowedContentLength from default of 300MB. -->
            <requestLimits maxAllowedContentLength="2147483648" />
          </requestFiltering>
        </security>
        <modules>
          <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule,Brettle.Web.NeatUpload,Version=1.3.3798.663,Culture=neutral,PublicKeyToken=c95290d92c5893c8" preCondition="managedHandler"/>
        </modules>
        <validation validateIntegratedModeConfiguration="false"/>
      </system.webServer>
    </configuration>
    

    Some Notes on Installation Packages The installation package I used was at http://neatupload.codeplex.com/releases/view/46086 - there seem to be a few others, such as a "binaries package" at http://neatupload.codeplex.com/releases/view/59339, but the directory structure is different, and the instructions won't make much sense. There is also a package on the main project page at CodePlex: http://neatupload.codeplex.com/, but if you use this package, you will have a different version number and guid for the dll when you deploy it to the GAC.

    Instruction Manuals By way of an instruction manual, check out: http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html?showComment=1335835416022#c1846924755786832325, and there is also an html manual in the binaries package above. In the other packages, you have to "build" the manual with Open Office. Then, of course, you can reference this post!

    Troubleshooting Having problems?

    The only thing left now, is to add some sort of handler for copying the files to where you want them. NeatUpload only adds them to a temp file, and I have yet to figure out where it is...