EnterpriseLibraryJune2005 的问题
2005-11-06 14:53
417 查看
EnterpriseLibraryJune2005.exe 成功安装后,但在其它项目引用后,出现错误,信息如下:
“Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent”的类型初始值设定项引发异常,请各位高手提点意见
.
-----------------------------------------------------------------------------------------------------------------------------
有趣的问题,刚查了查,两解决办法:
一是打安装服务补丁,于如下地址下载补丁:
http://www.softitechture.com/discussions/index.html#InstallServices
二是修改注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application 下的RestrictGuestAccess值由1改为0,然后重启。
----------------------------------------------------------------------------
I was able to resolve this by following Craig's advice regarding the registry
setting for guest access to the event log:
In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
there is a DWORD value called RestrictGuestAccess, change from 1 to 0, then REBOOT.
Also, I ran the InstallServices batch file in the \bin directory of my ASP.NET app. You can download a copy of the batch file that doesn't look for Visual Studio on your server machine here:
http://www.softitechture.com/discussions/index.html#InstallServices
Also, if you read the FAQ you can recompile to disable instrumentation:
"Open up the EnterpriseLibrary.sln and modify the Configuration Properties\Build\Conditional Constants of the EnterpriseLibrary.Common project. Remove the USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER constants. By removing these constants, all of the internal Enterprise Library instrumentation will be disabled. Recompile."
----------------------------------------------------------------------------
Drew - did you run the Install Services script or installutil over the EntLib assemblies? Also WMI is very particular about where the assemblies are located, so you'll need to run the script over the exact assemblies that your app is loading.
The stuff in InstallServices.bat that points to VS2003 is basically there to find
the location of installutil.exe. However installutil can also be found in other locations, such as C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322.
On a production machine without VS2003, rather than run InstallServices.bat it is probably safer to run Installutil.exe directly over the EntLib assemblies, eg:
installutil Microsoft.Practices.EnterpriseLibrary.Common.dll
installutil Microsoft.Practices.EnterpriseLibrary.Configuration.dll
... and so on over whatever assemblies your application is using.
---------------------------------------------------------------------------------------------------------------------------
上面还提到,如果打补丁后出现
"Open up the EnterpriseLibrary.sln and modify the Configuration Properties\Build\Conditional Constants of the EnterpriseLibrary.Common project. Remove the USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER constants. By removing these constants, all of the internal Enterprise Library instrumentation will be disabled. Recompile."
错误,重新编译一下即可。
“Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataCommandFailedEvent”的类型初始值设定项引发异常,请各位高手提点意见
.
-----------------------------------------------------------------------------------------------------------------------------
有趣的问题,刚查了查,两解决办法:
一是打安装服务补丁,于如下地址下载补丁:
http://www.softitechture.com/discussions/index.html#InstallServices
二是修改注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application 下的RestrictGuestAccess值由1改为0,然后重启。
----------------------------------------------------------------------------
I was able to resolve this by following Craig's advice regarding the registry
setting for guest access to the event log:
In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
there is a DWORD value called RestrictGuestAccess, change from 1 to 0, then REBOOT.
Also, I ran the InstallServices batch file in the \bin directory of my ASP.NET app. You can download a copy of the batch file that doesn't look for Visual Studio on your server machine here:
http://www.softitechture.com/discussions/index.html#InstallServices
Also, if you read the FAQ you can recompile to disable instrumentation:
"Open up the EnterpriseLibrary.sln and modify the Configuration Properties\Build\Conditional Constants of the EnterpriseLibrary.Common project. Remove the USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER constants. By removing these constants, all of the internal Enterprise Library instrumentation will be disabled. Recompile."
----------------------------------------------------------------------------
Drew - did you run the Install Services script or installutil over the EntLib assemblies? Also WMI is very particular about where the assemblies are located, so you'll need to run the script over the exact assemblies that your app is loading.
The stuff in InstallServices.bat that points to VS2003 is basically there to find
the location of installutil.exe. However installutil can also be found in other locations, such as C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322.
On a production machine without VS2003, rather than run InstallServices.bat it is probably safer to run Installutil.exe directly over the EntLib assemblies, eg:
installutil Microsoft.Practices.EnterpriseLibrary.Common.dll
installutil Microsoft.Practices.EnterpriseLibrary.Configuration.dll
... and so on over whatever assemblies your application is using.
---------------------------------------------------------------------------------------------------------------------------
上面还提到,如果打补丁后出现
"Open up the EnterpriseLibrary.sln and modify the Configuration Properties\Build\Conditional Constants of the EnterpriseLibrary.Common project. Remove the USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER constants. By removing these constants, all of the internal Enterprise Library instrumentation will be disabled. Recompile."
错误,重新编译一下即可。
相关文章推荐
- 疑是Microsoft Enterprise Library June 2005的一个小bug (续)
- Microsoft Enterprise Library June 2005--Data Access Application Block访问Oracle数据库(1)
- 即将推出的 Enterprise Library June 2005 ('1.1'版)
- 疑是Microsoft Enterprise Library June 2005的一个小bug
- How to make Microsoft Enterprise Library June 2005 June release work with VS2005 beta 2?
- 由Microsoft.Practices.EnterpriseLibrary.Data.SqlCe出现问题引起的思考
- Enterprise Library Logging App Block的时区问题
- Microsoft.Practices.EnterpriseLibrary for .Net2.0使用中的问题(相关问题持续更新)
- Enterprise Library Logging App Block的时区问题
- Enterprise Library Logging App Block的时区问题
- Enterprise Library Logging存在延时问题
- Enterprise Core Objects 注册的问题
- 瑞星2005升级问题汇总
- SQL Server 2005数据库重装后将原数据库直接附加新数据库实例时遇到的所有权问题
- SQL Server 2000导入SQL Server 2005生成脚本的问题
- Castle IOC容器实践之EnterpriseLibrary Configuration Facility
- Enterprise Library3.1 使用数据访问模块时,调用Microsoft.Practices.EnterpriseLibrary.Data报出源文件与当前应用程序不一致和创建dataconfiguration的配置节处理程序出错
- VS 2005做Filter时碰到的一系列问题
- jsoncpp在vs2013下的安装以及静态连接错误error LNK2005问题
- Sql Server 2005出现尚未备份日志尾部的问题