企业库引用导致Azure DevFabric崩溃

时间:2011-01-26 14:58:51

标签: azure enterprise-library

今天这个让我有点疯狂!

我有一个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,就好了!

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

帮助??

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

1 个答案:

答案 0 :(得分:2)

噢,现在我已经过了!

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

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

相关问题