【问题标题】:Troubleshooting .NET Binding Redirects in Publisher Policy Files发布者策略文件中的 .NET 绑定重定向疑难解答
【发布时间】:2017-12-04 18:44:12
【问题描述】:

如何准确排除来自发布者政策文件程序集绑定重定向的问题? (Fusion 告诉我它不是,但不是 WHY)

背景

  • Microsoft SharePoint 在版本之间广泛使用 assembly binding redirects,例如v12.0 (SharePoint 2007) > v14.0 (2010)
  • 突然在一台特定的服务器上,它停止工作。 (通常的 Windows 更新,但其他服务器也是如此,我认为没有其他注意事项的变化)。仍在使用据称相同的机器。

挖掘出Fusion Log Viewer 显示了它的工作原理(为简洁起见减少了)

*** Assembly Binder Log Entry ***
...
The operation was successful.
...
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Publisher policy file is found at C:\WINDOWS\assembly\GAC_MSIL\Policy.12.0.Microsoft.SharePoint\14.0.0.0__71e9bce111e9429c\Policy.12.0.Microsoft.SharePoint.config.
LOG: Publisher policy file redirect is found: 12.0.0.0 redirected to 14.0.0.0.
LOG: Post-policy reference: Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL

在不工作的服务器上

*** Assembly Binder Log Entry ***
...
The operation failed.
...
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
LOG: GAC Lookup was unsuccessful.

两台服务器在 GAC 中都有策略文件,如 gacutil -l 所示

Policy.12.0.Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL

【问题讨论】:

    标签: .net gac fusion assembly-binding-redirect


    【解决方案1】:

    没有回答“如何排除故障 [比 Fusion 提供给您的信息更深入]”的问题,但这是我为解决这个特定问题所做的。

    找到了发布者策略文件程序集的副本
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\Policy\Policy.12.0.Microsoft.SharePoint.dll
    

    将其从 GAC 中删除

    gacutil /u Policy.12.0.Microsoft.SharePoint
    

    重新安装

    gacutil /i Policy.12.0.Microsoft.SharePoint
    

    立即生效。

    虽然不知道是什么一开始就破坏了它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-23
      • 2017-09-09
      • 2020-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多