FCKeditor关于图片上传出现错误“ 提示没有权限 Type=Image” 以及出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/conf
2010-12-15 11:50
1041 查看
在使用FCkeditor上传图片时出现了一些很麻烦的问题,通过在网上搜索实践,最终都解决了。
问题一:提示没有权限 Type=Image
我遇到的情况是在本地上传图片,以及在内部的测试服务器上传图片时都没有问题,但是发布到外网服务器时却出现了问题。
上传图片后页面左下脚出现脚本错误提示,点开可看到是“没有权限”的提示,并且上传窗口一直冻结在进度条状态,提示js错误。
在网上找到的解决方案:
.net项目
在源文件中找到FileBrowser/FileWorkerBase.cs文件,找到其中的方法
protected void SendFileUploadResponse( int errorNumber, bool isQuickUpload, string fileUrl, string fileName, string customMsg )
将代码中
Response.Write( @"(function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();" );
里面的try{document.domain=d;}catch (e){break;} 删除,然后重新编译,生成新dll。debug文件中将dll粘帖出来,添加到自己的项目中,即可。
经测试问题解决了。
问题二 :上传图片后适中处于
下图的状态
用firbug检查网络里的信息,最后一天调用editor/filemanager/connectors/aspx/connector.aspx页面的信息里有错误,
更改网站的配置文件添加节点<customError mode="off"></customError>后就可以看到错误的原因,
错误的提示下图
相应的解决方案:
解决方案一:
在fckeditor根目录中加个网站配置文件web.config,设置
<system.web>
<pages theme="" />
</system.web>
测试后正常了
解决方案二:
因为ASP.NET2.0新增了Theme功能,所以如果在你的工程中你对Web.config使用到了styleSheetTheme或theme的话那就要再多修改一下。
还是到FCKeditor所在的目录,分别打开/editor/filemanager/upload/aspx/upload.aspx和/editor/filemanager/browser/default/connectors/aspx/connector.aspx两个aspx文件,在page标签中添加Theme=""或StyleSheetTheme=""看你在工程使用的是什么就修改什么。修改后如下:我在项目中用的是Page.Theme=某个自己定的主题值,在FCKeditor中应该使主题为空,即不应用主题
<%@ Page language="c#" Inherits="FredCK.FCKeditorV2.Uploader" AutoEventWireup="false" Theme="" %>
或
<%@ Page language="c#" Inherits="FredCK.FCKeditorV2.Uploader" AutoEventWireup="false" Theme="" %>
此方案 摘自http://blog.sina.com.cn/s/blog_59f49a5f0100bgqk.html我没有做测试。
问题一:提示没有权限 Type=Image
我遇到的情况是在本地上传图片,以及在内部的测试服务器上传图片时都没有问题,但是发布到外网服务器时却出现了问题。
上传图片后页面左下脚出现脚本错误提示,点开可看到是“没有权限”的提示,并且上传窗口一直冻结在进度条状态,提示js错误。
在网上找到的解决方案:
.net项目
在源文件中找到FileBrowser/FileWorkerBase.cs文件,找到其中的方法
protected void SendFileUploadResponse( int errorNumber, bool isQuickUpload, string fileUrl, string fileName, string customMsg )
将代码中
Response.Write( @"(function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();" );
里面的try{document.domain=d;}catch (e){break;} 删除,然后重新编译,生成新dll。debug文件中将dll粘帖出来,添加到自己的项目中,即可。
经测试问题解决了。
问题二 :上传图片后适中处于
下图的状态
用firbug检查网络里的信息,最后一天调用editor/filemanager/connectors/aspx/connector.aspx页面的信息里有错误,
更改网站的配置文件添加节点<customError mode="off"></customError>后就可以看到错误的原因,
错误的提示下图
相应的解决方案:
解决方案一:
在fckeditor根目录中加个网站配置文件web.config,设置
<system.web>
<pages theme="" />
</system.web>
测试后正常了
解决方案二:
因为ASP.NET2.0新增了Theme功能,所以如果在你的工程中你对Web.config使用到了styleSheetTheme或theme的话那就要再多修改一下。
还是到FCKeditor所在的目录,分别打开/editor/filemanager/upload/aspx/upload.aspx和/editor/filemanager/browser/default/connectors/aspx/connector.aspx两个aspx文件,在page标签中添加Theme=""或StyleSheetTheme=""看你在工程使用的是什么就修改什么。修改后如下:我在项目中用的是Page.Theme=某个自己定的主题值,在FCKeditor中应该使主题为空,即不应用主题
<%@ Page language="c#" Inherits="FredCK.FCKeditorV2.Uploader" AutoEventWireup="false" Theme="" %>
或
<%@ Page language="c#" Inherits="FredCK.FCKeditorV2.Uploader" AutoEventWireup="false" Theme="" %>
此方案 摘自http://blog.sina.com.cn/s/blog_59f49a5f0100bgqk.html我没有做测试。
相关文章推荐
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法
- FCKeditor(2.6)出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"
- asp.net中使用fckeditor时,提示“this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx”解决办法
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法【转】
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法
- FCKeditor(2.6)出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/conf
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/asp
- This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file.
- This connector is disabled Please check the"editor/filemanager/connectors/php/confi
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法
- FCKeditor出现"this connector is disabled Please check 的解决方法
- aspx fckeditor上传时 提示没有权限 Type=Image
- FCKeditor出现"this connector is disabled Please check 的解决方法
- 使用GreenDao 报"This check is to prevent accidental file generation into a wrong path."错误
- Ubuntu更新出现"The system is running in low-graphics mode"错误提示的解决办法
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- 关于"HTTP method GET is not supported by this URL"的错误
- 打开sln文件出现the selected file is not a valid visual studio solution file错误提示解决办法