.Net 3.5 ORM that supports Medium Trust and POCOs
Scenario: I'm stuck with a shared hosting provider that runs in medium trust and has .Net framework 3.5
I've built a datalayer for my site using Nhibernate, only to discover that it can't run on medium trust.
I found some guides on the internet that explain to download Castle.Core and NHibernate sources and rebuild them allowing partial trust, but I'm runnin in all sort of problems (all sources got updated to .net 4.0, and although I know I can browse git repos for old commits, it seems like finding a needle in a haystack to me).
What I need now is an ORM that supports medium trust AND POCOs (so EF 1.0 and Linq to Sql are ruled out, as they are tightly coupled to their T4 generated classes).
I also got a "NO" from higher places about using Lightspeed ORM b开发者_开发百科ecause it's limited to 8 tables for the free version and the schema might grow.
I know I am asking a lot, but if anyone knows an already built release of Nhibernate for 3.5 that can run in medium trust, or a valid alternative, I'd be more than happy.
Thanks.
I am currently running a project with NHibernate 3.0 in a medium trust environment. I had to download the castle source and set AllowPartiallyTrustedCallers
and then recompiled.
Everything then works perfectly. I am in the process of testing with 3.2 at the moment and will let you know the outcomes later this week.
I can ping you the modified DLL's if you like but please send me a dm on twitter. Use my SO name with the @ symbol.
I have also answered this before
One other point, I would ask your hosting company to send you their modified medium trust policy file and then in your web config you reference it like:-
<securityPolicy>
<trustLevel name="Custom" policyFile="policy.config"/>
</securityPolicy>
This way you can test locally.
精彩评论