Write to EventLog from asp.net

A

Anders Both

How can I write to System.Diagnostics.EventLog from within the asp.net
process.

When I try to do it, I get the Message Below

Best Regards Anders Both

ErrorMessage:

Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Requested registry
access is not allowed.
 
K

Kevin Spencer

It means that the account under which you're running ASP.Net doesn't have
permission to access the Event Log for writing. You have 2 choices:

1. Change the account under which ASP.Net runs to one that has permission
2. Grant permission to the ASP.Net acocunt that you are currently using

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Kevin Spencer

Yes but how do you do that in an easy way.
Is it nessesary to takes all the steps in this artickle. It sound a little
complicated i think.

Well, by the time you read this replay it will have been about 14 hours
since you asked it. Do you think following the steps in that article would
have taken you 14 hours?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top