Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to write eventlog after configuring desktop2:DesktopEventLogging #321

Closed
chiluap opened this issue Dec 1, 2022 · 1 comment
Closed

Comments

@chiluap
Copy link

chiluap commented Dec 1, 2022

I configuered the following section in in my Package.appxmanifest:

<Package
  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
  xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
  xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
  xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2"
  IgnorableNamespaces="uap rescap desktop2">
<Extensions>
		<desktop2:Extension Category="windows.desktopEventLogging">
			<desktop2:DesktopEventLogging AppName="MyApp">
				<desktop2:EventMessageFiles>
					<desktop2:File Path="logfolder\myapp.log"/>
				</desktop2:EventMessageFiles>
				<desktop2:TypesSupported>
					<desktop2:TypeSupported Value="EVENTLOG_ERROR_TYPE"/>
					<desktop2:TypeSupported Value="EVENTLOG_WARNING_TYPE"/>
					<desktop2:TypeSupported Value="EVENTLOG_INFORMATION_TYPE"/>
				</desktop2:TypesSupported>
			</desktop2:DesktopEventLogging>
		</desktop2:Extension>
	</Extensions>

when I try to write to the eventlog i get the following errors (after installation of the package)

Ausnahme ausgelöst: "System.Security.SecurityException" in Microsoft.Win32.Registry.dll Ausnahme ausgelöst: "System.Security.SecurityException" in Microsoft.Win32.Registry.dll Ausnahme ausgelöst: "System.Security.SecurityException" in System.Diagnostics.EventLog.dll

System.Security.SecurityException: "The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security, State."

Am I missing something here? The documentation is not very clear about how to configure event log access.

Also, the documentation states the extension belongs under Package>Applications>Application>Extensions>desktop2:Extension>desktop2:DesktopEventLogging>
but when I put it there I get an validation error:

Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler Validierungsfehler. error 80080204: App manifest validation error: Line 40, Column 29, Reason: The "windows.desktopEventLogging" extension should be declared under extensions. MyApp C:[snip]\bin\x64\Debug\AppxManifest.xml 1


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@drewbatgit
Copy link
Contributor

Hello. We apologize for the delay in resolving this issue. As we transition to a new feedback system, we are closing all outstanding issues. Any issues that can be addressed will be tracked using a different internal tool, and we regret that we won't be able to provide further updates on this particular matter. We value your input and assure you that all feedback is reviewed. We recommend visiting the Microsoft Q&A site, where your issue may have already been discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants