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. 17 3271
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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. >> >> >>
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. >> >> >>
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. >> >> >>
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. >> >> >>
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. >> >> >> >> >> >> >> >> >>
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. >> >> >> >> >> >> >> >> >>
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. >> >> >> >> >> >> >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dog |
last post by:
I've seen plenty of articles on this topic but none of them have been
able to solve my problem.
I am working with an Access 97 database on an NT4.0 machine, which has
many Access reports.
I...
|
by: I_AM_DON_AND_YOU? |
last post by:
There is one more problem I am facing but didn't get the solution. In my
Setup Program I am not been able to create 2 things (when the program is
intalled on the client machine ) : (1) create...
|
by: Zack Sessions |
last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command
and ADO.NET? If so, is there a trick in trapping a SQL error when
trying to create the view? I have a VB.NET app that, amoung...
|
by: Peter |
last post by:
HelloŁ¬everyone,
My program will collect a testing machine's data ,save the data and deal
with the data everyday. I want to use vb.net to create database, add and
delete tables or modify the...
|
by: Chris Podmore |
last post by:
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 )...
|
by: Steven Bethard |
last post by:
The PEP below should be mostly self explanatory. I'll try to keep the
most updated versions available at:
http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
|
by: Steven Bethard |
last post by:
I've updated the PEP based on a number of comments on comp.lang.python.
The most updated versions are still at:
http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
|
by: barb |
last post by:
So that the world at large benefits from our efforts, here is one fully
documented way to use Windows Irfanview freeware to create thumbnail web
galleries (http://www.irfanview.com).
STEP 1:...
|
by: =?Utf-8?B?Q0QuU21hbGxleQ==?= |
last post by:
Is there a command line switch available for the EventViewer which will allow
me to specify which directory to view the available logs from?
I will have multiple workstations writing to a...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |