I have to run an application that writes to the Event Log. In turn, the SQLServerAgent will read the events and respond to them. When I run this application and write to another computer's Event Log, I get this error:
The description for Event ID ( 17061 ) in Source ( MSSQLSERVER ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.
I have local administrator rights to the remote computer, and the application works just fine on my local machine. I want to impersonate the MSSQLSERVER process, but have yet to find an example that explains it in entirety. Using WindowsIndentity.Impersonate, I should be able to accomplish this, but I don't know how to get the userToken of the MSSQLSERVER process. Any help is greatly appreciated.