473,320 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Create dll for EventViewer

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
17 3269
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
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...
4
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...
10
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...
9
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...
0
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 )...
37
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...
18
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...
8
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:...
3
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.