I'm trying to read, from XP SP3, .evtx log files which are h开发者_运维技巧osted on a windows 2008 server.
I use EventLogQuery, EventLogInformation which are in Framework 3.5 System.Diagnostics.Eventing.Reader.
However Visual Studio tells me this: "platform not supported exception". I don't get it as I have the Framework 3.5 installed already.
I am missing something here.
If anyone has a clue or another way to do this, please let me know.
The source code for these classes constains the following line: (In NativeWrapper.cs)
private static bool s_platformNotSupported
= (Environment.OSVersion.Version.Major < 6);
In other words, they cannot be used on XP.
The MSDN docs for the underlying native APIs state that it requires Vista or higher.
精彩评论