[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Thomas Gan

1/10/2003 8:08:00 PM

Hi,

The I can call EventLog.SourceExists() and EventLog.CreateEventSource()
function in windows application. But when I call them in Web Service, it
give me exception "Requested registry access is not allowed.". What
permisstion I should give to the registry key. Please help.

/Thomas


1 Answer

Pierre Greborio

1/11/2003 12:01:00 AM

0

The current user doesn't have privileges to do that, since you need to write
on the registry a new entry. It is avoided to elevate the privileges for the
aspnet user, then I suggest to create your event source in an installer and
then write the events (for this last operation you have enought privileges).
A good sample how to solve the problem can be found here
http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetch08.a...
rue#accessingsystemresources


Pierre
--
--------------------------------------------------------------
UgiDotNet
http://www.ugi...
--------------------------------------------------------------
"Thomas Gan" <thomas.gan@am1.ericsson.se> wrote in message
news:avn50k$3l7$1@newstoo.ericsson.se...
> Hi,
>
> The I can call EventLog.SourceExists() and EventLog.CreateEventSource()
> function in windows application. But when I call them in Web Service, it
> give me exception "Requested registry access is not allowed.". What
> permisstion I should give to the registry key. Please help.
>
> /Thomas
>
>