Description for event id from source cannot be found

后端 未结 11 624
[愿得一人]
[愿得一人] 2020-11-29 01:55

When I write a log into windows event log, I get the event below, what\'s the root cause of this message, and how can I fix it? Many Thanks

The descri

11条回答
  •  庸人自扰
    2020-11-29 02:17

    You need to create an event source and a message file for it. Code looks something like this:

    var data = new EventSourceCreationData("yourApp", "Application");
    data.MessageResourceFile = pathToYourMessageFile;
    EventLog.CreateEventSource(data);
    

    Then you will need to create a message file. There is also this article that explains things (I did not read it all but it seems fairly complete).

提交回复
热议问题