Hello,
my ASP .NET web application runs perfectly on my laptop, and I'm impressed by the functionality NHibernate offers.
Unfortunately, on my shared webspace (hosted by 1&1 Germany), I got a SecurityException. I recompiled NHibernate manually and copied all debug symbols. Suddenly it seemed to work! But then I got a SecurityException again somewhere else. This time I managed to obtain a stack trace:
Code:
System.Security.SecurityException: Security error.
at NHibernate.Cfg.Configuration.SecondPassCompile()
at NHibernate.Cfg.Configuration.BuildSessionFactory() in [...]\NHibernate\Cfg\Configuration.cs:line 896
Log4net doesn't work either, only locally.
According to my hoster's German
FAQ, it is very likely that this is due to an assembly with a strong name lacking the
AllowPartiallyTrustedCallers attribute.
And indeed, this would make sense to me:
I recompiled the NHibernate assembly manually (and had to remove the signing directive), thereby removing its strong name (I guess) -> suddenly it worked.
Later one, a dependency (Castle.DynamicProxy or something else) was loaded by NHibernate, which had a strong name - but no AllowPartiallyTrustedCallers attribute.
Log4net themselves
added that attribute in the beginning of 2004.
Could you please add this attribute, also in the dependencies?
Or is there a different solution?
Regards,
Marvin