CSS 友好适配器停止工作
我在一个成功运行了几年的网站上使用了 Css 友好适配器,在进行一些更改后,适配器默默地失败了 - 但仅在服务器上。在我的本地副本上,它仍然工作正常。在服务器上,我的树视图 html 呈现为一堆表格,而不是像以前那样呈现无序列表。我不厌其烦地在 Css 友好适配器的源代码中插入一些错误日志,据我所知,CSSFriendly.dll 根本没有被调用,但如果我删除该 dll,应用程序不会编译。
我的 CSSFriendlyAdapters.browser 文件如下:
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu"
adapterType="CSSFriendly.MenuAdapter" />
<adapter controlType="System.Web.UI.WebControls.TreeView"
adapterType="CSSFriendly.TreeViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.DetailsView"
adapterType="CSSFriendly.DetailsViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.FormView"
adapterType="CSSFriendly.FormViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.DataList"
adapterType="CSSFriendly.DataListAdapter" />
<adapter controlType="System.Web.UI.WebControls.GridView"
adapterType="CSSFriendly.GridViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.Wizard"
adapterType="CSSFriendly.WizardAdapter" />
</controlAdapters>
</browser>
<browser id="W3C_Validator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>
<capabilities>
<capability name="browser" value="W3C Validator" />
<capability name="ecmaScriptVersion" value="1.2" />
<capability name="javascript" value="true" />
<capability name="supportsCss" value="true" />
<capability name="supportsCallback" value="true" />
<capability name="tables" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
<capability name="w3cdomversion" value="1.0" />
</capabilities>
</browser>
</browsers>
有人对可能导致此问题的原因有任何想法吗?我不知所措。谢谢。
I used the Css Friendly Adapters on a site that ran for a few years successfully and after making some changes, the adapters silently fail - but only on the server. On my local copy, it still works fine. On the server, my treeview html renders as a mess of tables instead of an unordered list like it used to. I've gone to the trouble of inserting some error logging into the source code for the Css Friendly Adapters and as far as I can tell the CSSFriendly.dll isn't being called upon at all, yet if I remove the dll, the application won't compile.
My CSSFriendlyAdapters.browser file is as follows:
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu"
adapterType="CSSFriendly.MenuAdapter" />
<adapter controlType="System.Web.UI.WebControls.TreeView"
adapterType="CSSFriendly.TreeViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.DetailsView"
adapterType="CSSFriendly.DetailsViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.FormView"
adapterType="CSSFriendly.FormViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.DataList"
adapterType="CSSFriendly.DataListAdapter" />
<adapter controlType="System.Web.UI.WebControls.GridView"
adapterType="CSSFriendly.GridViewAdapter" />
<adapter controlType="System.Web.UI.WebControls.Wizard"
adapterType="CSSFriendly.WizardAdapter" />
</controlAdapters>
</browser>
<browser id="W3C_Validator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>
<capabilities>
<capability name="browser" value="W3C Validator" />
<capability name="ecmaScriptVersion" value="1.2" />
<capability name="javascript" value="true" />
<capability name="supportsCss" value="true" />
<capability name="supportsCallback" value="true" />
<capability name="tables" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
<capability name="w3cdomversion" value="1.0" />
</capabilities>
</browser>
</browsers>
Does anybody have any thoughts on what could be causing this problem? I'm at a loss. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在另一篇文章中找到了解决方案:
“...简单的修复方法是从网站的 BIN 目录中删除 __browserCapabilityCompiler.compiled 文件。”
请参阅这篇文章:
I found the solution in another post:
"...the simple fix is to delete the __browserCapabilitiesCompiler.compiled file from the BIN directory of the website."
See this article: http://conficient.wordpress.com/2010/05/11/fix-for-precompiled-websites-from-vs2010-on-net-3-5-for-cssfriendly-adapters/