AsyncFileUpload 在服务器上失败
我目前正在 VB.NET Web 应用程序中使用 AsyncFileUpload。
在本地它工作得很好,但是在服务器上它无法上传小文件(<9k)。
我什至无法调试它,因为在 JavaScript 处理程序中我不知道如何获取错误原因。
function uploadError(sender,args) {
$get("<%=LabelErr.ClientID%>").innerHTML = "Unable to Upload file for the following reason: ", "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
}
Web 应用程序当然可以写入我在处理 OnUploadedFileError 事件时尝试保存文件的文件夹,然后编写一个测试文件以确保服务器可以写入该目录(这有效)
是否有人有任何想法或可以指出我如何尝试获取错误消息?
编辑:这是一个权限问题。在客户端尝试上传的文件夹中,权限被拒绝。任何人都可以指示应允许哪些用户/角色访问此文件夹以确保可写性
I am currently using the AsyncFileUpload in my VB.NET web app.
Locally it works perfectly, however on the server it fails to upload a small file (<9k).
I can't even seem to debug this as in JavaScript handlers I have no idea as to how to get the error reason.
function uploadError(sender,args) {
$get("<%=LabelErr.ClientID%>").innerHTML = "Unable to Upload file for the following reason: ", "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
}
The web app can certainly write to the folder I ma trying to save the file as I handle the OnUploadedFileError event and then write a test file to make sure the server can write to the directory (this works)
Does anyone have any ideas or can point in the direction of how I can try and get the error message?
EDIT: This is a permissions issue. In the folder the client was trying to upload to permission was denied. Can anyone indicate what user/role should be allowed access to this folder to ensure writeability
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要
向 ASPNET 用户授予读/写权限
,查看此 URL 并按照步骤授予权限http://www.ironspeed.com/Designer/3.2.4 /WebHelp/Part_VI/ASP_NET_User_Does_Not_Have_Permissions_to_Your_Application.htm
http:// /www.asp.net/learn/whitepapers/denied-access-to-iis-directories
you need to
grant Read/Write permission to ASPNET user
, have a look on this URL and follow the steps to grant permissionhttp://www.ironspeed.com/Designer/3.2.4/WebHelp/Part_VI/ASP_NET_User_Does_Not_Have_Permissions_to_Your_Application.htm
http://www.asp.net/learn/whitepapers/denied-access-to-iis-directories