读书人

ASP.NET空间图片下传有关问题(用java

发布时间: 2013-02-24 17:58:56 作者: rapoo

ASP.NET空间图片上传问题(用javascript),求高手帮助
错误提示:Failed to map the path '/SystemManager/BookInfoManager/A generic error occurred in GDI+.'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Failed to map the path '/SystemManager/BookInfoManager/A generic error occurred in GDI+.'.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

图片上传方法:这是javascript语言

 //上传方法
function uploadFile(fileId) {

$("#uploading").ajaxStart(function () {
$(this).show();
}).ajaxComplete(function () {
$(this).hide();
});

$.ajaxFileUpload({
url: "/FileUpload/FileUpload?folderName=/UploadImages/BooKImages/",
secureuri: false,
fileElementId: fileId,
dataType: 'text',
success: function (data, status) {

if (data != "-1") {
$("#FILEPATH").val(data);
$("#ResultShow").html("上传成功!");
//$("#returnImg img").attr("src", data);
//$("#returnImg img").show();
$("#returnImg_show").attr("src", $("#FILEPATH").val());
//$("#returnImg_show").show();
//$("#regurnImg").html("<img id='returnImg_show'src='"+ data +"' alt='' style='display: none' />");
$("#returnImg").show();
}


else {
$("#ResultShow").html("上传失败!");
}

},
error: function (data, status, e) {
alert("发生错误!\n" + e);
},
extFields: {
user: 'guest',
comment: '好'
}
});

return false;
}

//验证图片后缀名
function checkType(val) {

//得到上传文件的值
var fileName = val;

//返回String对象中子字符串最后出现的位置.
var seat = fileName.lastIndexOf(".");

//返回位于String对象中指定位置的子字符串并转换为小写.
var extension = fileName.substring(seat).toLowerCase();

var allowed = [".jpg", ".gif", ".png", ".bmp", ".jpeg"];
for (var i = 0; i < allowed.length; i++) {
if (!(allowed[i] != extension)) {
return true;
}
}
alert("不支持" + extension + "格式");
return false;
}

javascript asp.net
[解决办法]
把上传到空间的删除了,如何把本地的所以文件设为everyone权限全部打钩,再上传试下。
[解决办法]
试下用本地IIS,网上数据库,看会有什么提示,

读书人网 >JavaScript

热点推荐