ASP.NET中使用fckeditor上传文件出现“The server didn't send back a proper XML response……”

ASP.NET中使用2.6.6版本的fckeditor上传文件出现“The server didn't send back a proper XML response……”,网上找了一大圈,有的说是权限问题,有的说是要下载什么解析XML的文件,都没有解决问题,最后自己摸索出来了解决办法:

出现的错误截图如下

解决办法:

找到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了

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值