Problems with Fluentnhibernate in hosting

Asked

Viewed 199 times

1

I have developed a website in c# that is still in the testing phase, using . Netframework 4.0 and MVC 4

I’m using Nhibernate and Fluentnhibernate to map my entities.

The site works perfectly on any computer I set up the IIS.

But I hired a hosting that is Uolhost, and I am facing problems with the message below when accessing a controller that establishes connection to the database:

Inheritance security rules violated while overriding member: 'FluentNHibernate.Cfg.FluentConfigurationException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security Accessibility of the Overriding method must match the security Accessibility of the method being overriden.

It’s the first time I’m hosting a website in this type of environment

If I debug my project on my computer, pointing to the Uolhost hosting database works too, ie my Webconfig so far is correct

I’ll be grateful for your help

  • You managed to solve this problem ? How did ?

1 answer

1

This host is probably not configured to operate on Full Trust Level. Law on [Security Changes in the . NET Framework 4][1] and [Security Transparent Code, Level 2][2] in the MSDN for further information.

There is a way to make Nhibernate operate at Medium Trust Level and requires some additional settings. Take a look at the links below:

http://puredotnetcoder.blogspot.co.uk/2011/09/update-nhibernate-32-and-medium-trust.html

http://puredotnetcoder.blogspot.co.uk/2011/08/nhibernate-32-and-medium-trust.html

http://nhibernate.info/doc/howto/various/run-in-medium-trust.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.