FCK上传图片问题解决

错误1The server didn't reply with a proper XML data. Please check your configuration

clip_image002

解决方案:

asp.net下的fckedito配置

用最简单的语言描述一下。其它配置和优化就不说了,只说怎么让它在asp.net环境下能用,能上传。

1、下载文件 http://www.fckeditor.net/download

这是目前最新的版本。 FCKeditor_2.6.5.zip fckeditor的页面文件 FCKeditor.Net_2.6.zip asp.net下的上传用的 dll控件和其源文件

2 解压FCKeditor_2.6.5.zip 到网站根目录下的 fckeditor中,解压FCKeditor.Net_2.6.zip 将其目录 FCKeditor.Net_2.6\bin\Release中的 FredCK.FCKeditorV2.dll 复制到 根目录的/bin/

3、打开/fckeditor/fckconfig.js 修改两行代码

var _FileBrowserLanguage = 'aspx' ;

var _QuickUploadLanguage = 'aspx' ;

把默认的asp语言改成aspx

错误2 :FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法

clip_image004

解决办法:

打开editor/filemanager/connectors/aspx/config.ascx修改CheckAuthentication()方法,返回true

C# code

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 true;
}

随便看了一下config.ascx里的内容,发现如果想让对每个用户进行不同的配置,FCKeditor支持的更好了。

你可能感兴趣的:(FCK)