Eventlog problems | | |
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. | | | | re: Eventlog problems
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:
[color=blue]
> 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.
>
>
>[/color] | | | | re: Eventlog problems
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:
[color=blue]
> 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.
>
>
>[/color] | | | | re: Eventlog problems
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" <Steve@discussions.microsoft.com> schreef in bericht
news:63C8EA3C-2346-4034-A36F-B6F282E5A4EB@microsoft.com...[color=blue]
> 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:
>[color=green]
>> 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.
>>
>>
>>[/color][/color] | | | | re: Eventlog problems
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" <Steve@discussions.microsoft.com> schreef in bericht
news:63C8EA3C-2346-4034-A36F-B6F282E5A4EB@microsoft.com...[color=blue]
> 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:
>[color=green]
>> 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.
>>
>>
>>[/color][/color] |  | Similar .NET Framework bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,439 network members.
|