Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use NHibernate on GoDaddy?

A comment from .Net Hosting (Flexible Medium Trust) says.

Godaddy is medium trust, which means that u can't use stuff like IL emit(Nhibernate needs this for proxying)

Is it true? Is there anyone using NHibernate on GoDaddy?

like image 833
AAP Avatar asked Jan 28 '11 05:01

AAP


1 Answers

I have successfully run Nhibernate 2.1 and now 3 in a medium trust environment. The only thing I had to do for NH3 was to download Castle source and modify the CommonAssemblyInfo.cs file so that Partially trusted callers is enabled.

You will need to reference the compiled castle dll's into NHibernates source and rebuild. You can reference all the compiled dll's into your project and viola.

[assembly: AllowPartiallyTrustedCallers()]

Everything else works great including proxies.

Additional -> it should be noted that I run this on Rackspace Cloud Medium trust levels and not on Go Daddy but I suspect/hope that it should be the same!

Edit To run nHibernate 3.2 in medium trust environments please see this link or this one

like image 82
Rippo Avatar answered Sep 26 '22 04:09

Rippo