Enterprise Library 服务问题
在使用Enterprise Library而没有注册服务的时候会出现这样的问题,"Editing Post "Failed to create instances of performance counter 'Cache Total Turnover Rate' - 请求的性能计数器不是自定义计数器,它必须初始化为只读。"而在有装VS.NET和Enterprise Library的机器上可以调用Bin目录下的InstallService.bat注册服务。而在没有装VS.net的机器则无法执行。可以利用%windir%\Microsoft.NET\Framework\v1.1.4322 目录下的InstallUtil.exe 工具来安装这些服务,模仿InstallService.bat的内容,写如下的批处理就可以完成服务注册了。
@SET InstallUtilPath=%windir%\Microsoft.NET\Framework\v1.1.4322\InstallUtil.exe
@ECHO.
@ECHO -----------------------------------------------------------------
@ECHO Installing Services for the Caching Application Block
@ECHO -----------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.Caching.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.Caching.dll
@ECHO.
@ECHO -----------------------------------------------------------------
@ECHO Installing Services for the ConfigurationApplication Block
@ECHO -----------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.Configuration.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.Configuration.dll
@ECHO.
@ECHO -----------------------------------------------------------------
@ECHO Installing Services for the Cryptography Application Block
@ECHO -----------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll
@ECHO.
@ECHO -----------------------------------------------------------------
@ECHO Installing Services for the Data Access Application Block
@ECHO -----------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.Data.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.Data.dll
@ECHO.
@ECHO -----------------------------------------------------------------------
@ECHO Installing Services for the Exception Handling Application Block
@ECHO -----------------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
@ECHO.
@ECHO ---------------------------------------------------------------------------------
@ECHO Installing Services for the Logging and Instrumentation Application Block
@ECHO ---------------------------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.Logging.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.Logging.dll
@ECHO.
@ECHO -----------------------------------------------------------------
@ECHO Installing Services for the Security Application Block
@ECHO -----------------------------------------------------------------
@ECHO.
if Exist Microsoft.Practices.EnterpriseLibrary.Security.dll @%InstallUtilPath% Microsoft.Practices.EnterpriseLibrary.Security.dll
@ECHO.
@ECHO ----------------------------------------
@ECHO InstallServices.bat Completed
@ECHO ----------------------------------------
@ECHO.
@PAUSE
阿不 http://hjf1223.cnblogs.com
Enterprise Library 服务问题的更多相关文章
- 在数据库访问项目中使用微软企业库Enterprise Library,实现多种数据库的支持
在我们开发很多项目中,数据访问都是必不可少的,有的需要访问Oracle.SQLServer.Mysql这些常规的数据库,也有可能访问SQLite.Access,或者一些我们可能不常用的PostgreS ...
- 国产达梦数据库的结合Enterprise Library的应用开发
在上篇<基于Enterprise Library的Winform开发框架实现支持国产达梦数据库的扩展操作>介绍了如何在Enterprise Library的数据访问层上支持这种神秘的国产数 ...
- 转:Enterprise Library 4.0缓存应用程序块
英文原文:http://msdn.microsoft.com/zh-cn/library/cc511588(en-us).aspx Enterprise Library 缓存应用程序块允许开发人员在应 ...
- Enterprise Library 4 数据访问应用程序块
Enterprise Library 数据访问应用程序块简化了实现常规数据访问功能的开发任务.应用程序可以在各种场景中使用此应用程序块,例如为显示而读取数据.传递数据穿过应用程序层( applicat ...
- 黄聪:Microsoft Enterprise Library 5.0 系列教程(七) Exception Handling Application Block
原文:黄聪:Microsoft Enterprise Library 5.0 系列教程(七) Exception Handling Application Block 使用企业库异常处理应用程序模块的 ...
- 黄聪:Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception
原文:黄聪:Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception 依赖注入容器Uni ...
- 微软企业库5.0 学习之路——扩展学习篇、库中的依赖关系注入(重构 Microsoft Enterprise Library)[转]
这篇文章是我在patterns & practices看到的一篇有关EntLib5.0的文章,主要介绍了EntLib5.0的这次的架构变化由来,觉得很不错,大家可以看一下! 在过去几年中,依赖 ...
- 微软Enterprise Library 4.1和Unity 1.2
说明 微软模式与实践团队今天发布了Enterprise Library 4.1和Unity 1.2版本,这次发布的主要新特性如下: 1. 支持Visual Studio 2008 SP1 2. Uni ...
- Microsoft Enterprise Library 5.0 系列(三)
一.简介及用途 在实际的项目开发中,我们总会需要对数据进行验证,以保证数据的可靠性,而为了使这些验证可以在不同的地方进行复用(如winform.web.WPF等),就需要将验证进行封装,EntLib的 ...
随机推荐
- bzoj1797: [Ahoi2009]Mincut 最小割
最大流+tarjan.然后因为原来那样写如果图不连通的话就会出错,WA了很久. jcvb: 在残余网络上跑tarjan求出所有SCC,记id[u]为点u所在SCC的编号.显然有id[s]!=id[t] ...
- CentOS6.6安装mysql出现的问题
mysql编译需要cmake,我的cmake-2.6.4-5.el6.i686,最新版的是3.1.0,我就先用2.6.4的试试 [root@localhost src]# wget http:// ...
- UVA 1001 Say Cheese 奶酪里的老鼠(最短路,floyd)
题意:一只母老鼠想要找到她的公老鼠玩具(cqww?),而玩具就丢在一个广阔的3维空间(其实可以想象成平面)上某个点,而母老鼠在另一个点,她可以直接走到达玩具的位置,但是耗时是所走过的欧几里得距离*10 ...
- Control File (二)重建CONTROLFILE --- NORESETLOG
create controlfile --- noresetlog 由于丢失control01.ctl alter_karl.log 中显示: -------------------------- ...
- plsql developer 使用技巧
plsql developer 使用技巧 Oracle数据库相信已成为很多企业构建自身关键业务的重要后台支撑,也是众多开发人员常常采用的后台.但Oracle自己提供的一套客户端工具不是很好用,极大的影 ...
- 【Ajax】实现注册页面判断用户名是否可用的提示—异步加载
效果如图 在注册或登录网站时,当我们输入错误格式的账号或信息时,会看到这种提示. 那怎么实现呢,通过ajax异步加载的方式,可以实现不刷新页面就显示出该提示. 实现 首先创建一个JSP,写一个简单的页 ...
- oracle归档日志增长过快处理方法
oracle归档日志一般由dml语句产生,所以增加太快应该是dml太频繁 首先查询以下每天的归档产生的情况: SELECT TRUNC(FIRST_TIME) "TIME", SU ...
- db file scattered read 等待事件
db file scattered read 等待事件: 我们经常会见到db file scattered read 等待事件,在生产环境中,这个等待事件可能更为常见.这个事件表明用户进程正在读数据 ...
- 转载:Hadoop权威指南学习笔记
转自:http://pieux.github.io/blog/2013-05-08-learn-hadoop-the-definitive-guide.html 1 前言 Hadoop的内部工作机制: ...
- alibaba笔试
1.D A(7,7)/(A(3,3)A(2,2)) = 420 关联: 字符串的排列和组合:http://blog.csdn.net/hackbuteer1/article/details/7462 ...