如何安装 NeatUpload? [英] How to Install NeatUpload?

查看:30
本文介绍了如何安装 NeatUpload?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

萨尔维特!在寻找高质量、免费的 asp.net/ajax 上传控件时,我找到了 NeatUpload.我找不到它的在线演示,但下载包确实带有演示.我需要一些帮助来在我的服务器 (Windows Server 2008) 上安装它.

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).

我按照 http://mumblestiltskin.blogspot 上的说明进行操作.com/2009/10/using-neatupload-simple-setup.html(它们与NeatUpload二进制包附带的manual.htm中的说明基本相同).

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).

到目前为止,我已经

  • 使用以下命令成功将 Brettle.Web.NeatUpload.dll 安装到 GAC加库利.
  • 在我的 web.config 中添加了引用(带有版本和 guid)
  • 将演示文件及其代码隐藏复制到我的 Web 应用程序(其中已在 iis7 中注册)

现在,当我浏览到该页面时,我在

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;

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?)

我现在该怎么办?我需要在某处复制另一个 dll 或某些文件吗?我无法从文档中弄清楚.

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.

推荐答案

想通了!我正在将控件部署到 sharepoint Web 应用程序.(在下面,将 SPVD 视为Sharepoint 应用程序的虚拟目录".)如果您不部署到 Sharepoint 网站,那么您将使用 Web 应用程序的虚拟目录的根目录,而我使用的是 Sharepoint 的虚拟目录.以下是我在我的服务器上运行演示页面所遵循的步骤.

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:

  • Brettle.Web.NeatUpload.dll 复制到服务器上的 GAC 中(似乎在 Windows Server 2008 上,您不必必须使用 gacutil -只需将 dll 复制到 %windir%assembly 中.另请注意,您必须在服务器上执行此操作;如果您尝试通过网络共享执行此操作,则无法正常工作).如果您不这样做,NeatUpload Demo 将不会执行任何操作.执行此操作后,您必须在 IIS 中重新启动网站.
  • 一些指南说你需要更新 web.config 以显示适当的版本和 guid,但我发现我不必这样做(你会在下面看到我的 web.config) - 除非 - 你想在web.config 中使用neatupload 的部分配置.所以,你知道,最好做对了.
  • 指南也说在aspx页面中使用guid和版本号,比如demo.aspx,所以,替换这个:

  • Copy Brettle.Web.NeatUpload.dll into the GAC on the server (it seems that on Windows Server 2008, you don't have to use the gacutil - just copy the dll into %windir%assembly. Also note that you must do this on the server; it doesn't work right if you try to do it over a network share). If you don't do this, the NeatUpload Demo just won't do anything. You will have to restart the website in IIS after you do this.
  • Some of the guides say you need to update the web.config to display the appropriate version and guid, but I found that I didn't have to do that (you will see my web.config below) - UNLESS - you want to use neatupload's section configuration in web.config. So, it is better just to do it right, you know.
  • The guides also say to use the guid and version number in the aspx pages, like demo.aspx, So, replace this:

<%@ Register TagPrefix="Upload" Namespace="Brettle.Web.NeatUpload" Assembly="Brettle.Web.NeatUpload" %>

这样:

<%@ Register TagPrefix="Upload" Namespace="Brettle.Web.NeatUpload" Assembly="Brettle.Web.NeatUpload, Version=1.3.3798.663,Culture=neutral, PublicKeyToken=c95290d92c5893c8" %>

NeatUpload-1.3.25dotnetappin 的整个目录复制到 SVPDin.它包含以下项目:

Copy the entire directory at NeatUpload-1.3.25dotnetappin to SVPDin. It contains the following items:

  • Brettle.Web.NeatUpload.dll(与您安装到 GAC 的相同)
  • Brettle.Web.NeatUpload.GreyBoxProgressBar.dll
  • Brettle.Web.NeatUpload.HashedInputFile.dll
  • Hitone.Web.SqlServerUploader.dll
  • 一个名为 en-US 的目录(里面有一个 dll)
  • 另一个名为 fr 的目录(其中包含一个 dll)
  • 几个 .mdb 数据库和 Brettle.Web.NeatUpload.xml
  • 将对 http 模块的引用添加到 Web 应用程序的 web.config 文件(请参阅下面的 web.config 示例).
  • Brettle.Web.NeatUpload.dll (the same as the one you installed to the GAC)
  • Brettle.Web.NeatUpload.GreyBoxProgressBar.dll
  • Brettle.Web.NeatUpload.HashedInputFile.dll
  • Hitone.Web.SqlServerUploader.dll
  • a directory called en-US (with a dll in it)
  • another direcotry called fr (with a dll in it)
  • several .mdb databases, and Brettle.Web.NeatUpload.xml
  • Add the references to the http modules to the web-application's web.config file (see web.config sample below).

现在,您需要将目录:NeatUpload-1.3.25dotnetappNeatUpload 复制到 SPVD,并将其命名为 NeatUpload,所以您拥有 SVPDNeatUpload 及其所有原始内容.现在,在该文件夹中,您需要编辑两个文件:Progress.aspxSmoothProgress.aspx.在指南中,我被告知要使用 @ 声明中的 guid 和版本号,例如:

Now, you need to copy the directory: NeatUpload-1.3.25dotnetappNeatUpload to SPVD, and leave it named NeatUpload, so that you have SVPDNeatUpload with all its original contents. Now, in that folder, there are two files you need to edit: Progress.aspx and SmoothProgress.aspx. In the guides, I was told to use the guids and version numbers in the @ declarations, such as this:

<%@ Page language="c#" AutoEventWireup="false" Inherits="Brettle.Web.NeatUpload.ProgressPage,Brettle.Web.NeatUpload,Version=1.3.3519.18793,Culture=neutral,PublicKeyToken=C95290D92C5893C8" %>

<%@ Register TagPrefix="Upload" Namespace="Brettle.Web.NeatUpload" Assembly="Brettle.Web.NeatUpload, Version=1.3.3798.663,Culture=neutral, PublicKeyToken=c95290d92c5893c8" %>

这是我放在演示页面文件夹中的 web.config.

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>

安装包的一些注意事项我使用的安装包位于 http://neatupload.codeplex.com/releases/view/46086 - 似乎还有其他一些,例如 http 上的二进制包"://neatupload.codeplex.com/releases/view/59339,但是目录结构不同,说明没有多大意义.CodePlex 的主项目页面上还有一个包:http://neatupload.codeplex.com/,但如果你使用这个包,当你将它部署到 GAC 时,你将有一个不同的版本号和 dll 的 guid.

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.

使用说明书通过使用说明书,请查看:http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html?showComment=1335835416022#c1846924755786832325,上面的二进制包里还有一个html手册.在其他软件包中,您必须使用 Open Office构建"手册.那么,当然,你可以参考这篇文章!

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!

问题排查有问题?

现在唯一剩下的就是添加某种处理程序,用于将文件复制到您想要的位置.NeatUpload 只将它们添加到临时文件中,我还没有弄清楚它在哪里......

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...

这篇关于如何安装 NeatUpload?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆