2

内部Webページから内部ユーザーにイベントビューアを開くだけでよいという要件があります。リンク「EvetnViewer」とドロップダウン「Servers」があります。ユーザーがサーバーを選択してリンクをクリックすると、Windowsイベントビューアーが開きます。これを行う方法?

4

2 に答える 2

2
    EventLogSession session = new EventLogSession(
        "RemoteComputerName",// Remote Computer
        "Domain",// Domain
        "Username",// Username
        pw,
        SessionAuthentication.Default);

Read more here How to manage event logs using Visual C# .NET

于 2011-04-05T13:45:11.447 に答える
1

The only way to open the Event Viewer within Windows would be with an ActiveX control of some type. Event Viewer can be started with the server name as an argument: eventvwr myserver.

Here's some basic guidance on how to create these: http://www.c-sharpcorner.com/uploadfile/dsandor/activexinnet11102005040748am/activexinnet.aspx

Otherwise you'll be restricted to loading the events server-side and returning them in the markup (make sure you restrict the results - event logs can get pretty big!)

于 2011-04-05T13:51:00.723 に答える