fck文本编辑器在本地调试正常,服务器上无法使用带图!请问如何解决。。。

qwee5465 2014-10-01 10:59:51
服务器上的


本地的:

问过托管服务器技术,他们说我代码的问题。

弄了2天一直没有处理了,急死了。

这个FCk 之前在托管服务器上确定可以使用的,可是个人网站更新后就出现这样的问题了!

求助大侠们帮下如果能解决小弟感激不尽啊
...全文
170 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
qwee5465 2014-10-02
  • 打赏
  • 举报
回复
问题终于解决了,原来是伪静态和FCK 的问题!在网上翻找的一些资料! 为了SEO,伪静态现在很流行,其中一些朋友采用URLRewriter.dll + IIS设置 .html读取ASPX页 在使用FCKeditor的时候,可能会碰到以下这个问题,就是在编辑器页面出错,提示为:找不到页面/fckeditor/editor/fckeditor.aspx 那是因为正则中把fckeditor.html也替换成aspx的问题,而实际上并不存在后缀为ASPX的文件。针对这些错误,我采用了下面的方法:   第1步:在正则中优先替换FCK编辑器文件夹的路径,并替换为htm后缀。

 
<RewriterRule> 
<LookFor>~/fckeditor/(.*).html</LookFor> 
<SendTo>~/fckeditor/$1.htm</SendTo> 
</RewriterRule> 
<RewriterRule> 
<LookFor>(.*).html</LookFor> 
<SendTo>$1.aspx</SendTo> 
</RewriterRule> 

第2步:为防止出现“没有为扩展名".htm”注册的生成提供程序”的错误,在WEB.CONFIG中加入

 
<compilation debug="false"> 
<buildProviders> 
<add extension=".htm" type="System.Web.Compilation.PageBuildProvider" /> 
</buildProviders> 
</compilation> 

第3步:将fckeditro中所有的html后缀修改为htm,为避免FCK链接中的错误,再用DW将FCK内.html的代码批量替换为.htm 第3步我就只是将fckeditor.html 改成 fckeditor.htm
qwee5465 2014-10-01
  • 打赏
  • 举报
回复
像这种情况最有可能是什么原因导致的呢! 本地没有问题的,服务器上就出现这样的问题了!
qwee5465 2014-10-01
  • 打赏
  • 举报
回复
引用 3 楼 guwei4037 的回复:
/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default => ~/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
~ 我使用过了! 不是这里的问题!
  • 打赏
  • 举报
回复
引用 4 楼 qwee5465 的回复:
楼上想表达什么没理解
虽然解决方法可能是错的,但是他的出发点是对的。你不能理解,是因为你自己不动手分析研究。
  • 打赏
  • 举报
回复
引用 2 楼 qwee5465 的回复:
<div><input type="hidden" id="FCKeditor1" name="FCKeditor1" value="" /><input type="hidden" id="FCKeditor1___Config" value="HtmlEncodeOutput=true" /><iframe id="FCKeditor1___Frame" src="/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default" width="765px" height="400px" frameborder="no" scrolling="no"></iframe></div>
就这段 /fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default 这个路径是存在的 能找到fckeditor.html文件
不要随便说“这个路径是存在的 能找到fckeditor.html文件”。学会 http 通讯消息的调试方法吧。
qwee5465 2014-10-01
  • 打赏
  • 举报
回复
楼上想表达什么没理解
全栈极简 2014-10-01
  • 打赏
  • 举报
回复
/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default => ~/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
qwee5465 2014-10-01
  • 打赏
  • 举报
回复
<div><input type="hidden" id="FCKeditor1" name="FCKeditor1" value="" /><input type="hidden" id="FCKeditor1___Config" value="HtmlEncodeOutput=true" /><iframe id="FCKeditor1___Frame" src="/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default" width="765px" height="400px" frameborder="no" scrolling="no"></iframe></div>
就这段 /fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default 这个路径是存在的 能找到fckeditor.html文件
  • 打赏
  • 举报
回复
如果你不知道如何查看你自己代码的问题,那么就从调试入手。使用一个 http 调试器工具,看看出错的内嵌页面上被浏览器发送给服务器的 url 地址是什么?

111,094

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧