Re: Development of event log message file



Steve, the reason the event error message has the reference to a lack of
registry info is because the Application entry in the registry for the
EventLog Service does not have a key for an EventMessageFile. If I develop a
mesage file using the rudementory tools from older Visual Studios and create
the registry key pointing to the created DLL I can resolve the message
problem.

The original reason for the post was to ask if there was a better way for
developing EventLog Message Files.

Regards, Major.


"Stevanich" wrote:

Major,

To read the event log on a remote computer, which is what it sounds like you
are trying to do, use the System.Diagnostics namespace.

The EventLog class has a constructor that takes two string parameters. The
first is the name of the event log to read, the second is the name of the
machine to open the event log on. Make sure the user running the program
has rights to read the remote event log.

Hope this helps,


Steve

"Mr Major Thorburn" <MrMajorThorburn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:99EB27C5-4321-44B9-88A4-317E7977D3AD@xxxxxxxxxxxxxxxx
The reason I am interested in the messagefile is because we get the
following
in the event log entries

The description for Event ID (0) in Source (application) cannot be found.
The local computer may not have the necessary registry information or
message
DLL files to display message from a remote computer. You may be able to
use
the /AUXSOURCE= flag to retrieve this description; see Help and Support
for
details.

I would like to eliminate this if at all possible.

Regards, Major.



"Stevanich" wrote:

Major,

We don't. The code in the link I referenced does it for us. Why are you
concerned with the physical file?

Thanks,


Steve - dotneticated.com

"Mr Major Thorburn" <MrMajorThorburn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:AECF8E78-C651-4016-9354-1114C1F973DE@xxxxxxxxxxxxxxxx
Thanks, I read that article.
The reason for the post was to find out how the current developers of
ASP.
NET applications who use global.asax to create event log entries manage
to
develop the associated eventlog message file when using Visual Studio
2005.
I have managed to develop a messagefile using the cobbled together set
of
tools.
It just seemed to me to be a bit of a botch and wondered if there a
better
way.
Regards, Major.

"Stevanich" wrote:

Major,

Are you just looking to write to a new section in the event log? You
can
do
this without any of the legacy stuff.
http://support.microsoft.com/kb/307024

Hope this helps,

Steve - dotneticated.com

"Mr Major Thorburn" <MrMajorThorburn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in
message news:2554F0A6-BB87-46DF-BEFC-BE5E814BD08F@xxxxxxxxxxxxxxxx
Anyone have any hints on how I may proceed in developing an event
log
message
file for my .NET 2.0 web application?

I have read artcles for doing this sort of thing that use .mc files
and
mc.exe to produce a .rc file, rc.exe to produce a .res file and
link.exe
to
create a dll but these are all old VC98, VB98 tools and not part of
VC
2005.

How do I do this using VC 2005?

Regards, Major.

p.s. Major is my Christian name ;-)









.



Relevant Pages

  • Re: Service, Requested registry access is not allowed
    ... eventlog assuming that the user installing the service has appropriate ... write to a custom event log and work fun running under Network Service. ... In that case you don't even need the installer. ... "Requested registry access is not allowed" but I feel I went by the ...
    (microsoft.public.dotnet.security)
  • RE: .NET 1.1 created event log has only "Not available" properties
    ... are several missing registry values for the .NET created event logs. ... I understanding you're using the EventLog class to ... write entries into custom eventlog in .net 1.1 application. ... // Write an informational entry to the event log. ...
    (microsoft.public.dotnet.framework)
  • Re: Windows Explorer is CRASHING!!! (YET MORE info)
    ... >>I'm pretty sure the errors you're seeing in the event log are not related. ... >>> The local computer may not have the necessary registry information or message ... Server performance data will not be returned. ... >>> Error code returned is in data DWORD 0. ...
    (microsoft.public.win2000.general)
  • Re: Windows Service AutoStart Problem (C#)
    ... > I have a problem on some machines to AutoStart a very simple windows service. ... > It just logs a line in the event log when the OnStart and OnStop occurs. ... > Event Source: Service Control Manager ... I think the problem may be that you try to write to the EventLog but the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: Setting category / event ID when tracing in VS2008
    ... To learn how to specify category for the event log entry, ... Now we can create an installer (you can choose to add the installer to your ... Public Class MyEventLogInstaller ... Now we can use the EventLog class in .NET Framework to write an event log ...
    (microsoft.public.dotnet.languages.vb)