您的位置:首页 > 编程语言 > ASP

asp.net fckeditor2.6 上传图片问题

2010-05-28 08:57 459 查看
在“上传图片”的时候,或者“浏览服务器”时出现,大概意思是禁止上传,还有查看服务器上的文件,出现如下提示:



出现上图错误是没有打开fckeditor的图片上传权限,找到文件config.ascx



就在文件config.ascx中,有如下一个方法。

private bool CheckAuthentication()
{
// WARNING : DO NOT simply return "true". By doing so, you are allowing
// "anyone" to upload and list the files in your server. You must implement
// some kind of session validation here. Even something very simple as...
//
// return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );
//
// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the
// user logs in your system.
return false;
}


这如果返回了false,就会出现上面的提示,也就不能上传文件或者图片。如果你不想限制,那么就直接返回true,当然不建议这么做,你至少得是登录用户才能有这种上传权限,当然这取决于具体情况,总之,你不能在这儿总是返回false。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: