支持Medium Trust和POCO的.Net 3.5 ORM
场景:我被一个以中等信任度运行且具有 .Net Framework 3.5 的共享托管提供商所困扰。
我使用 Nhibernate 为我的网站构建了一个数据层,却发现它无法以中等信任度运行。
我在互联网上找到了一些指南,解释了如何下载 Castle.Core 和 NHibernate 源代码并重建它们以允许部分信任,但我遇到了各种问题(所有源代码都已更新到 .net 4.0,尽管我知道我可以浏览 git 存储库以查找旧提交,对我来说就像大海捞针一样)。
我现在需要的是一个支持中等信任和 POCO 的 ORM(因此排除了 EF 1.0 和 Linq to Sql,因为它们与 T4 生成的类紧密耦合)。
我还从更高的地方得到了关于使用 Lightspeed ORM 的“否”,因为它的免费版本仅限于 8 个表,并且架构可能会增长。
我知道我问了很多,但如果有人知道已经构建的 Nhibernate 3.5 版本可以在中等信任度下运行,或者是一个有效的替代方案,我会非常高兴。
谢谢。
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 because 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我目前正在中等信任环境中使用 NHibernate 3.0 运行一个项目。我必须下载城堡源代码并设置AllowPartiallyTrustedCallers,然后重新编译。
然后一切都很完美。我目前正在测试 3.2,并将在本周晚些时候让您知道结果。
如果您愿意,我可以向您发送修改后的 DLL,但请在 Twitter 上给我发送一条私信。使用我的 SO 名称和 @ 符号。
我还回答过这个之前
另外一点,我会要求您的托管公司向您发送修改后的介质信任策略文件,然后在您的网络配置中引用它,如下所示:-
这样您就可以在本地进行测试。
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:-
This way you can test locally.