NHibernate 和共享网络托管 [英] NHibernate and shared web hosting

查看:46
本文介绍了NHibernate 和共享网络托管的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人能够在共享网络主机上启动并运行基于 NHibernate 的项目?

Has anyone been able to get an NHibernate-based project up and running on a shared web host?

NHibernate 在幕后用反射做了很多花哨的事情,但我目前使用的主机只允许应用程序在中等信任度下运行,这限制了你可以用反射做的事情,而且它正在抛出所有各种安全权限错误.即使我只在映射文件中使用公共属性,情况也是如此,尽管我确实将一些类定义为代理.

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.

哪些公司提供体面(且价格合理)的网络托管,使 NHibernate 可以毫无怨言地运行?

Which companies offer decent (and reasonably priced) web hosting that allows NHibernate to run without complaining?

更新:从这些答案看来(以及我的实验——抱歉 Ayende,但即使阅读了您链接到的文章,我仍然无法在我的网络主机上使用它)是明智地选择您的托管服务提供商并货比三家.看来 WebHost4Life 在这方面做得还不错.但是,有没有人尝试过 NHibernate 与 1and1 的 Windows 共享主机?我已经在他们那里有一个 Linux 帐户,我在这方面相当满意,如果我能让 NHibernate 与 Windows 无缝协作,我可能会坚持使用它们.

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.

推荐答案

我在 WebHost4Life 上运行基于 NHibernate 的应用程序时没有遇到任何问题,尽管我不喜欢它们.

I have had no issues with running NHibernate based apps on WebHost4Life, although I don't like them.

让 NHibernate 以中等信任度运行是可能的.有关如何完成此操作的完整说明,请参见此处:

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

这篇关于NHibernate 和共享网络托管的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆