By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

Create dll for EventViewer

P: n/a
When I perform: EventLog.WriteEntry(strSource, strEntry,
EventLogEntryType.Error, intEventID)

The event viewer reports

The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) 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 think I need to create a dll that returns error messages for event ID’s.
Can this dll be written in VB.NET?
Any pointers to documentation that tells me how to go about creating this dll?

Or am I missing something and have got it totally wrong?

Thanks in advance.
Chris.
Nov 21 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.
Nov 21 '05 #2

P: n/a
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.
Nov 21 '05 #3

P: n/a
I know about checking if the source exists. It does and that's how I actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.

Nov 21 '05 #4

P: n/a
I know about checking if the source exists. It does and that's how I actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.

Nov 21 '05 #5

P: n/a
Chris,
Do you delete the event source? You shouldn't!

When you use CreateEventSource, entries are made in the registry that
associations the event source with
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Event LogMessages.dll (for
VS.NET 2003 .NET 1.1) This dll handles all event log messages. It has a
generic message that is able to display the message that your app sends.

If you delete the event source these entries are removed, and you see you
error.

I'll see if I can find a link that explains the above...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I know about checking if the source exists. It does and that's how I
actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as
string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event
ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating
this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.

Nov 21 '05 #6

P: n/a
Chris,
Do you delete the event source? You shouldn't!

When you use CreateEventSource, entries are made in the registry that
associations the event source with
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Event LogMessages.dll (for
VS.NET 2003 .NET 1.1) This dll handles all event log messages. It has a
generic message that is able to display the message that your app sends.

If you delete the event source these entries are removed, and you see you
error.

I'll see if I can find a link that explains the above...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I know about checking if the source exists. It does and that's how I
actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as
string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event
ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating
this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.

Nov 21 '05 #7

P: n/a
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I know about checking if the source exists. It does and that's how I
actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as
string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event
ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating
this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.

Nov 21 '05 #8

P: n/a
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I know about checking if the source exists. It does and that's how I
actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as
string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event
ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating
this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.

Nov 21 '05 #9

P: n/a
Jay,

Thanks for all you help. The link was very useful.
I hadn't actually used CreateEventSource as it's a web service that's
creating events and it doesn't have permission to create the source so this
was a manual task. For now all I done is update our documentation to say that
the EventMessageFile string value needs creating and populating. This has
stopped the annoying "The description for Event ID (???) in Source (xxx)
cannot be found".

Thanks.
Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I know about checking if the source exists. It does and that's how I
actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as
string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event
ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating
this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.


Nov 21 '05 #10

P: n/a
Jay,

Thanks for all you help. The link was very useful.
I hadn't actually used CreateEventSource as it's a web service that's
creating events and it doesn't have permission to create the source so this
was a manual task. For now all I done is update our documentation to say that
the EventMessageFile string value needs creating and populating. This has
stopped the annoying "The description for Event ID (???) in Source (xxx)
cannot be found".

Thanks.
Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I know about checking if the source exists. It does and that's how I
actually
manage to get enties in the event log. What I want to do is stop the "The
description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be
found" message for my entries in the event viewer.

"steve" wrote:
you need to see if the source exists and create it if it doesn't...then
write to it:

public shared sub LogEvent(byval Source as string, byval Message as
string,
byval Type as eventlogentrytype)
dim eventLog as new system.diagnostics.eventlog
try
if not eventLog.SourceExists(Source) then
eventLog.CreateEventSource(Source, "Log Name Here")
eventLog.Log = "Log Name Here"
eventLog.WriteEntry(Source, Message, Type)
catch ex as Exception
throw new ApplicationException(ex.message, ex.innerexception)
end try
end sub

hth,

steve
"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
| When I perform: EventLog.WriteEntry(strSource, strEntry,
| EventLogEntryType.Error, intEventID)
|
| The event viewer reports
|
| The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
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 think I need to create a dll that returns error messages for event
ID's.
| Can this dll be written in VB.NET?
| Any pointers to documentation that tells me how to go about creating
this
dll?
|
| Or am I missing something and have got it totally wrong?
|
| Thanks in advance.
| Chris.


Nov 21 '05 #11

P: n/a
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project, that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Jay,

Thanks for all you help. The link was very useful.
I hadn't actually used CreateEventSource as it's a web service that's
creating events and it doesn't have permission to create the source so
this
was a manual task. For now all I done is update our documentation to say
that
the EventMessageFile string value needs creating and populating. This has
stopped the annoying "The description for Event ID (???) in Source (xxx)
cannot be found".

Thanks.
Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
>I know about checking if the source exists. It does and that's how I
>actually
> manage to get enties in the event log. What I want to do is stop the
> "The
> description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot
> be
> found" message for my entries in the event viewer.
>
> "steve" wrote:
>
>> you need to see if the source exists and create it if it
>> doesn't...then
>> write to it:
>>
>> public shared sub LogEvent(byval Source as string, byval Message as
>> string,
>> byval Type as eventlogentrytype)
>> dim eventLog as new system.diagnostics.eventlog
>> try
>> if not eventLog.SourceExists(Source) then
>> eventLog.CreateEventSource(Source, "Log Name Here")
>> eventLog.Log = "Log Name Here"
>> eventLog.WriteEntry(Source, Message, Type)
>> catch ex as Exception
>> throw new ApplicationException(ex.message, ex.innerexception)
>> end try
>> end sub
>>
>> hth,
>>
>> steve
>>
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:CD**********************************@microsof t.com...
>> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> | EventLogEntryType.Error, intEventID)
>> |
>> | The event viewer reports
>> |
>> | The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> 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 think I need to create a dll that returns error messages for event
>> ID's.
>> | Can this dll be written in VB.NET?
>> | Any pointers to documentation that tells me how to go about creating
>> this
>> dll?
>> |
>> | Or am I missing something and have got it totally wrong?
>> |
>> | Thanks in advance.
>> | Chris.
>>
>>
>>


Nov 21 '05 #12

P: n/a
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project, that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Jay,

Thanks for all you help. The link was very useful.
I hadn't actually used CreateEventSource as it's a web service that's
creating events and it doesn't have permission to create the source so
this
was a manual task. For now all I done is update our documentation to say
that
the EventMessageFile string value needs creating and populating. This has
stopped the annoying "The description for Event ID (???) in Source (xxx)
cannot be found".

Thanks.
Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
>I know about checking if the source exists. It does and that's how I
>actually
> manage to get enties in the event log. What I want to do is stop the
> "The
> description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot
> be
> found" message for my entries in the event viewer.
>
> "steve" wrote:
>
>> you need to see if the source exists and create it if it
>> doesn't...then
>> write to it:
>>
>> public shared sub LogEvent(byval Source as string, byval Message as
>> string,
>> byval Type as eventlogentrytype)
>> dim eventLog as new system.diagnostics.eventlog
>> try
>> if not eventLog.SourceExists(Source) then
>> eventLog.CreateEventSource(Source, "Log Name Here")
>> eventLog.Log = "Log Name Here"
>> eventLog.WriteEntry(Source, Message, Type)
>> catch ex as Exception
>> throw new ApplicationException(ex.message, ex.innerexception)
>> end try
>> end sub
>>
>> hth,
>>
>> steve
>>
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:CD**********************************@microsof t.com...
>> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> | EventLogEntryType.Error, intEventID)
>> |
>> | The event viewer reports
>> |
>> | The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> 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 think I need to create a dll that returns error messages for event
>> ID's.
>> | Can this dll be written in VB.NET?
>> | Any pointers to documentation that tells me how to go about creating
>> this
>> dll?
>> |
>> | Or am I missing something and have got it totally wrong?
>> |
>> | Thanks in advance.
>> | Chris.
>>
>>
>>


Nov 21 '05 #13

P: n/a
It was done directly. The web service is currently installed on one of our
test IIS servers. I haven't got round to creating the deployment bits due to
pressure from above for our support team to be able to access the web service
so they can test it's functionality is correct.

Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project, that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Jay,

Thanks for all you help. The link was very useful.
I hadn't actually used CreateEventSource as it's a web service that's
creating events and it doesn't have permission to create the source so
this
was a manual task. For now all I done is update our documentation to say
that
the EventMessageFile string value needs creating and populating. This has
stopped the annoying "The description for Event ID (???) in Source (xxx)
cannot be found".

Thanks.
Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
>I know about checking if the source exists. It does and that's how I
>actually
> manage to get enties in the event log. What I want to do is stop the
> "The
> description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot
> be
> found" message for my entries in the event viewer.
>
> "steve" wrote:
>
>> you need to see if the source exists and create it if it
>> doesn't...then
>> write to it:
>>
>> public shared sub LogEvent(byval Source as string, byval Message as
>> string,
>> byval Type as eventlogentrytype)
>> dim eventLog as new system.diagnostics.eventlog
>> try
>> if not eventLog.SourceExists(Source) then
>> eventLog.CreateEventSource(Source, "Log Name Here")
>> eventLog.Log = "Log Name Here"
>> eventLog.WriteEntry(Source, Message, Type)
>> catch ex as Exception
>> throw new ApplicationException(ex.message, ex.innerexception)
>> end try
>> end sub
>>
>> hth,
>>
>> steve
>>
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:CD**********************************@microsof t.com...
>> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> | EventLogEntryType.Error, intEventID)
>> |
>> | The event viewer reports
>> |
>> | The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> 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 think I need to create a dll that returns error messages for event
>> ID's.
>> | Can this dll be written in VB.NET?
>> | Any pointers to documentation that tells me how to go about creating
>> this
>> dll?
>> |
>> | Or am I missing something and have got it totally wrong?
>> |
>> | Thanks in advance.
>> | Chris.
>>
>>
>>


Nov 21 '05 #14

P: n/a
It was done directly. The web service is currently installed on one of our
test IIS servers. I haven't got round to creating the deployment bits due to
pressure from above for our support team to be able to access the web service
so they can test it's functionality is correct.

Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project, that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Jay,

Thanks for all you help. The link was very useful.
I hadn't actually used CreateEventSource as it's a web service that's
creating events and it doesn't have permission to create the source so
this
was a manual task. For now all I done is update our documentation to say
that
the EventMessageFile string value needs creating and populating. This has
stopped the annoying "The description for Event ID (???) in Source (xxx)
cannot be found".

Thanks.
Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
Here is a link that explains the EventLogMessages.dll:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
>I know about checking if the source exists. It does and that's how I
>actually
> manage to get enties in the event log. What I want to do is stop the
> "The
> description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot
> be
> found" message for my entries in the event viewer.
>
> "steve" wrote:
>
>> you need to see if the source exists and create it if it
>> doesn't...then
>> write to it:
>>
>> public shared sub LogEvent(byval Source as string, byval Message as
>> string,
>> byval Type as eventlogentrytype)
>> dim eventLog as new system.diagnostics.eventlog
>> try
>> if not eventLog.SourceExists(Source) then
>> eventLog.CreateEventSource(Source, "Log Name Here")
>> eventLog.Log = "Log Name Here"
>> eventLog.WriteEntry(Source, Message, Type)
>> catch ex as Exception
>> throw new ApplicationException(ex.message, ex.innerexception)
>> end try
>> end sub
>>
>> hth,
>>
>> steve
>>
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:CD**********************************@microsof t.com...
>> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> | EventLogEntryType.Error, intEventID)
>> |
>> | The event viewer reports
>> |
>> | The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> 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 think I need to create a dll that returns error messages for event
>> ID's.
>> | Can this dll be written in VB.NET?
>> | Any pointers to documentation that tells me how to go about creating
>> this
>> dll?
>> |
>> | Or am I missing something and have got it totally wrong?
>> |
>> | Thanks in advance.
>> | Chris.
>>
>>
>>


Nov 21 '05 #15

P: n/a
Chris,
I understand, my point is if you create the installer now & get use to using
the installer you wont have 15 to 20 notes later on things you need to
remember to change when you deploy to test, qa, production, recovery or any
place else. All the little things you need to change will be nice & neatly
packaged in your project installer, which is neatly contained within your
Web Services main assembly.

For details on Creating Installation Components see:

http://msdn.microsoft.com/library/de...Components.asp

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
It was done directly. The web service is currently installed on one of our
test IIS servers. I haven't got round to creating the deployment bits due
to
pressure from above for our support team to be able to access the web
service
so they can test it's functionality is correct.

Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project,
that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
> Jay,
>
> Thanks for all you help. The link was very useful.
> I hadn't actually used CreateEventSource as it's a web service that's
> creating events and it doesn't have permission to create the source so
> this
> was a manual task. For now all I done is update our documentation to
> say
> that
> the EventMessageFile string value needs creating and populating. This
> has
> stopped the annoying "The description for Event ID (???) in Source
> (xxx)
> cannot be found".
>
> Thanks.
> Chris.
>
> "Jay B. Harlow [MVP - Outlook]" wrote:
>
>> Chris,
>> Here is a link that explains the EventLogMessages.dll:
>> http://msdn.microsoft.com/msdnmag/is...T/default.aspx
>>
>> Hope this helps
>> Jay
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:50**********************************@microsof t.com...
>> >I know about checking if the source exists. It does and that's how I
>> >actually
>> > manage to get enties in the event log. What I want to do is stop the
>> > "The
>> > description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> > cannot
>> > be
>> > found" message for my entries in the event viewer.
>> >
>> > "steve" wrote:
>> >
>> >> you need to see if the source exists and create it if it
>> >> doesn't...then
>> >> write to it:
>> >>
>> >> public shared sub LogEvent(byval Source as string, byval Message as
>> >> string,
>> >> byval Type as eventlogentrytype)
>> >> dim eventLog as new system.diagnostics.eventlog
>> >> try
>> >> if not eventLog.SourceExists(Source) then
>> >> eventLog.CreateEventSource(Source, "Log Name Here")
>> >> eventLog.Log = "Log Name Here"
>> >> eventLog.WriteEntry(Source, Message, Type)
>> >> catch ex as Exception
>> >> throw new ApplicationException(ex.message, ex.innerexception)
>> >> end try
>> >> end sub
>> >>
>> >> hth,
>> >>
>> >> steve
>> >>
>> >>
>> >> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> >> message
>> >> news:CD**********************************@microsof t.com...
>> >> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> >> | EventLogEntryType.Error, intEventID)
>> >> |
>> >> | The event viewer reports
>> >> |
>> >> | The description for Event ID ( 234 ) in Source (
>> >> Siclops_WS_Mobile )
>> >> 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 think I need to create a dll that returns error messages for
>> >> event
>> >> ID's.
>> >> | Can this dll be written in VB.NET?
>> >> | Any pointers to documentation that tells me how to go about
>> >> creating
>> >> this
>> >> dll?
>> >> |
>> >> | Or am I missing something and have got it totally wrong?
>> >> |
>> >> | Thanks in advance.
>> >> | Chris.
>> >>
>> >>
>> >>
>>
>>
>>


Nov 21 '05 #16

P: n/a
Chris,
I understand, my point is if you create the installer now & get use to using
the installer you wont have 15 to 20 notes later on things you need to
remember to change when you deploy to test, qa, production, recovery or any
place else. All the little things you need to change will be nice & neatly
packaged in your project installer, which is neatly contained within your
Web Services main assembly.

For details on Creating Installation Components see:

http://msdn.microsoft.com/library/de...Components.asp

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
It was done directly. The web service is currently installed on one of our
test IIS servers. I haven't got round to creating the deployment bits due
to
pressure from above for our support team to be able to access the web
service
so they can test it's functionality is correct.

Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project,
that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
> Jay,
>
> Thanks for all you help. The link was very useful.
> I hadn't actually used CreateEventSource as it's a web service that's
> creating events and it doesn't have permission to create the source so
> this
> was a manual task. For now all I done is update our documentation to
> say
> that
> the EventMessageFile string value needs creating and populating. This
> has
> stopped the annoying "The description for Event ID (???) in Source
> (xxx)
> cannot be found".
>
> Thanks.
> Chris.
>
> "Jay B. Harlow [MVP - Outlook]" wrote:
>
>> Chris,
>> Here is a link that explains the EventLogMessages.dll:
>> http://msdn.microsoft.com/msdnmag/is...T/default.aspx
>>
>> Hope this helps
>> Jay
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:50**********************************@microsof t.com...
>> >I know about checking if the source exists. It does and that's how I
>> >actually
>> > manage to get enties in the event log. What I want to do is stop the
>> > "The
>> > description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> > cannot
>> > be
>> > found" message for my entries in the event viewer.
>> >
>> > "steve" wrote:
>> >
>> >> you need to see if the source exists and create it if it
>> >> doesn't...then
>> >> write to it:
>> >>
>> >> public shared sub LogEvent(byval Source as string, byval Message as
>> >> string,
>> >> byval Type as eventlogentrytype)
>> >> dim eventLog as new system.diagnostics.eventlog
>> >> try
>> >> if not eventLog.SourceExists(Source) then
>> >> eventLog.CreateEventSource(Source, "Log Name Here")
>> >> eventLog.Log = "Log Name Here"
>> >> eventLog.WriteEntry(Source, Message, Type)
>> >> catch ex as Exception
>> >> throw new ApplicationException(ex.message, ex.innerexception)
>> >> end try
>> >> end sub
>> >>
>> >> hth,
>> >>
>> >> steve
>> >>
>> >>
>> >> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> >> message
>> >> news:CD**********************************@microsof t.com...
>> >> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> >> | EventLogEntryType.Error, intEventID)
>> >> |
>> >> | The event viewer reports
>> >> |
>> >> | The description for Event ID ( 234 ) in Source (
>> >> Siclops_WS_Mobile )
>> >> 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 think I need to create a dll that returns error messages for
>> >> event
>> >> ID's.
>> >> | Can this dll be written in VB.NET?
>> >> | Any pointers to documentation that tells me how to go about
>> >> creating
>> >> this
>> >> dll?
>> >> |
>> >> | Or am I missing something and have got it totally wrong?
>> >> |
>> >> | Thanks in advance.
>> >> | Chris.
>> >>
>> >>
>> >>
>>
>>
>>


Nov 21 '05 #17

P: n/a
Jay,

Thanks for the reply. We have a development meeting today so I push that
this is done sooner rather than later.

Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
I understand, my point is if you create the installer now & get use to using
the installer you wont have 15 to 20 notes later on things you need to
remember to change when you deploy to test, qa, production, recovery or any
place else. All the little things you need to change will be nice & neatly
packaged in your project installer, which is neatly contained within your
Web Services main assembly.

For details on Creating Installation Components see:

http://msdn.microsoft.com/library/de...Components.asp

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
It was done directly. The web service is currently installed on one of our
test IIS servers. I haven't got round to creating the deployment bits due
to
pressure from above for our support team to be able to access the web
service
so they can test it's functionality is correct.

Chris.

"Jay B. Harlow [MVP - Outlook]" wrote:
Chris,
I hope you didn't say to update the registry directly!

As the EventLogInstaller class is designed to update the registry, in all
the correct places, with all the correct values...

What I normally do is create an ProjectInstaller class in my project,
that
includes an EventLogInstaller object. When I deploy the web service I use
installutil.exe (on the server) to allow any installer classes in the
assembly to be ran. This way there is not a lot of manual fiddling if the
project ever needs to be deployed on a backup server.

Alternatively with the ProjectInstaller you can create a setup project to
deploy the web service...

Hope this helps
Jay

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
> Jay,
>
> Thanks for all you help. The link was very useful.
> I hadn't actually used CreateEventSource as it's a web service that's
> creating events and it doesn't have permission to create the source so
> this
> was a manual task. For now all I done is update our documentation to
> say
> that
> the EventMessageFile string value needs creating and populating. This
> has
> stopped the annoying "The description for Event ID (???) in Source
> (xxx)
> cannot be found".
>
> Thanks.
> Chris.
>
> "Jay B. Harlow [MVP - Outlook]" wrote:
>
>> Chris,
>> Here is a link that explains the EventLogMessages.dll:
>> http://msdn.microsoft.com/msdnmag/is...T/default.aspx
>>
>> Hope this helps
>> Jay
>>
>> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> message
>> news:50**********************************@microsof t.com...
>> >I know about checking if the source exists. It does and that's how I
>> >actually
>> > manage to get enties in the event log. What I want to do is stop the
>> > "The
>> > description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile )
>> > cannot
>> > be
>> > found" message for my entries in the event viewer.
>> >
>> > "steve" wrote:
>> >
>> >> you need to see if the source exists and create it if it
>> >> doesn't...then
>> >> write to it:
>> >>
>> >> public shared sub LogEvent(byval Source as string, byval Message as
>> >> string,
>> >> byval Type as eventlogentrytype)
>> >> dim eventLog as new system.diagnostics.eventlog
>> >> try
>> >> if not eventLog.SourceExists(Source) then
>> >> eventLog.CreateEventSource(Source, "Log Name Here")
>> >> eventLog.Log = "Log Name Here"
>> >> eventLog.WriteEntry(Source, Message, Type)
>> >> catch ex as Exception
>> >> throw new ApplicationException(ex.message, ex.innerexception)
>> >> end try
>> >> end sub
>> >>
>> >> hth,
>> >>
>> >> steve
>> >>
>> >>
>> >> "Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in
>> >> message
>> >> news:CD**********************************@microsof t.com...
>> >> | When I perform: EventLog.WriteEntry(strSource, strEntry,
>> >> | EventLogEntryType.Error, intEventID)
>> >> |
>> >> | The event viewer reports
>> >> |
>> >> | The description for Event ID ( 234 ) in Source (
>> >> Siclops_WS_Mobile )
>> >> 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 think I need to create a dll that returns error messages for
>> >> event
>> >> ID's.
>> >> | Can this dll be written in VB.NET?
>> >> | Any pointers to documentation that tells me how to go about
>> >> creating
>> >> this
>> >> dll?
>> >> |
>> >> | Or am I missing something and have got it totally wrong?
>> >> |
>> >> | Thanks in advance.
>> >> | Chris.
>> >>
>> >>
>> >>
>>
>>
>>


Nov 21 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.