使用FCKeditor_2.6.3版本有关上传图片问题解决
问题:提示This connector is disabled
问题:FCKEditor 图片上传一直显示进度条的问题
解决:
很多博主介绍配置FCKeditor的目录时都是这样写的,我不知道是不是大家互相复制的关系
<appSettings>
<add key="FCKeditor:BasePath" value="~/FCKeditor/"/> <!--FCKeditor基本文件目录--> <add key="FCKeditor:UserFilesPath" value="/UserFiles/"/> <!--文件上传目录--> </appSettings>大家看一下上面两个配置有什么区别没有,"~/FCKeditor/"比"/UserFiles/"前面多了符号“~”。
在“/UserFiles/”前面加上“~”符号就可以了。
这个错误还会导致下面的问题:在单击浏览服务器按钮是提示:未能映射路径“/Files/image/”,具体提示如下:
==========================================================================================
--------------------------- Microsoft Internet Explorer --------------------------- The server didn't send back a proper XML response. Please contact your system administrator.
XML request error: Internal Server Error (500)
Requested URL:
Response text: <html>
<head>
<title>未能映射路径“/UserFiles/image/”。</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>
<body bgcolor="white">
<span><H1>“/FCKeditorTest”应用程序中的服务器错误。<hr width=100% size=1 color=silver></H1>
<h2> <i>未能映射路径“/UserFiles/image/”。</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> 说明: </b>执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
<br><br>
<b> 异常详细信息: </b>System.InvalidOperationException: 未能映射路径“/UserFiles/image/”。<br><br>
<b>源错误:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。</code>
</td>
</tr>
</table>
<br>
<b>堆栈跟踪:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[InvalidOperationException: 未能映射路径“/UserFiles/image/”。]
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +615
System.Web.VirtualPath.MapPathInternal() +29
System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +125
System.Web.HttpServerUtility.MapPath(String path) +58
FredCK.FCKeditorV2.FileBrowser.TypeConfig.GetFilesDirectory() +63
FredCK.FCKeditorV2.FileBrowser.FileWorkerBase.ServerMapFolder(String resourceType, String folderPath, Boolean isQuickUpload) +37
FredCK.FCKeditorV2.FileBrowser.Connector.GetFolders(XmlNode connectorNode, String resourceType, String currentFolder) +21
FredCK.FCKeditorV2.FileBrowser.Connector.OnLoad(EventArgs e) +708
System.Web.UI.Control.LoadRecursive() +49
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3743
</pre></code>
</td>
</tr>
</table>
<br>
<hr width=100% size=1 color=silver>
<b>版本信息:</b> Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.42
</font>
</body>
</html>
<!--
[InvalidOperationException]: 未能映射路径“/UserFiles/image/”。
在 System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
在 System.Web.VirtualPath.MapPathInternal()
在 System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping)
在 System.Web.HttpServerUtility.MapPath(String path)
在 FredCK.FCKeditorV2.FileBrowser.TypeConfig.GetFilesDirectory()
在 FredCK.FCKeditorV2.FileBrowser.FileWorkerBase.ServerMapFolder(String resourceType, String folderPath, Boolean isQuickUpload)
在 FredCK.FCKeditorV2.FileBrowser.Connector.GetFolders(XmlNode connectorNode, String resourceType, String currentFolder)
在 FredCK.FCKeditorV2.FileBrowser.Connector.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: 引发类型为“System.Web.HttpUnhandledException”的异常。
在 System.Web.UI.Page.HandleError(Exception e)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest()
在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
在 System.Web.UI.Page.ProcessRequest(HttpContext context)
在 ASP.fckeditor_editor_filemanager_connectors_aspx_connector_aspx.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--> --------------------------- 确定 ---------------------------
============================================================================================================
以上问题都是根据测试推断出的,我并不知道源码是怎么处理的,希望高手能给予指点。
相关链接: