Re: EventLogPermission via caspol.exe

From: Nicole Calinoiu (calinoiu)
Date: 04/27/05


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 


Relevant Pages

  • Re: EventLogPermission via caspol.exe
    ... What trust level is set for ASP.NET on your machine? ... writing to the event log from a web application is not ... > web app and assemblies over UNC. ...
    (microsoft.public.dotnet.security)
  • Re: EventLogPermission via caspol.exe
    ... at System.Diagnostics.EventLog.SourceExists(String source, String machineName) ... writing to the event log from a web application is not ... "Mark A. Richman" wrote in message ... > web app and assemblies over UNC. ...
    (microsoft.public.dotnet.security)
  • Re: EventLogPermission via caspol.exe
    ... at System.Diagnostics.EventLog.SourceExists(String source, String machineName) ... writing to the event log from a web application is not ... "Mark A. Richman" wrote in message ... > web app and assemblies over UNC. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Cannot debug interop
    ... > to verify this by writing to the event log from within CallFoo(). ... > - the assembly containing the component references other assemblies. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: EventLogPermission via caspol.exe
    ... moving the code back over to UNC produces this exception again: ... "Nicole Calinoiu" wrote in message news:uR67Uz%23SFHA.2916@TK2MSFTNGP15.phx.gbl... ... > I am loading the web app and assemblies over UNC. ... writing to the event log from a web application is not ...
    (microsoft.public.dotnet.security)