All Krzysztof changed was only making the default logger a trace logger if you have permission to use the TraceLogger. You can still provide your own logger to a ProxyGenerator no matter if you have permissions to use the TraceLogger. If you are running the application in medium trust it is very unlikely that it is running with Visual Studio, so you wouldn't see the trace messages anyway.
On Tue, Dec 22, 2009 at 8:37 PM, Sidar Ok <[email protected]> wrote: > But that's not good. > > Now if I don't have enough permissions, it will fail silently with no logs. > I don't want that, I want to have my logging by default, and when I have a > logger, I want to see what's wrong with it. > > Am I missing something ? > > Sidar > > 2009/12/21 Krzysztof Koźmic <[email protected]> > > Ok, >> >> I added a check which queries for required permissions, and if not >> available, it'll fallback to nulllogger. >> It's in the trunk of Dynamic Proxy now, so after updating and rebuilding >> with APTCA you should be ready to roll. >> >> Let us know if you find any issues! >> >> Krzysztof >> >> On 2009-12-21 20:33, Naz wrote: >> > Hi >> > I'm having Issues with Castle.Core when using Castle.Windsor under >> > Medium Trust even after building trunk with >> > AllowPartiallyTrustedCallers >> > >> > It seems to be coming from Castle.Core.Logging.TraceLogger.Initialize >> > () >> > >> > 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.SecurityPermission, >> > mscorlib, Version=2.0.0.0, Culture=neutral, >> > PublicKeyToken=b77a5c561934e089' failed. >> > >> > Source Error: >> > >> > An unhandled exception was generated during the execution of the >> > current web request. Information regarding the origin and location of >> > the exception can be identified using the exception stack trace below. >> > >> > Stack Trace: >> > >> > [SecurityException: Request for the permission of type >> > 'System.Security.Permissions.SecurityPermission, mscorlib, >> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >> > failed.] >> > Castle.Core.Logging.TraceLogger.Initialize() +0 >> > Castle.Core.Logging.TraceLogger..ctor(String name, LoggerLevel >> > level) +62 >> > Castle.DynamicProxy.ProxyGenerator..ctor(IProxyBuilder builder) >> > +107 >> > Castle.DynamicProxy.ProxyGenerator..ctor() +67 >> > Castle.Windsor.Proxy.DefaultProxyFactory.Init() +57 >> > Castle.Windsor.Proxy.DefaultProxyFactory..ctor() +53 >> > Castle.Windsor.WindsorContainer..ctor(String name, IKernel kernel, >> > IComponentsInstaller installer) +458 >> > Castle.Windsor.WindsorContainer..ctor(IKernel kernel, >> > IComponentsInstaller installer) +101 >> > Castle.Windsor.WindsorContainer..ctor() +91 >> > SharpCommerce.Web.MvcApplication.InitializeServiceLocator() +100 >> > SharpCommerce.Web.MvcApplication.Application_Start() +51 >> > >> > -- >> > >> > You received this message because you are subscribed to the Google >> Groups "Castle Project Users" group. >> > To post to this group, send email to >> [email protected]. >> > To unsubscribe from this group, send email to >> [email protected]<castle-project-users%[email protected]> >> . >> > For more options, visit this group at >> http://groups.google.com/group/castle-project-users?hl=en. >> > >> > >> > >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Castle Project Users" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<castle-project-users%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/castle-project-users?hl=en. >> >> >> > > > -- > Sidar Ok > > http://www.sidarok.com > http://www.twitter.com/sidarok > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]<castle-project-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > -- Jono -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
