【问题标题】:Enterprise Library reference causing Azure DevFabric crash导致 Azure DevFabric 崩溃的企业库参考
【发布时间】:2011-01-26 14:58:50
【问题描述】:

今天这个让我有点发疯!

我有一个正在加强的 Azure 应用程序。今天的练习是使用 Enterprise Library 5.0 的异常处理应用程序块来实现异常处理。

但是,我发现当我添加对 Microsoft.Practives.EnterpriseLibrary.ExceptionHandling 的引用时,我的 Web 角色(MVC 2 UI)在 wawebhost.exe 中崩溃。

我可以添加对ExceptionHandling所依赖的程序集的引用,即

  • Microsoft.Practices.EnterpriseLibrary.Common
  • Microsoft.Practices.ServiceLocation
  • Microsoft.Practices.Unity(我已经 已成功使用)
  • Microsoft.Practices.Unity.Interception

我可以添加对 Logging Application Block 的引用,就好了。

但只要我添加对讨厌的异常处理应用程序块的引用并按 F5,BANG!

Microsoft Windows Azure Web Host has stopped working
Problem Event Name: APPCRASH
Application Name: WaWebHost.exe
Fault Module Name: KERNELBASE.dll

帮忙??

[更新] 我也已经通过并尝试了所有其他应用程序块。添加对 Cryptography 应用程序块的引用会产生相同的结果,但所有其他似乎都很好......

【问题讨论】:

  • 没错。您可能还想查看此guide 在 Azure 中使用企业库。

标签: azure enterprise-library


【解决方案1】:

哦,我现在生气了!

事实证明,Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll 的完全限定路径超过 260 个字符,但 Microsoft.Practices.EnterpriseLibrary.Logging.dll 的路径却不是。与 Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll 类似。

通过将有意义的项目名称更改为“UI”来“解决”问题!

【讨论】:

    猜你喜欢
    • 2022-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-23
    • 2020-12-02
    相关资源
    最近更新 更多