FCKeditor中的XML request error (500)错误,并不仅仅是在没有目录的写权限时出现这种错误
一天,打开网站的后台,发表一个文章,上传图片时出现XML request error (500)错误,查了一个资料,都说是因为没有目录的写权限。可我怎么不配置权限也不行。我查看了一个FCKeditor控件原代码,在FileWorkerBase.cs文件中有以下一段
protected string UserFilesPath
{
get
{
if ( sUserFilesPath == null )
{
// Try to get from the "Application".
sUserFilesPath = (string)Application["FCKeditor:UserFilesPath"] ;
//// Try to get from the "Session".
//if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
//{
// sUserFilesPath = (string)Session["FCKeditor:UserFilesPath"] ;
// Try to get from the Web.config file.
if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
{
sUserFilesPath = System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"] ;
// Otherwise use the default value.
if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
sUserFilesPath = DEFAULT_USER_FILES_PATH ;
// Try to get from the URL.
if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
{
sUserFilesPath = Request.QueryString["ServerPath"] ;
}
//}
}
// Check that the user path ends with slash ("/")
if ( ! sUserFilesPath.EndsWith("/") )
sUserFilesPath += "/" ;
}
return sUserFilesPath ;
}
}
我把这一段注释掉后重新编译,就不出错了{
get
{
if ( sUserFilesPath == null )
{
// Try to get from the "Application".
sUserFilesPath = (string)Application["FCKeditor:UserFilesPath"] ;
//// Try to get from the "Session".
//if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
//{
// sUserFilesPath = (string)Session["FCKeditor:UserFilesPath"] ;
// Try to get from the Web.config file.
if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
{
sUserFilesPath = System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"] ;
// Otherwise use the default value.
if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
sUserFilesPath = DEFAULT_USER_FILES_PATH ;
// Try to get from the URL.
if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
{
sUserFilesPath = Request.QueryString["ServerPath"] ;
}
//}
}
// Check that the user path ends with slash ("/")
if ( ! sUserFilesPath.EndsWith("/") )
sUserFilesPath += "/" ;
}
return sUserFilesPath ;
}
}
//if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
//{
// sUserFilesPath = (string)Session["FCKeditor:UserFilesPath"] ;