Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Programmatically change Event Viewer properties in C#

$
0
0
 

Hi there,

First of all, I am not sure if this is the right forum for this post (my guess is not). Someone please let me know what the right forums is if you see this is not and I will try to move it. thx.

IIS 7.5 supports IIS configuration auditing by setting a Event Viewer property:Event Viewer/Applications and
Services Logs/Microsoft/Windows/Operational/Enable
Log.

I tried it through Event Viewer and it worked great. But what I need is not to do that manually using Event Viewer.

Instead, I need to achieve that programmatically in C# through API - an API for programmatically setting  the above Event Viewer property (not IIS property) so that I can enable the logging .

Is that possible?

If so, how?

Any help is highly appreciated.


Feng



Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>