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
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.
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 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.