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.