Re: EventLog access through ASP.Net app.
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 11/26/03
- Next message: Joseph B - Houston, TX: "Re: Setting the Key value"
- Previous message: Pent: "Re: Catch security exception"
- In reply to: JimN: "EventLog access through ASP.Net app."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 25 Nov 2003 17:48:30 -0600
Generally, the ASPNET account has rights to write to the event log. The
problem is that since ASPNET is just a user, it cannot create new event logs
or event sources. I've also seen it fail when it tries to verify that the
event source exists, so calling that method might not work either.
What I usually do is make sure the event log source is installed when the
website is deployed (by an administrator), and then just write to the event
source from your code without bothering to check if the source exists.
I don't think the sandboxing approach will likely work because this is
probably a user identity problem, not a Code Access Security problem unless
you have the website running with less than Full Trust.
I also don't think that doing impersonation is necessary if you just create
the event source at deployment time.
HTH,
Joe K.
"JimN" <anonymous@discussions.microsoft.com> wrote in message
news:015b01c3b38d$79d41a50$a501280a@phx.gbl...
> I ahve an ASP.Net app for which I want to be able to log
> events to the Windows 2000 server event log under a special
> log name. I encountered the initial security exceptionwhen
> I first tried this in code and then did some research on
> the subject. I think I've found two seperate ways to
> accomplish what I want to do:
> 1. Use "sandboxing" by writing a class library in a
> strong-named assembly that I install in the GAC which I
> then call into from my ASP.Net app.
> 2. Use wrapped Win32 API calls to perform impersonation,
> which, I understand, requires that I grant "Act as Part of
> Operating system" priviledge to the ASPNET user.
>
> Which do the users of this group suggest I use for the best
> security and portability to other, possibly new, Windows
> servers?
- Next message: Joseph B - Houston, TX: "Re: Setting the Key value"
- Previous message: Pent: "Re: Catch security exception"
- In reply to: JimN: "EventLog access through ASP.Net app."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|