Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NHibernate and shared web hosting

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.

like image 306
jammycakes Avatar asked Dec 10 '22 23:12

jammycakes


2 Answers

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

like image 188
Ayende Rahien Avatar answered Jan 13 '23 23:01

Ayende Rahien


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.

like image 20
Chris S Avatar answered Jan 13 '23 23:01

Chris S