I'm getting the following error after a migration to shared hosting on godaddy.com
[SecurityException: Request failed.] System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150 System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100 System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +284 System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69 System.Security.PermissionListSet.CheckSetDemand(Permiss
The application was built using NHibernate and MVC 1.0 (I assume GoDaddy has support for MVC if I have a copy of System.Web.Mvc in the bin directory ...
To get NHibernate working in med trust I have done the following:
Added "requirePermission = false like so
<section name="hibernate-configuration" requirePermission="false" type="NHibernate.Cfg.Config
Added the reflection opt = false like so
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<reflection-optimizer use="false"/>
<session-factory>
<property name="conne
And finally - altered each *.hbm.xml file to kill lazy loading like so
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
<class name="Entit
Anything I'm missing here? For some reason I can't seem to find something I missing ...
Edit
I also added the following to both the MVC project and the class libraries I included (that I compiled - not including NHibernate/etc)
[assembly:AllowPartiallyTrustedCallers]
Update **
After learning this I decided to switch to a host that allowed full trust and so far I'm having good luck with this one.
The only complaint I have currently is that they are running IIS 6