tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.42k stars 640 forks source link

Get eventlog no permission error when referencing a dll file #732

Closed Microkiller closed 4 days ago

Microkiller commented 1 year ago

I am using your package to reference a function in a DLL file. I get an error "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." while running this function. After some research, I found this post: https://stackoverflow.com/questions/1274018/system-security-securityexception-when-writing-to-event-log. I don't really understand the post. But I tried to add a key in the registry editor under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\, the key name is class_name::function_name() constructor, the value is image It did solve the issue. But what if I need to run my application on a pc with no admin permission? Does anyone knows the details of this package can explain to me the cause of this issue and provide me with a solution that does not need to edit the registry? Thank you.