从win server 2008读取evtx日志文件

时间:2010-06-25 14:01:33

标签: .net-3.5 logging windows-xp windows-server-2008

我正在尝试从XP SP3中读取托管在Windows 2008服务器上的.evtx日志文件。

我使用Framework 3.5 System.Diagnostics.Eventing.Reader中的EventLogQuery,EventLogInformation。

然而,Visual Studio告诉我:“平台不支持异常”。 我没有得到它,因为我已经安装了Framework 3.5。

我在这里遗漏了一些东西。

如果有人有线索或其他方法,请告诉我。

1 个答案:

答案 0 :(得分:0)

这些类的源代码构成以下行:(在NativeWrapper.cs中)

private static bool s_platformNotSupported 
     = (Environment.OSVersion.Version.Major < 6); 

换句话说,它们不能在XP上使用。

MSDN docs for the underlying native APIs表示它需要Vista或更高版本。

相关问题