AjaxUploader.dll 适用于匿名身份验证,但适用于集成 Windows
为不熟悉 Ajax 上传工具的客户端管理 IIS6 主机,从此处获取:http://ajaxuploader.com/ http://cutesoft.net
启用集成 Windows 身份验证时,单个文件上传工作正常,多文件上传尝试似乎没有进展(但不要记录我发现的任何错误..?)。 将身份验证修改为匿名可以使多文件上传正常工作。
目标要上传到 SQL Server 数据库的文件。 粘贴下面行的代码行。
Default.aspx.cs 包含:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ltOutput.Text = "";
}
protected void FileUploaded(object sender, UploaderEventArgs e)
{
ltOutput.Text += "File upload complete: <a href=\"download"
+ .aspx?guid=" + e.FileGuid.ToString() + "\">" + e.FileName
+ "</a>, File Size: " + e.FileSize + ", FileGUID: "
+ e.FileGuid.ToString() + "</a><br/>";
}
}
Administering an IIS6 host for client who is new to an Ajax Upload tool obtained from here: http://ajaxuploader.com/
http://cutesoft.net
When Integrated Windows Authentication is enabled, a single file upload works fine, multi-file upload attempts don't appear to progress (but don't log any errors, that I've found yet..?). Modifying Authentication to anonymous allows Multifile upload to work fine.
Files targeted to be uploaded to a SQL Server db. Pasted code line for line below.
Default.aspx.cs contains:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ltOutput.Text = "";
}
protected void FileUploaded(object sender, UploaderEventArgs e)
{
ltOutput.Text += "File upload complete: <a href=\"download"
+ .aspx?guid=" + e.FileGuid.ToString() + "\">" + e.FileName
+ "</a>, File Size: " + e.FileSize + ", FileGUID: "
+ e.FileGuid.ToString() + "</a><br/>";
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我敢打赌这是因为他们使用 Flash 组件进行多文件上传。 单次上传使用浏览器会话,因此它保持经过身份验证,但多次上传使用 Flash,它在不同的会话中连接到服务器,因此存在身份验证问题。 Flash 无法正确处理 Windows 身份验证。
您有几个选择,但都不是有趣的:
I'd bet that this is because they're using a Flash component for the multi file upload. The single upload uses the browser session so it stays authenticated, but the multi upload uses Flash which connects to the server in a different session, hence the authentication issues. Flash doesn't handle windows auth properly.
You've got a couple choices, neither of which are fun: