企业库5.0——缓存使用说明(及初级错误解决)
2012-08-24 19:31
459 查看
---------------------------------------------------
问题1:未能加载文件或程序集“Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
原因:PublicKeyToken=31bf3856ad364e35时,DLL是有数字签名的,但如果引用自己生成的DLL就不匹配了,因为安装生成的DLL是签了名的。
解决:添加 Enterprise Library Caching Application Block 和 Enterprise Library Shared Library (如果企业库安装正确引用中会有企业库的引用)
如果没有看看这个位置:C:\Program Files\Microsoft Enterprise Library 5.0\Bin\
---------------------------------------------------
问题2:The current type, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, is an interface and cannot be constructed. Are you missing a type mapping?
原因:没有在 config 中配置缓存设置节点
解决:在开始菜单找到:开始\Microsoft patterns & practices\Enterprise Library 5.0\Enterprise Library Configuration\EntLib Config .NET 4
保存一个默认的配置就可以了,设置完后保存设置,之后找到保存的config 文件,将里面内容拷贝到应用程序 config 指定节点就可以了)!
问题1:未能加载文件或程序集“Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
原因:PublicKeyToken=31bf3856ad364e35时,DLL是有数字签名的,但如果引用自己生成的DLL就不匹配了,因为安装生成的DLL是签了名的。
解决:添加 Enterprise Library Caching Application Block 和 Enterprise Library Shared Library (如果企业库安装正确引用中会有企业库的引用)
如果没有看看这个位置:C:\Program Files\Microsoft Enterprise Library 5.0\Bin\
---------------------------------------------------
问题2:The current type, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, is an interface and cannot be constructed. Are you missing a type mapping?
原因:没有在 config 中配置缓存设置节点
解决:在开始菜单找到:开始\Microsoft patterns & practices\Enterprise Library 5.0\Enterprise Library Configuration\EntLib Config .NET 4
保存一个默认的配置就可以了,设置完后保存设置,之后找到保存的config 文件,将里面内容拷贝到应用程序 config 指定节点就可以了)!
相关文章推荐
- 企业库5.0——缓存使用说明(及初级错误解决)
- 微软企业库5.0系统(一):使用缓存 Microsoft.Practices.EnterpriseLibrary.Caching(初级篇)
- 微软企业库5.0 学习之路——第四步、使用缓存提高网站的性能(EntLib Caching)
- 微软企业库5.0 学习之路——第四步、使用缓存提高网站的性能(EntLib Caching)
- EventBus 3.0使用说明及NoClassDefFound错误解决
- [EntLib]微软企业库5.0 学习之路——第四步、使用缓存提高网站的性能(EntLib Caching)
- 微软企业库5.0系统(一):使用缓存 Microsoft.Practices.EnterpriseLibrary.Caching(高级篇)
- ajax缓存导致的一个错误,使用时间戳完美解决
- 缓存使用错误及解决
- Mac OS X 10.10.5 中 VirtualBox 5.0 里的 Win7 虚拟机无法使用 USB 3.0 设备的解决办法(补充说明)
- 微软企业库5.0 学习之路——第四步、使用缓存提高网站的性能(EntLib Caching)
- 在使用AndroidStudio打包apk时,遇到“xxx is not translated in xxx”错误的解决办法
- 解决Laravel5.1使用composer update时出现Call to undefined method getCachedCompilePath()错误
- 在项目中使用libcurl,解决编译链接错误
- [EntLib]微软企业库5.0 学习之路——第十步、使用Unity解耦你的系统—PART2——了解Unity的使用方法(1)【转载】
- postgresal使用错误解决 (记录篇)
- 高德地图 AMap3DMap_4.0导航功能 在5.0以上版本无法使用的解决方法
- 使用C#访问VBA,发布到IIS后出现以下错误,按此博文已解决问题
- "Microsoft OLE DB Provider for ODBC Drivers (0x80004005) 操作必须使用一个可更新的查询”错误的解决办法
- jQuery中ajax的使用与缓存问题的解决方法