使用enterprise library部属中出现的问题 |
在公司的最近的一个项目中使用了enterprise library做开发,结果在部属时出现 异常详细信息: System.Security.SecurityException: 不允许所请求的注册表访问权。
google的结果 使用EnterpriseLibrary的应用程序在某些机器上使用,会出现异常错误,提示信息如下: 安全性异常 在Enterprise Library的FAQs中可以找到答案,有三种解决办法: 使用方法3,结果ok。 ===============================================================================
也可以使用
@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 保存为aa.bat放到应用程序目录中,然后运行
或修改注册表
增加
Enterprise Library Data Service
Enterprise Library Instrumentation Enterprise Library Logging EventMessageFile
C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/EventLogMessages.dll |