Windows 7 支持 Enterprise Library 4.1 吗?
我试图使用 Enterprise Library 4.1 在本地运行应用程序并记录到事件查看器。我在支持的操作系统下没有看到Windows 7。有谁知道解决方法或者这根本不起作用?还有人知道 Windows 7 上是否可以使用任何其他日志记录(例如通过企业库的电子邮件或数据库)?
提前致谢。
I was trying to run an application locally with Enterprise Library 4.1 and do logging to the event viewer. I didn't see Windows 7 under the supported operating systems. Does anyone know of a workaround or if this will not work at all? Also does anyone know if any other logging such as email or DB through Enterprise Library is available on Windows 7?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,企业库应该作为 .NET 框架的一部分而不是操作系统的一部分正常工作。您的问题归结为权限问题。
您需要管理员权限才能在事件日志中“创建”新源。您可以创建一个控制台应用程序来执行此操作(在提升的权限下运行它)或直接在注册表中进行设置。
一旦设置了源,您应该能够写出日志。
PS - 您可以使用企业日志记录块中的任何一个(它们被称为格式化程序?!)。 (数据库、电子邮件、文本文件等)
它的设置在配置文件中。你可以使用EL自带的工具来做到这一点)
Yes the enterprise library should work fine as its part of the .NET framework not the OS. Your problem is down to permissions issues.
You need admin rights to 'create' a new source in the event log. You could create a console app to do this (run it under elevated permissions) or set it up directly in the registry.
Once the source is set up you should be able to write your logs away.
P.S - You can use any of the (formatters are they called?!) in the enterprise logging block. (Database, email, text file, etc)
Its setup in the config file. you can use the tool that comes with EL to do this)
由于它适用于 Windows Vista,因此也适用于 Windows 7。
从本质上讲,这两个操作系统都是版本 6,并且都运行 .NET 框架。
Since it works with Windows Vista, it will work with Windows 7.
Under the hood, both operating systems are version 6 and both run the .NET framework.
企业库是建立在.net之上的,所以应该有问题。
Enterprise library is built on top of .net so there should be problem.
Enterprise Library 4.1 是在 Windows 7 之前发布的,因此它没有出现在列表中。不过,它应该可以在 Windows 7 中运行,因为它可以在 Windows Vista 中运行。
Enterprise library 4.1 was released before Windows 7, that's why it does not apper listed. However it should work in Windows 7 since it works in Windows Vista.