Can I use NHibernate on GoDaddy?

寵の児 提交于 2019-11-30 07:16:49

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

Mauricio Scheffer

There are many questions already on SO dealing with NHibernate + medium trust:

Bottom line: use a compile-time proxy generator.

Yes you can, try edit web.config file.

<system.web>
    <trust level="Full" />
</system.web>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!