For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > March 2004 > Re: Event logging permissions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Event logging permissions
Alex

2004-03-31, 10:43 am

This might be useful for you.

http://support.microsoft.com/defaul...Ben-us%3B329291


"Andy Rose" <anonymous@discussions.microsoft.com> wrote in message
news:3C5A648E-D9CC-4FB2-98A0-2CA4DD5EBAFF@microsoft.com...
> I have been looking at tutorials on event logging and utilising the

EventLog class. The code shown in these tutorials will typically be as shown
below:
>
> EventLog ev = new EventLog();
> ev.Log = "Application";
> ev.Source = "Test";
> ev.WriteEntry("test entry");
>
> When I try and run this on my own development environment however I get an

exception thrown stating that "Requested registry access is not allowed.". I
can get round this by making giving the ASPNET user administrator rights. A
similar exception is thrown if I try and use the static methods
'SourceExists' or 'CreateEventSource'.
> Is making ASPNET an administrator required for this to work or is there

another permission setting that I am missing.
>
> Regards, Andy



Andy Rose

2004-03-31, 11:46 am

Thank you Alex, this article has confirmed what I believed what was happening. It's just a little unnerving that books that descibe themselves as teaching 'Professional ASP.NET' and 'MCAD/MSCD' tutorials do not make any reference to this but instead imply
that ASP.NET will happily create new Event log sources without any problems. Anyway rant over and thanks for your help.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com