views:

1010

answers:

4

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.

+2  A: 

I've sent this link to Ayende - hopefully he'll have something to say...

Rob Conery
A: 

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.

theiterator
+11  A: 

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

Ayende Rahien
+1  A: 

I'm running my own geek site off N2 (which uses NHibernate and Windsor Castle) and 4 pet NHibernate/Fluent projects on dailyrazor.com.

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.

Chris S