logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Unhandled exception!
Date Mon, 20 Feb 2006 03:47:48 GMT
It looks like you need to change a config file somewhere to grant
log4net permission to write to the file system.

Do you get this exception when you try to create and write to files
within your own application?

--- Morten Andersen <morten@vianett.no> wrote:

> 
>     /Security Exception/
> 
> *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: Request for
> the 
> permission of type 'System.Security.Permissions.FileIOPermission, 
> mscorlib, Version=2.0.0.0, Culture=neutral, 
> PublicKeyToken=b77a5c561934e089' failed.
> 
> Line 78: this.log = log4net.LogManager.GetLogger(logfilename);
> 
> ||
> 
> [SecurityException: Request for the permission of type
> 'System.Security.Permissions.FileIOPermission, mscorlib,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> failed.]
>    System.Security.CodeAccessSecurityEngine.Check(Object demand,
> StackCrawlMark& stackMark, Boolean isPermSet) +0
>    System.Security.CodeAccessPermission.Demand() +59
>    System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
> +110
>    System.AppDomain.get_BaseDirectory() +61
>    log4net.Util.SystemInfo.get_ApplicationBaseDirectory() +31
>    log4net.Config.XmlConfiguratorAttribute.Configure(Assembly
> sourceAssembly, ILoggerRepository targetRepository) +30
>   
> log4net.Core.DefaultRepositorySelector.ConfigureRepository(Assembly
> assembly, ILoggerRepository repository) +314
>    log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly
> repositoryAssembly, Type repositoryType, String repositoryName,
> Boolean readAssemblyAttributes) +532
>    log4net.Core.DefaultRepositorySelector.CreateRepository(Assembly
> repositoryAssembly, Type repositoryType) +42
>    log4net.Core.DefaultRepositorySelector.GetRepository(Assembly
> repositoryAssembly) +80
>    log4net.Core.LoggerManager.GetLogger(Assembly repositoryAssembly,
> String name) +132
>    log4net.LogManager.GetLogger(Assembly repositoryAssembly, String
> name) +30
>    log4net.LogManager.GetLogger(String name) +34
>       
> 
> 
> -- 
> 
> Best Regards
> *Morten Andersen*
> Developer
> Vianett AS <http://www.vianett.no/> | morten@vianett.no 
> <mailto:morten@vianett.no> | Office: +47 69 20 69 74 
> <callto://+4769206974> | Skype: mortander <callto://mortander>
> 
> 


Mime
View raw message