• 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.NETFrameworkv1.1.4322 目录下的InstallUtil.exe 工具来安装这些服务,模仿InstallService.bat的内容,写如下的批处理就可以完成服务注册了。
    @SET InstallUtilPath=%windir%Microsoft.NETFrameworkv1.1.4322InstallUtil.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

  • 相关阅读:
    STS 创建 Maven 项目填坑
    JeeSite | 访问控制权限
    《Spring + MyBatis 企业应用实战》书评
    MyBatis-Generator 用法介绍
    Java描述数据结构之链表的增删改查
    Java中的Object类的几个方法
    设计模式之策略模式(Strategy Pattern)
    设计模式之模板方法(Template Method)
    JeeSite | 数据分页与翻页
    day 19
  • 原文地址:https://www.cnblogs.com/sczw-maqing/p/3374683.html
Copyright © 2020-2023  润新知