CSS 友好适配器停止工作

发布于 2024-10-29 16:06:26 字数 2160 浏览 0 评论 0原文

我在一个成功运行了几年的网站上使用了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人迟暮 2024-11-05 16:06:26

我在另一篇文章中找到了解决方案:

“...简单的修复方法是从网站的 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文