473,406 Members | 2,867 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,406 software developers and data experts.

ASP.net 1.1 writing to Application Log

Hi. I need to start logging my application in the Windows Event Log. I
found some sample code and it works from a Windows Form. So I put it
into my asp.net application and initially had a problem that I found I
just needed to create a registry key as outlined in this kb article:
http://support.microsoft.com/default...b;en-us;329291

So now I get a log entry in my event log, and the entry I specified in
the code was: "Invoke called, WebService = False" but in the log I see
all this text, which then ends with what I actually specified in code.

The description for Event ID ( 0 ) in Source ( eCommerce ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: Invoke called, WebService = False.

I found some references to other having this issue but no answers.
Anyone know what I need to do to fix this? Thanks!

The code I'm using is this:

Try
'Register the App as an Event Source
If Not objEventLog.SourceExists(AppName) Then

objEventLog.CreateEventSource(AppName, LogName)
End If

objEventLog.Source = AppName

'WriteEntry is overloaded; this is one
'of 10 ways to call it
objEventLog.WriteEntry(Entry, EventType)
Return True
Catch Ex As Exception
Return False
End Try

Thanks,
Matt
Mar 30 '06 #1
1 2995
Ah, I figured it out. In case anyone else is having this problem, I
looked in another .Net application's registry settings in the same
Application Log key and I was missing the following REG_SZ entry:
Name: EventMessageFile
Value: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Event LogMessages.dll

Matt

MattB wrote:
Hi. I need to start logging my application in the Windows Event Log. I
found some sample code and it works from a Windows Form. So I put it
into my asp.net application and initially had a problem that I found I
just needed to create a registry key as outlined in this kb article:
http://support.microsoft.com/default...b;en-us;329291

So now I get a log entry in my event log, and the entry I specified in
the code was: "Invoke called, WebService = False" but in the log I see
all this text, which then ends with what I actually specified in code.

The description for Event ID ( 0 ) in Source ( eCommerce ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: Invoke called, WebService = False.

I found some references to other having this issue but no answers.
Anyone know what I need to do to fix this? Thanks!

The code I'm using is this:

Try
'Register the App as an Event Source
If Not objEventLog.SourceExists(AppName) Then

objEventLog.CreateEventSource(AppName, LogName)
End If

objEventLog.Source = AppName

'WriteEntry is overloaded; this is one
'of 10 ways to call it
objEventLog.WriteEntry(Entry, EventType)
Return True
Catch Ex As Exception
Return False
End Try

Thanks,
Matt

Mar 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sebastian Kemi | last post by:
How should a write a class to a file? Would this example work: object *myobject = 0; tfile.write(reinterpret_cast<char *>(myobject), sizeof(*object)); / sebek
385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
7
by: Moti | last post by:
Hi all I use C# to read messages from msmq queue. When I knew that it is writing in c# I can read it. When I knew that it is writing in VB6 I can read it. How can I know in which format the...
0
by: Gazelle | last post by:
I have a dilemma, that I am hopping I can find some help with. He is the back story so everyone sort of understands what it is that I am trying to accomplish. My problem: I have multiple...
19
by: Noozer | last post by:
I need to keep my application settings in a file that users can copy/backup/etc. Before I start using the old INI file standard, is there any easy way to use XML files to hold application...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
6
by: JeffDotNet | last post by:
Writing to a registered source in the Application event log I have an asp.net framework 2.0 app that I created on a winxp machine and now I am deploying it to IIS6 on a win server2003 machine. ...
20
by: Vincent Delporte | last post by:
Hello I'm about to write a prototype for a business application, but since this my first real web application, I'm looking for a good book or article that sums up the different issues web...
0
by: talk2pk | last post by:
When i am writing the images to the word file(using Clipboard.SetImage) and open another word doc, the process of writing those images migrates to the new opened document. Can anybody suggest why...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.