Re: EventLogPermission via caspol.exe
From: Nicole Calinoiu (calinoiu)
Date: 04/27/05
- Next message: S Hayes: "Re: Access Denied executing Batch File from CreateProcessAsUser"
- Previous message: Matt: "Re: Deny access to a directory with web.config"
- In reply to: Mark A. Richman: "EventLogPermission via caspol.exe"
- Next in thread: Mark A. Richman: "Re: EventLogPermission via caspol.exe"
- Reply: Mark A. Richman: "Re: EventLogPermission via caspol.exe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 27 Apr 2005 08:08:40 -0400
Mark,
What trust level is set for ASP.NET on your machine? (You can check this is
in the %WINDIR%\Microsoft.NET\Framework\v2.0.<build>\CONFIG\web.config
file.) If it's not full trust, then you'll need to ensure that both your
ASP.NET application and your other assembly are granted the necessary
EventLogPermission under the policy specified in the appropriate
web_<level>trust.config file.
That said, writing to the event log from a web application is not
necessarily such a wonderful idea in the first place. If feasible, it might
be a better solution to log to a different target rather than adjusting your
application's permissions to allow writing to the event log.
HTH,
Nicole
"Mark A. Richman" <nospam@nospam.com> wrote in message
news:eGzLovqSFHA.3640@TK2MSFTNGP14.phx.gbl...
> I am getting an EventLogPermission exception when calling my assembly from
> an ASP.NET 2.0 app. I tried setting the assembly to FullTrust via
> caspol.exe, but I still get this exception. Any ideas? I am loading the
> web app and assemblies over UNC.
-- MARK RICHMAN
- Next message: S Hayes: "Re: Access Denied executing Batch File from CreateProcessAsUser"
- Previous message: Matt: "Re: Deny access to a directory with web.config"
- In reply to: Mark A. Richman: "EventLogPermission via caspol.exe"
- Next in thread: Mark A. Richman: "Re: EventLogPermission via caspol.exe"
- Reply: Mark A. Richman: "Re: EventLogPermission via caspol.exe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|