Hi All,
I'm writing an webservice and want to log errors etc. and thoughed the
Eventlog would be a nice place for it. The problem is that i can't seem to
write to my own log and source i'm getting ' Requested registry access is
not allowed ' i have set the asp.net account to have permission on the
registry entries but that doesn't help a bit. Writing to the Application log
with my own source works just fine. But i want my own log so not to flood
the Applications one!
what can i do about that? any suggestions?
Hopes someone can help me out,
Richard. 4 1799
Hi Richard,
Are you using System.Diagnostics? If not....
Try using the System.Diagnostics event log handlers to output to an Event
log. This should allow you to either specify an existing log to write to or
create a new one, and also will give you listeners etc. to manipulate output
tp the logs.
HTH,
Steve.
"Richard Heesbeen" wrote: Hi All,
I'm writing an webservice and want to log errors etc. and thoughed the Eventlog would be a nice place for it. The problem is that i can't seem to write to my own log and source i'm getting ' Requested registry access is not allowed ' i have set the asp.net account to have permission on the registry entries but that doesn't help a bit. Writing to the Application log with my own source works just fine. But i want my own log so not to flood the Applications one!
what can i do about that? any suggestions?
Hopes someone can help me out, Richard.
Hi Richard,
Are you using System.Diagnostics? If not....
Try using the System.Diagnostics event log handlers to output to an Event
log. This should allow you to either specify an existing log to write to or
create a new one, and also will give you listeners etc. to manipulate output
tp the logs.
HTH,
Steve.
"Richard Heesbeen" wrote: Hi All,
I'm writing an webservice and want to log errors etc. and thoughed the Eventlog would be a nice place for it. The problem is that i can't seem to write to my own log and source i'm getting ' Requested registry access is not allowed ' i have set the asp.net account to have permission on the registry entries but that doesn't help a bit. Writing to the Application log with my own source works just fine. But i want my own log so not to flood the Applications one!
what can i do about that? any suggestions?
Hopes someone can help me out, Richard.
Hi Steve,
Thanks for your time,
I use the following code in the webservice:
using System.Diagnostics;
EventLog Log = new EventLog();
Log.Log = "MyLog";
Log.Source = "MyLog";
Log.WriteEntry ( ... );
Is this ok? Or i'm i doing something wrong here?
Richard.
"Steve" <St***@discussions.microsoft.com> schreef in bericht
news:63**********************************@microsof t.com... Hi Richard,
Are you using System.Diagnostics? If not....
Try using the System.Diagnostics event log handlers to output to an Event log. This should allow you to either specify an existing log to write to or create a new one, and also will give you listeners etc. to manipulate output tp the logs.
HTH, Steve.
"Richard Heesbeen" wrote:
Hi All,
I'm writing an webservice and want to log errors etc. and thoughed the Eventlog would be a nice place for it. The problem is that i can't seem to write to my own log and source i'm getting ' Requested registry access is not allowed ' i have set the asp.net account to have permission on the registry entries but that doesn't help a bit. Writing to the Application log with my own source works just fine. But i want my own log so not to flood the Applications one!
what can i do about that? any suggestions?
Hopes someone can help me out, Richard.
Hi Steve,
Thanks for your time,
I use the following code in the webservice:
using System.Diagnostics;
EventLog Log = new EventLog();
Log.Log = "MyLog";
Log.Source = "MyLog";
Log.WriteEntry ( ... );
Is this ok? Or i'm i doing something wrong here?
Richard.
"Steve" <St***@discussions.microsoft.com> schreef in bericht
news:63**********************************@microsof t.com... Hi Richard,
Are you using System.Diagnostics? If not....
Try using the System.Diagnostics event log handlers to output to an Event log. This should allow you to either specify an existing log to write to or create a new one, and also will give you listeners etc. to manipulate output tp the logs.
HTH, Steve.
"Richard Heesbeen" wrote:
Hi All,
I'm writing an webservice and want to log errors etc. and thoughed the Eventlog would be a nice place for it. The problem is that i can't seem to write to my own log and source i'm getting ' Requested registry access is not allowed ' i have set the asp.net account to have permission on the registry entries but that doesn't help a bit. Writing to the Application log with my own source works just fine. But i want my own log so not to flood the Applications one!
what can i do about that? any suggestions?
Hopes someone can help me out, Richard. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Crea-Ue. Kirdar |
last post by:
hi there,
i am out of ideas what to do with that eventlog-things. it seems,
that the implementation of the eventlog-support in dotnet is really
poor. however, here are the problems i have at the...
|
by: timb |
last post by:
Hi,
am creating a windows service using c# and would like it to create a
new eventlog logtype and add it to the eventlog viewer so that i can log all
messages relating to this application to this...
|
by: Next |
last post by:
Hello all,
I have a windows service that was suppose to write some events into its own
EventLog.
I created the EventLog using the component on VS 2003 toolbar
Added an installer for it.
Set...
|
by: pthawkes |
last post by:
Hello.
I am using win2k3 server and the
Microsoft.ApplicationBlocks.ExceptionManagement. I am trying to write an
exception to the eventlog. I have given permissions to the registry that are...
|
by: Paperback Writer |
last post by:
Hi, I'm trying to write a eventlog in my Application_Error but does not work
I tryed by using SmtpMail and worked fine, but the EventLog not! =dgroh@ctf.com.br
|
by: martin |
last post by:
Hi,
I'm having some problems with the System.Diagnostics.EventLog class in .NET
2.0
I need to recreate an event message source inside a new log but the messages
keeps ending up in the old...
|
by: Ben |
last post by:
I am trying to write an eventlog monitor. I am using the sample code
provided by VB2005 SDK as the bases for my application. I need to monitor
all three logs (application, system, and security)....
|
by: rene |
last post by:
I'm trying to use costome categories in my eventlog for a program I'm
writing.
But I have some problems with it, I cant get it to work. Checklist for
how I did this.
1. Created a...
|
by: Jeff |
last post by:
hi
..Net 2.0
I've created the code below and think I've executed it. After I thought I've
executed it I checked in EventLog on the computer (win2k3) and no entry was
added. This could mean 2...
|
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: 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: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
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: 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,...
|
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,...
| |