ASP.NET中使用2.6.6版本的fckeditor上传文件出现“The server didn't send back a proper XML response……”,网上找了一大圈,有的说是权限问题,有的说是要下载什么解析XML的文件,都没有解决问题,最后自己摸索出来了解决办法:
找到fckeditor\editor\filemanager\connectors\aspx,修改如下:
要他return true,就OK了
出现的错误截图如下
解决办法:
找到fckeditor/fckconfig.js,修改如下
// The following value defines which File Browser connector and Quick Upload
// "uploader" to use. It is valid for the default implementaion and it is here
// just to make this configuration file cleaner.
// It is not possible to change this value using an external file or even
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
//2011.8.3 修改为aspx
var _FileBrowserLanguage = 'aspx'; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx'; // asp | aspx | cfm | lasso | perl | php | py
找到fckeditor\editor\filemanager\connectors\aspx,修改如下:
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;
}
要他return true,就OK了