The PolicyInjector has not been set for the PolicyInjection static class. Set it invoking the Policy
来源:互联网 发布:js判断视频播放结束 编辑:程序博客网 时间:2024/06/03 17:32
EnterPrise Library 6.0提示如下错误:
The PolicyInjector has not been set for the PolicyInjection static class. Set it invoking the PolicyInjection.SetPolicyInjector method..
是因为EnterPrise Library 6.0改动了模块的功能类不再自动从Unity创建了,也就是引导也不依赖Unity容器组件,需要先使用静态方法注册一下
例如:使用Logging Application block模块
IConfigurationSource configurationSource = ConfigurationSourceFactory.Create();
LogWriterFactory logWriterFactory = new LogWriterFactory(configurationSource);
Logger.SetLogWriter(logWriterFactory.Create());
使用Policy Injection Application block模块
PolicyInjector policyInjector = new PolicyInjector(configurationSource);PolicyInjection.SetPolicyInjector(policyInjector);
使用Exception Handling Injection Application block模块
参考博文:http://www.cnblogs.com/wintersun/archive/2013/05/10/3071246.htmlExceptionPolicyFactory exceptionPolicyFactory = new ExceptionPolicyFactory(configurationSource);
ExceptionPolicy.SetExceptionManager(exceptionPolicyFactory.CreateManager());
0 0
- The PolicyInjector has not been set for the PolicyInjection static class. Set it invoking the Policy
- Eclipse -- An API baseline has not been set for the current workspace
- “Location of the Android SDK has not been set up in the preferences”问题的解决
- Windows cannot set the password for because: The password does not meet the password policy requirements. Check the minimum pas
- error:The global default build tree(WINCEROOT) has not been set
- the system clock has been set more than 24 hours
- Msg 3159 The tail of the log for the database "" has not been backedup
- The Product License has not been initialized.
- The dialect was not set. Set the property hibernate.dialect
- The dialect was not set. Set the property hibernate.dialect
- Restore SQL Server 2005 error : "The tail of the log for the database "TEST1" has not been backed up."
- Could not open the editor: can not change undo manager once its been set
- The image set "" has an unassigned child.
- 处理rdlc “A data source instance has not been supplied for the data source”
- Registration has not been run for all of the FEAT directories
- Cannot complete the request. This installation has not been configured properly for softWare Updat
- the cfree installation has been damaged,please restall it(err3)
- could not set nil as the value for the key verifyStatus
- 串口调试好用的工具
- windows 下驱动NT和WDM 基本例子 (一)
- uva 839 - Not so Mobile
- centos下安装hadoop
- PyInstaller2的信息文件Version的生成
- The PolicyInjector has not been set for the PolicyInjection static class. Set it invoking the Policy
- leedcode:remove duplicates from sorted list
- Subsequence hdu3530
- js页面跳转常用的几种方式
- android系统自带下拉刷新控件的实现
- 陈力:传智播客古代 珍宝币 泡泡龙游戏开发第22讲:PHP语法、数据类型(整型、布尔型、浮点型、字符串型)
- linux的fork()函数详解 子进程复制父进程什么
- 软装商城——软装设计新模式
- Jfinal数据库操作在WebService或非web项目中的使用