More in this section

Forums / Bugs & Issues / Medium trust issue at webhost (

Medium trust issue at webhost (

4 posts, 0 answered
  1. Albin Malmgren
    Albin Malmgren avatar
    3 posts
    24 Sep 2009
    23 Oct 2009
    Link to this post

    I have the same problem with medium trust like many others with SiteFinity 3.7. I've red a lot of threads but get no solutions!

    My host have a medium trust level config and I have problem to reach my MySql database (I think!) 

    For better exceptions I switched my dev enironment to my hosts custommedium config. 

    Line 24:             Assembly assambly = Assembly.GetExecutingAssembly(); 
    Line 25:             DataConnection.Initialize(false, assambly); 
    Line 26:             this.odbProvider = Telerik.DataAccess.NolicsHelper.SetConnection(config["connectionStringName"], name); 
    Line 27:  
    Line 28:             int prevVersion = -1; 

    [SecurityException: That assembly does not allow partially trusted callers.] 
       Nolics.ORMapper.DataProviders.SQLDataProvider.Open() +123 
       Telerik.DataAccess.NolicsHelper.SetConnection(String connectionName, String providerName) +830 
       Sitefinity.Testing.DummyCmsProvider.Initialize(String name, NameValueCollection config) in c:\Program Files\telerik\Sitefinity3.7 Community\WebSites\Byggmiljovanligare\App_Code\DummyCmsProvider.cs:26 
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673 
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91 
       Telerik.ManagerBase`1.SetProvider(String providerName) +203 
       Telerik.ManagerBase`1..ctor(String providerName) +89 
       Telerik.ManagerBase`1..ctor() +11 
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +38 
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86 
       System.Web.HttpApplication.InitModulesCommon() +65 
       System.Web.HttpApplication.InitModules() +43 
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729 
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298 
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107 
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289 

    My Configstring
    <add name="Sitefinity" connectionString=";Uid=xxx;Pwd=xxx;Database=xxx;use procedure bodies=false;" 
          providerName="MySql.Data.MySqlClient" /> 

    So now I have done all I could and preciate some support from you guys:) I can't unfortunately switch webhost and I really like your product!

    Best regards

  2. Mr. Plinko
    Mr. Plinko avatar
    13 posts
    16 Jul 2009
    23 Oct 2009
    Link to this post

    I got some really good information on Sitefinity Medium Trust from these two sites:


    The biggest thing besides modifying the web.config is to create content with each module in the developer environment before uploading.

    "The Sitefinity module providers cannot get their database objects created in medium trust environment and you may get errors. To prevent this, you need to enforce database upgrade in full trust environment, in your local Web site. Creating at least one content item in each module before uploading the upgraded database to the production server and setting the trust level to medium will initialize all modules in the database."

    I hope this helps!

  3. Albin Malmgren
    Albin Malmgren avatar
    3 posts
    24 Sep 2009
    26 Oct 2009
    Link to this post
    Thanks a lot, but I already has tried to set the allowWorkflow=false, disable healthMonitoring etc. in the config.  I also created the project locally with the same remoted databas connection and everthing works fine local.

    It's something med the ORM and Nolics?

    Please help, I really want to buy and use your product.

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    30 Oct 2009
    Link to this post
    Hello Albin Malmgren,

    Try to delete MySql.Data.dll file from the bin folder of your project. As your hosting supports MySQL, this assembly should be in the GAC. You may also find the following post useful.

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered