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