C# event log | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

C# event log

Hi guys Iā€™m trying to write a simple event log but i confront with ā€œSystem.Security.SecurityException: The source was not found...ā€ and i searched a lot but couldnā€™t find an efficient solution, I really really appreciate if someone help me with that šŸ™šŸ½ I know that the source needed to be created and the key must be registered but what is the key and How should i do that? String source =ā€œDemoTestApplicationā€; String log = ā€œDemoEventLogā€; EventLog demolog=new EventLog(log); demolog.Source=source; demolog.writeEntry(ā€œThis is the first message to the logā€,EventLogEntryType.Information);

9th Aug 2018, 7:25 AM
Sogand katuzian
1 Resposta
0
Is this a Windows event log?
29th Nov 2019, 7:38 AM
SQrL
SQrL - avatar