bgm*_*der 3 file-upload asp.net-ajax neatupload
Salvete!在寻找高质量的免费asp.net/ajax上传控件时,我找到了NeatUpload.我找不到它的在线演示,但下载包附带了一个演示.我需要一些帮助在我的服务器上安装它(Windows Server 2008).
我按照http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html上的说明进行操作(它们与NeatUpload二进制包附带的manual.htm中的说明基本相同) .
到目前为止,我有
现在,当我浏览页面时,我得到一个asp.net服务器错误
Line 35: protected MultiFile multiFile;
Line 36: protected MultiFile multiFile2;
Line 37: protected InputFile inputFile;
Run Code Online (Sandbox Code Playgroud)
和
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?)
Run Code Online (Sandbox Code Playgroud)
现在我该怎么做?我是否需要在某处复制另一个dll或某些文件?我无法从文档中找到它.
弄清楚了!我正在将控件部署到sharepoint Web应用程序.(下面,将SPVD视为"Sharepoint应用程序的虚拟目录".)如果您没有部署到Sharepoint网站,那么您将使用您使用Sharepoint的Web应用程序虚拟目录的根目录.以下是我在服务器上运行演示页面时所遵循的步骤.
首先,如果您使用"网络应用程序"而不是"网站",配置会有所不同.我不会在这里发挥作用.但在我的例子中,我正在配置一个简单的"网站".我不得不:
Brettle.Web.NeatUpload.dll到服务器上的GAC(似乎在Windows Server 2008上,您不必使用gacutil - 只需将dll复制到%windir%\ assembly中.另请注意,您必须在服务器上执行此操作;它不会如果您尝试通过网络共享进行操作,则无法正常工作.如果你不这样做,NeatUpload演示就不会做任何事情.执行此操作后,您必须在IIS中重新启动网站.指南还说要在aspx页面中使用guid和版本号,比如demo.aspx,所以,替换这个:
<%@ 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.25\dotnet\app\bin到SVPD\bin.它包含以下项目:
en-US(里面有一个dll)fr(带有一个dll)现在,您需要将目录:复制NeatUpload-1.3.25\dotnet\app\NeatUpload到SPVD,并将其保留为命名NeatUpload,以便您拥有SVPD\NeatUpload其所有原始内容.现在,在该文件夹中,您需要编辑两个文件:Progress.aspx和SmoothProgress.aspx.在指南中,我被告知在@声明中使用guids和版本号,例如:
<%@ 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.
<?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>
Run Code Online (Sandbox Code Playgroud)
关于安装包 的一些注意事项我使用的安装包位于http://neatupload.codeplex.com/releases/view/46086 - 似乎还有其他几个,例如http:// neatupload上的"二进制包" . codeplex.com/releases/view/59339,但目录结构不同,说明没有多大意义.CodePlex的主项目页面上还有一个软件包:http://neatupload.codeplex.com/,但是如果你使用这个软件包,当你将它部署到GAC时,你将拥有不同的版本号和guid用于dll .
使用说明书 通过使用说明书,请查看:http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html?showComment=1335835416022#c1846924755786832325,还有一个html手册上面的二进制包.在其他包中,您必须使用Open Office"构建"手册.那么,当然,你可以参考这篇文章!
故障排除 有问题?
现在唯一剩下的就是添加某种处理程序,将文件复制到你想要的位置.NeatUpload只将它们添加到临时文件中,我还没弄清楚它在哪里......
| 归档时间: |
|
| 查看次数: |
4729 次 |
| 最近记录: |