NHibernate 和共享网络托管
有没有人能够在共享网络主机上启动并运行基于 NHibernate 的项目?
NHibernate 在幕后用反射做了很多奇特的事情,但我目前使用的主机只允许应用程序以中等信任度运行,这限制了你可以用反射做的事情,并且它会带来各种安全性权限错误。 即使我只在映射文件中使用公共属性,但我确实有一些定义为代理的类,情况就是如此。
哪些公司提供体面(且价格合理)的网络托管,使 NHibernate 能够毫无抱怨地运行?
更新:从这些答案看来(以及我的实验 - 对不起 Ayende,但即使在浏览了您链接到的文章之后,我仍然无法让它在我的网络主机上工作)是选择明智地选择您的托管提供商并货比三家。 看来WebHost4Life在这方面还不错。 但是,有人尝试过 NHibernate 与 Windows 共享主机以及 1and1 吗? 我已经在他们那里有一个 Linux 帐户,并且我在这方面相当满意,如果我能让 NHibernate 与 Windows 无缝工作,我可能会坚持使用它们。
Has anyone been able to get an NHibernate-based project up and running on a shared web host?
NHibernate does a whole lot of fancy stuff with reflection behind the scenes but the host that I'm using at the moment only allows applications to run in medium trust, which limits what you can do with reflection, and it's throwing up all sorts of security permission errors. This is the case even though I'm only using public properties in my mapping files, though I do have some classes defined as proxies.
Which companies offer decent (and reasonably priced) web hosting that allows NHibernate to run without complaining?
Update: It seems from these answers (and my experimentation -- sorry Ayende, but I still can't get it to work on my web host even after going through the article you linked to) is to choose your hosting provider wisely and shop around. It seems that WebHost4Life are pretty good in this respect. However, has anyone tried NHibernate with Windows shared hosting with 1and1? I have a Linux account with them already and I'm fairly satisfied on that front, and if I could get NHibernate to work seamlessly with Windows I'd probably stick with them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在 WebHost4Life 上运行基于 NHibernate 的应用程序没有任何问题,尽管我不喜欢它们。
让 NHibernate 在中等信任度上运行是可能的。 有关如何完成此操作的完整说明可在此处找到:
http://blechie.com/WPierce/archive/2008/02/17/Lazy-Loading-with-nHibernate-Under-Medium-Trust.aspx
I have had no issues with running NHibernate based apps on WebHost4Life, although I don't like them.
Getting NHibernate to run on medium trust is possible. A full description on how this can be done is found here:
http://blechie.com/WPierce/archive/2008/02/17/Lazy-Loading-with-nHibernate-Under-Medium-Trust.aspx
我在 dailyrazor.com< 上运行了我自己的极客站点 N2(使用 NHibernate 和 Windsor Castle)和 4 个 NHibernate/Fluent 项目/a> 一段时间。
您每月只需 5 美元即可获得优惠,包括无限的 SQL Server 数据库和子域,并且它在 Plesk 上运行,具有 FTP 和远程 SQL Server Management Studio 访问权限。
I ran my my own geek siteoff N2 (which uses NHibernate and Windsor Castle) and 4 pet NHibernate/Fluent projects on dailyrazor.com for a while.
You get a good deal for $5 a month, including unlimited SQL Server databases and subdomains and it runs off Plesk with FTP and remote SQL Server Management Studio access.
我正在使用一个名为 Nebula 的芬兰主机,它可以愉快地运行我的 NHibernate 应用程序。 我曾经遇到过信任级别的问题; 主机上的 machine.config 配置为拒绝反射,但我在 web.config 中成功覆盖了它。
I'm using a Finnish host called Nebula that happily runs my NHibernate-leveraging applications. I had an issue once with trust levels; the machine.config on the host was configured to deny reflection but I successfully overrode it in the web.config.