开发者

Obsolete createEvenSource

  1. I want to create a new customevent log ( "My EeventLog") on a remote machine.

createEventSource(String,String,String) method was perferct for my need.

Unfortenatly, this method is Obsolete.

My questions is: the two other alternatives don't allow evenlog creation over a remote machine (correct me if I'm wrong).

http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.createeventsource.aspx

So, my easiest way to do it- is be created a new exe and run it remotely with Psexe.开发者_如何学Go right?

  1. Could I count eventlog entries that have some specific ID ?

Regards,


According to the ObsoleteAttribute on that type, there is an alternate way:

This method has been deprecated. Please use System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData) instead. http://go.microsoft.com/fwlink/?linkid=14202

Use EventLog.CreateEventSource(EventSourceCreationData) and set the EventSourceCreationData.MachineName property to the name of the remote machine.


the override method that takes a EventLogCreationData parameter can be used as this class has a machinename field

here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜