Discussion:
Cannot Consistently and Reliably Write to a Custom Event Log from DotNet
(too old to reply)
Charles
2010-10-12 09:50:25 UTC
Permalink
There are an abundance of posts about this subject, but none I have found
address this particular problem.

I have created a custom event log, and an event source, and registered one
with the other. But on some machines, try as I might, I can't get my
application to write to the custom event log. The application is identical
on both servers, which are running Windows Server 2008 R2 x64.

I have made the application as simple as I possibly can, and on some servers
it just works. But on others it always writes to the Application event log.

The only difference I can come up with is that [probably], on the servers
where it works, I ran my application to create the event log and source
_before_ trying to write to the event log. On the machines where it doesn't
work there could be some early events for my custom source already in the
Application event log.

Could this be the problem? If so, how do I get Windows to stop using the
Application event log and start using my custom log? I can't clear the
Application event log, as this is managed by others.

Thanks for any clues.

Charles
Steel
2010-10-13 00:49:44 UTC
Permalink
Post by Charles
There are an abundance of posts about this subject, but none I have
found address this particular problem.
I have created a custom event log, and an event source, and registered
one with the other. But on some machines, try as I might, I can't get my
application to write to the custom event log. The application is
identical on both servers, which are running Windows Server 2008 R2 x64.
I have made the application as simple as I possibly can, and on some
servers it just works. But on others it always writes to the Application
event log.
The only difference I can come up with is that [probably], on the
servers where it works, I ran my application to create the event log and
source _before_ trying to write to the event log. On the machines where
it doesn't work there could be some early events for my custom source
already in the Application event log.
Could this be the problem? If so, how do I get Windows to stop using the
Application event log and start using my custom log? I can't clear the
Application event log, as this is managed by others.
Thanks for any clues.
Charles
You should post to the MSDN forums now, as this forum is pretty much
dead now when MS abandon NG servers. You can get to MSDN easily with
your ng reader by using MS NNTP Bridge program, a free download. All the
action is at MSDN now.
Charles
2010-10-13 02:18:20 UTC
Permalink
Hi Steel

Thanks for the heads-up.

Charles
Post by Charles
There are an abundance of posts about this subject, but none I have
found address this particular problem.
I have created a custom event log, and an event source, and registered
one with the other. But on some machines, try as I might, I can't get my
application to write to the custom event log. The application is
identical on both servers, which are running Windows Server 2008 R2 x64.
I have made the application as simple as I possibly can, and on some
servers it just works. But on others it always writes to the Application
event log.
The only difference I can come up with is that [probably], on the
servers where it works, I ran my application to create the event log and
source _before_ trying to write to the event log. On the machines where
it doesn't work there could be some early events for my custom source
already in the Application event log.
Could this be the problem? If so, how do I get Windows to stop using the
Application event log and start using my custom log? I can't clear the
Application event log, as this is managed by others.
Thanks for any clues.
Charles
You should post to the MSDN forums now, as this forum is pretty much dead
now when MS abandon NG servers. You can get to MSDN easily with your ng
reader by using MS NNTP Bridge program, a free download. All the action is
at MSDN now.
Loading...