Hi Brock,
Thanks for your time,
I have created the entries in an installer class with CreateEventSource
like:
EventLog.CreateEventSource ( "MyLog", "MyLog" );
So the entries in the registry are there, but when i try to write to them in
the webservice with:
EventLog Log = new EventLog();
Log.Log = "MyLog";
Log.Source = "MyLog";
Log.WriteEntry ( ... );
Then i get the Exception, doing that in the installer works just fine, also
to my own source in the Application log works fine.
Any more suggestions?
Richard.
"Brock Allen" <> schreef in bericht
news: ...
> When you try to write to an event log application that's not been
> registered, the API tries to create the approproate registry entry. The
> ASP.NET worker process identity doesn't have permissions to do that. You
> need to call EventLog.CreateEventSource from an administrative account
> first.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>> 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.
>
>
>