Location > Blog

Posts From November, 2011

Running Lucene.Net under Medium Trust

I'm in the middle of moving a web application from a Full Trust environment to a Medium Trust environment. There was all sorts of things that wouldn't work under Medium Trust as they did under Full Trust. I updated the version of Lucene.Net I was using to Lucene.Net 2.9.2. Of course it would work out of the box.

Problem getting log4net 1.2.10 working with ASP.Net 4

Just a quick note on getting log4net 1.2.10 working with ASP.Net 4. I had been working with log4net version 1.2.10.0 in ASP.Net 3.5 and it had been working but after upgrading the project to ASP.NET 4 I noticed an odd behavior. It would log only one message to the log file and refused to log any further messages until the application was restarted.

NHibernate with logging throws a Security Exception under Medium Trust

I am using NHibernate 3.2.0 under medium trust and all was going well until I turned on logging to try and trace a SQL error. It seems that when you set the log4net logging level to INFO that under a medium trust NHibernate throws a Security Exception. You can see from the stack trace exactly where the error was occurring, its quite clear. In the NHibernate source the static constructor for the Environment you can see that the NHibernate Version is logged, I was picking that is where the the error was occurring.