użyć kodu odłogowania wyeksportować windows-Eventlog:Wyjątek przy wywozu Eventlog
var els = new EventLogSession();
els.ExportLogAndMessages("Application",
PathType.LogName,
"*[System[Provider[@Name='Prayon.Client']]]",
tempEventLogPath,
false,
CultureInfo.CurrentCulture);
to ogólnie działa. Ale na jednym komputerze, pojawia się wyjątek odłogowania:
System.Diagnostics.Eventing.Reader.EventLogException: Der Verzeichnisname ist ungültig
bei System.Diagnostics.Eventing.Reader.EventLogException.Throw(Int32 errorCode)
bei System.Diagnostics.Eventing.Reader.NativeWrapper.EvtArchiveExportedLog(EventLogHandle session, String logFilePath, Int32 locale, Int32 flags)
bei System.Diagnostics.Eventing.Reader.EventLogSession.ExportLogAndMessages(String path, PathType pathType, String query, String targetFilePath, Boolean tolerateQueryErrors, CultureInfo targetCultureInfo)
"Der Verzeichnisname ist ungültig"
oznacza na angielski: "The pathname is invalid"
Application-Dziennik_zdarzeń jest istniejący i tempEventLogPath
jest również ważna.
Czy ktoś wie, co może być nie tak?
Jaka jest wartość tempEventLogPath? –