Problems with FluentNhibernate in hosting

1

I 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 that I configure IIS.

But I hired a hosting that is the UolHost, and I am having problems with the message below when accessing a controller that establishes connection with 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.

This is the first time I'm hosting a site in this type of environment

If I debug my project on my computer, pointing to the UolHost hosting database works as well, ie my WebConfig is correct so far

I'll be grateful for the help

    
asked by anonymous 08.09.2015 / 03:41

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] on the MSDN for more information.

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

link

link

link

    
08.09.2015 / 14:00