+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / That assembly does not allow partially trusted callers

That assembly does not allow partially trusted callers

22 posts, 0 answered
  1. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    23 Jul 2009
    Link to this post
    Hello,

    I am a hosting reseller and I am testing the community edition as I'd like to offer it as my preferred CMS package to clients. I already have one client wanting to use the product after seeing it on my local system.

    I'm getting a security exception and have tried the usual web.config changes (trust level="Medium", etc.)  and I am in need of assistance.

    I suspect one or more of the .dll files for connecting to MySQL is missing the AllowPartiallyTrustedCallersAttribute but have not verified this as of yet.

    Deployed 3.6 Community Edition to Rackspace's cloud sites:
        Windows 2008/IIS
        MySQL5 Database

    I also have my local instance of the site connecting to the same MySQL database for the cloud site and it runs fine although it's very slow since the DB is not local to it ;)

    Stack Trace:
    [SecurityException: That assembly does not allow partially trusted callers.]
       Nolics.ORMapper.DataProviders.SQLDataProvider.Open() +123
       Telerik.DataAccess.NolicsHelper.SetConnection(String connectionName, String providerName) +830
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +214
       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




    Any assistance is greatly appreciated!
  2. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    23 Jul 2009
    Link to this post
    Forgot to mention, I have not made any custom controls or changes to anything other than the web.config.
  3. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    23 Jul 2009
    Link to this post
    Hi Toby,

    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.

    All the best,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    23 Jul 2009
    Link to this post
    Looks like they don't have that dll in GAC.

    Could not load file or assembly 'MySql.Data, Version=5.0.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

    Would you happen to have a recompiled MySql.Data.dll with the AllowPartiallyTrustedCallersAttribute  set? Plenty come up on a search but I won't trust them (personally) unless it comes from your team or from the MySQL team.

    On the MySQL side, there are newer versions of the dll from MySQL download site and I'm checking the 6.0.4 version now but I'd rather use the same version ,5.0.7, (with proper attribute set) that came with the package.

    BTW, you guys rock for putting out this CMS community version. It was discouraging to see so many CMS systems in PHP and not much could stand up to them in the .NET world until this product came along. I could ramble on about this but I think you get the picture.

    Kind regards,

    Toby

  5. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    23 Jul 2009
    Link to this post
    Update:

    I download the MySql.Data.dll version 5.1.7.0 that has the AllowPartiallyTrustedCallers Attribute set from the MySql download site and uploaded to the web site.

    I modified the web.config <runtime> section as follows:

    <

     

    dependentAssembly>

     

    <

     

    assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" />

     

    <

     

    bindingRedirect oldVersion="5.0.7.0" newVersion="5.1.7.0" />

     

    </

     

    dependentAssembly>

     


    I now get the following exception:
    [SecurityException: Request for the permission of type 'System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessPermission.Demand() +58
       System.Net.Sockets.Socket.CheckCacheRemote(EndPoint& remoteEP, Boolean isOverwrite) +155
       System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) +133
       System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) +125
       MySql.Data.Common.StreamCreator.CreateSocketStream(IPAddress ip, Boolean unix) +168
       MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout) +389
       MySql.Data.MySqlClient.NativeDriver.Open() +219

    I'll be contacting Rackspace shortly asking for the MySql.Data.dll version 5.1.7.0 to be added to the GAC as part of their standard build but not sure if and when that'll happen.

    Any other suggestions?

    Thanks,

    Toby
  6. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    24 Jul 2009
    Link to this post
    Hello Toby,

    Seems the AllowPartiallyTrustedCallers attribute is not enough to use this assembly. The options are to have it in the GAC,  or allowed System.Net.SocketPermission in the security settings. The both depends on the shared hosting. May by they do not support MySQL database with .NET applications.

    Regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    24 Jul 2009
    Link to this post
    The MySQL.Data.dll is in the GAC on the server but it is version 5.2.5.0.

    I have my workstation configured as close as I can get it to the server. I could only find MySQL.Data.dll version 5.2.7.0 to download so I added that to the GAC on my worstation and deleted the MySQL.Data.dll from the bin directory  - I adjusted the web.config to reflect that minor version difference on my local instance (Vista/IIS6).

    My local instance is pointing to the same MySQL instance the server instance is pointing to and the site will render through my local IIS. I have created content for all of the modules from my local instance and everything runs fine locally.

    I have deleted all the files in the bin folder and the App_Data folder on the server instance and uploaded them again from my local instance that is working with the same database the server instance points to. I modified the web.config to do the bindingRedirect to the proper MySQL.Data.dll version (5.2.5.0) on the server.
     
    The server instance gives me the following stack trace:

    [ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.]
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +2181
       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
    

    I assume I have finally gotten past all the MySQL connection issues to get to this error. Please correct me if I'm wrong.

    If I have created content in all of the modules (even configured smtp to use the hosting email server and sent a newsletter as a test) from my local instance connected to the server database and everything is rendering fine locally I would think that the database is 'upgraded' at this point?

    The SchemaVersion row in the DB matches the version number rendered in the "Generator" meta tag on my local instance - the version is 1936. All the files in the bin folder on the server matches what's on my local instance.

    What else can I do to move this forward?

    Toby

  8. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    26 Jul 2009
    Link to this post
    More information.

    I deleted everything I had on the server and uploaded the working local version to the server making only the necessary web.config changes for that environment - same error.

    I got an email last night about Rackspace modifying their clusters to a modified medium security policy detailed here. http://help.rackspacecloud.com/article.php?id=383

    Looked like the settings they are deploying will be enough to address most of the problems I've had up to this point. So I'm thinking maybe this less restrictive policy will, hopefully, clear everything up and I can get back to business of selling hosting and not messing around with making Sitefinity run on my hosting platform.

    So I contact support and ask to have a site created on a cluster with the new configuration so I can test it with Sitefinity. Turns out my currently deployed test site IS on a cluster with the new configuration. Back to the state of my last post in this thread where I'm stuck with the Telerik.DataAccess.ProviderDatabaseUpgradeException.

    So I start searching the web again trying to gather as much information as I can about this error to try and find a solution and I come across this thread:http://www.sitefinity.com/support/forums/sitefinity-3-x/deployment/help-internal-server-error-5-with-godaddy.aspx. This is almost identical to everything I've encountered to this point. Unfortunately, switching to a SQL Server database will force me to double the price for a site with Sitefinity deployed and my client's costs will go up for every additional 100MB of data in the db. This makes Sitefinity unsuitable as an offering to most potential customers as DotNetNuke (many sites sharing a single database) and all of the PHP based CMS systems I offer are more cost effective options.

    I'll be blunt, the Sitefinity Community Edition is the best CMS system I've found to meet my customers needs for an intuititive and full featured CMS system. But it has to work in a variety of shared hosting environments with MySQL to be a viable option and so far, based on the forum thread I link to above and my experience, it is not viable on at least two hosting providers when using the MySQL Database as the backend.

    So, in an effort to have the ability to offer what I think is a great product and for you, Telerik, to address a recurring problem that I believe you will only see more of as the popularity of the product grows I offer the following:

     I will set you guys up with an account and provision a site with a MySQL database at no cost to you on the Rackspace platform so you can have direct access to a site having this type issue. I'll provision 20 sites and MySQL databases under the account if need be. It can have one of my un-used domain names or you can supply a domain name - whatever you want. I will contact the support team and ask them to accept your contact by phone or chat as if it were coming from me. I will assist where ever I can with my knowledge of .NET and IIS - I've been doing web application development since before .NET came into being. I think there is a high probablity that once this is resolved on Rackspace it will also be resolved on GoDaddy and any other hosting provider where this issue comes up. I will also provision sites for you to test future versions on if you so wish.

    If we can get this issue resolved I also intend to develop modules to contribute to the community starting with a standard contact form unless that one has been done already. I haven't dug into what modules are available outside the box yet.

    You can contact me through the email in my profile or at service@avidintegrationtechnologies.com.

    Kind regards,

    Toby
  9. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    27 Jul 2009
    Link to this post
    Hi Toby,

    Thank you for the provided information.
    You are on the right direction on trying to the detect the problem. However, may be the real exception is not displayed to the user, because it is thrown in a try...catch block.

    What I mean?
    The System tries to get the Sitefinity  SchemeVersion form the database (You said that it is 1936 in the sf_CmsVariables table) in order to compare it with the build version of the assembly in the bin folder. The upgrade process starts in one of the following cases:
     - getting the SchemeVerion fails;
     - build version number is different.

    We suspect that this problem is related to the first scenario.
    The code implementation assumes that, if getting the SchemeVersion fails, the database is not complete and should be upgraded.

    How to get the real exception?
    We created a dummy CmsProvider, which should throw this exception in the browser. Is it possible for you to run it in your web site. You should do the following:
    1. Unzip the attached archive and copy DummyCmsProvider.cs file in the ~/App_Code;
    2. In the Web.config, replace the original Cms data provider with the fake one:
    <cms defaultProvider="Sitefinity" pageExtension=".aspx" disabled="false" 
      pageEditorUIMode="Overlay"
      <providers> 
        <clear /> 
        <add connectionStringName="DefaultConnection" allowPageHistory="true" 
          allowPageWorkflow="false" cachingProviderName="ASPNET" name="Sitefinity" 
          type="Sitefinity.Testing.DummyCmsProvider, App_Code" /> 
      </providers> 


    We need to get the details of the error thrown in the Initialize method of the provider:
        // The only perpose of this code is to see the exception thrown in the Initialize method 
        public class DummyCmsProvider : CmsProvider 
        { 
            public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) 
            { 
                if (string.IsNullOrEmpty(name)) 
                    name = "DefaultSitefinityProvider"
     
                if (string.IsNullOrEmpty(config["description"])) 
                { 
                    config.Remove("description"); 
                    config.Add("description""Dummy CMS Provider"); 
                } 
                base.Initialize(name, config); 
     
                Assembly assambly = Assembly.GetExecutingAssembly(); 
                DataConnection.Initialize(false, assambly); 
                this.odbProvider = Telerik.DataAccess.NolicsHelper.SetConnection(config["connectionStringName"], name); 
     
                int prevVersion = -1; 
                bool upgrade = false
                int buildVersion = assambly.GetName().Version.Build; 
                try 
                { 
                    prevVersion = int.Parse(this.GetVariable("SchemaVersion"true)); 
                    if (prevVersion != buildVersion) 
                        upgrade = true
                } 
                catch (Exception err) 
                { 
                    upgrade = true
                     
                    throw err; 
                } 
     
            } 
     
            ... 


    Please do let us know how it goes, and thank you for the assistance.

    Best wishes,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    28 Jul 2009
    Link to this post
    Try...Catch block? What's that? Just joking :)

    I made the changes in the web.config and uploaded the dummy provider. Had a few errors right away about 'no suitable method to override' for two of the 'not implemented' methods so I commented those out and tried again.

    I think we're getting somewhere now.

    Line 38:             int buildVersion = assambly.GetName().Version.Build;

    causes the following stack trace:

    [SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessPermission.Demand() +58
       System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
       System.Reflection.Assembly.GetName(Boolean copiedName) +70
       System.Reflection.Assembly.GetName() +9
       Sitefinity.Testing.DummyCmsProvider.Initialize(String name, NameValueCollection config) in \\fs1-n01\stor1wc1dfw1\377070\autogroup1.avidintegrationtechnologies.com\web\content\App_Code\DummyCmsProvider.cs:38
       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

    Looks like it is still a trust permission issue. What seems odd to me is that a Medium Trust config should allow you to read, write, append and PathDiscovery on the application's virtual directory. I'll give it some thought and maybe even tinker around with trying to get the assembly version. Never had a need to read the version before so this could get interesting but please don't let my effort stop you guys from coming up with a solution :)

    I did try one thing, I changed the code to throw an exception that would display the assemblie's FullName property and that also generated the same type of error.

    Let me know if there anything else you want me to try.

    -Toby


  11. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    28 Jul 2009
    Link to this post
    Hi Toby,

    Seems we forgot to hardcode the version number after pasting the code from the original provider. Sorry for the omission.
    The implementation should be:
    ... 
     
    int prevVersion = -1; 
    bool upgrade = false
    int buildVersion = 1936//assambly.GetName().Version.Build; 
    try 
        prevVersion = int.Parse(this.GetVariable("SchemaVersion"true)); 
        if (prevVersion != buildVersion) 
            upgrade = true
    catch (Exception err) 
        upgrade = true
         
        throw err; 
     
    ... 

    We need the exception thrown by  GetVariable("SchemaVersion", true) method (the line highlighted in yellow).

    You can make the changes manually, however we are sending to you the updated dummy provider. Could you please try again with it?

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. Toby
    Toby avatar
    8 posts
    Registered:
    20 Jul 2009
    29 Jul 2009
    Link to this post
    I am up and running!

    Just starting to test all the functionality on the server site but it sure is good to see the site rendering now!

    After updating the code in the dummycmsprovider.cs file to explicitly set the integer value as instructed I got the following error:
    SELECT command denied to user 'user@'xxx.xxx.xxx.xxx' 'for table 'proc'

    This is a known error for MySQL and is corrected by adding 'use procedure bodies=false;'  to the connection string in the web.config.

    Make sure the semi-colon is present at the end of this addition - it matters in my case.

    My connection string now looks like (replaced sensitive info with dummy values):
    <add name="Sitefinity" connectionString="Server=mySql_instance;Uid=MyUserID;Pwd=MyPassword;Database=MyDatabaseName;use procedure bodies=false;" providerName="MySql.Data.MySqlClient" />

    Note: I added the providerName in the connectionstring manually after I added the following section just above the <connectionStrings> section:
      <system.data>
        <DbProviderFactories>
          <clear />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
          description=".Net Framework Data Provider for MySQL"
          type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.2.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
        </DbProviderFactories>
      </system.data>

    This <system.data> section may not be relevant for some deployments on shared hosting but it did matter on mine. I had to do this to make sure the proper MySQL provider version was mapped to the DbProviderFactories.

    I still have the remapping of the MySQL.Data.dll to the version deployed in the GAC on the server using:
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" />
            <bindingRedirect oldVersion="5.0.7.0" newVersion="5.2.5.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    So all this finally got me up and running in a Modified Medium Trust environment using the MySQL Database Provider. I think this should work on GoDaddy hosting but someone who hosts there will need to try it. If they run into problems or have questions related to this web.config they are welcome to email me at service@avidintegrationtechnologies.com.

    To the Telerik team, a big THANK YOU for the guidance and assitance with getting this working. I look forward to working with the product and contributing to the community where I can.

    -Toby






  13. Georgi
    Georgi avatar
    3583 posts
    Registered:
    20 Sep 2016
    29 Jul 2009
    Link to this post
    Hi Toby,

    We are really glad that you get it working.
    Let us know if our team could be of further help!

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  14. Roland
    Roland avatar
    12 posts
    Registered:
    07 Apr 2009
    29 Dec 2009
    Link to this post
    I've been trying for days to get this (Sitefinity Community 3.7 sp1 ASP.NET 2.0) working with Rackspace.

    I've tried adding the DummyCMS but I get the following error:
    The method or operation is not implemented.

    Line 223:        public override string GetVariable(string name)  
    Line 224:        {  
    Line 225:            throw new NotImplementedException();  
    Line 226:        }  
    Line 227: 
    \App_Code\DummyCmsProvider.cs    Line: 225

    Any suggestions?

    Thanks!
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    29 Dec 2009
    Link to this post
    Hi Roland,

    It is obvious that you will get this error, since there is the following line in the code you pasted "throw new NotImplementedException();". Here you are explicitly throwing not implemented exception. Also you have to set your version for the local variable buildVersion.

    All the best,
    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.
  16. Roland
    Roland avatar
    12 posts
    Registered:
    07 Apr 2009
    30 Dec 2009
    Link to this post
    Thanks for the reply Ivan.

    Yes, there will be an exception thrown, but result left me wondering what I was missing.

    I re-read the post and found where the build version was coming from (sf_CmsVariables table).
    The build version is 2022.
    The variable has been updated and I have run it locally while maintaining the connection to the MySQL DB on Mosso (Rackspace). I don't have a local MySQL server running.

    The Result:

    Exception Details: System.NotImplementedException: The method or operation is not implemented.

    Source Error:

    Line 223:        public override string GetVariable(string name)
    Line 224:        {
    Line 225: throw new NotImplementedException();Line 226:        }
    Line 227:

    Source File: e:\APLUSWATER\App_Code\DummyCmsProvider.cs    Line: 225

    Stack Trace:

    [NotImplementedException: The method or operation is not implemented.]
       Sitefinity.Testing.DummyCmsProvider.GetVariable(String name) in e:\APLUSWATER\App_Code\DummyCmsProvider.cs:225
       Telerik.Cms.CmsManager.GetVariable(Variables name) +41
       Telerik.Cms.Web.HomePageInfo..ctor() +40
       Telerik.Cms.Web.UrlHelper.get_HomePage() +89
       Telerik.Cms.Web.CmsHttpModule.BeginRequest(Object sender, EventArgs e) +1601
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    

    I don't see anything here that helps me.

    What am I missing, or doing wrong?

    Thanks,
    Roland
  17. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    30 Dec 2009
    Link to this post
    Hi Roland,

    This means that there is no error caught in the custom provider and Initialize method. I suggest that you should contact your host and ask them which version of MySql.Data.dll they use and whether this assembly is added to the GAC. Generally you can remove the MySql.Data.dll from your bin.

    Kind regards,
    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.
  18. Roland
    Roland avatar
    12 posts
    Registered:
    07 Apr 2009
    31 Dec 2009
    Link to this post
    I have just received the information from Rackspace.

    Rackspace team: "The Version of the GAC is  v5.2.5"

    Armed with that information, what do I need to do to get Sitefinity to work in that environment?

    Thanks!
  19. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    04 Jan 2010
    Link to this post
    Hi Roland,

    1. Remove the MySql.Data.dll from your bin.
    2. Create a bindingRedirect to MySql.Data version 5.2.5 in your web.config. More information at MSDN.

    sample

    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
          <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d"/>
          <bindingRedirect oldVersion="5.0.7.0" newVersion="5.2.5"/>
       </dependentAssembly>
    </assemblyBinding>
    </runtime>


    All the best,
    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.
  20. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    30 Apr 2010
    Link to this post
    Hi,
    I've tried using the DummyCmsProvider with version 2096 and got this error:

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0534: 'Sitefinity.Testing.DummyCmsProvider' does not implement inherited abstract member 'Telerik.Cms.CmsProvider.GetAllPages(int, int, string, System.Collections.Generic.IList<Telerik.Cms.CmsQueryCondition>, out int)'

    Source Error:

    Line 8:  {
    Line 9:      // The only perpose of this code is to see the exception thrown in the Initialize method
    Line 10:     public class DummyCmsProvider : CmsProvider
    Line 11:     {
    Line 12:         public override string Application

    Can you please advise?

    Thanks!
    Devin
  21. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    02 May 2010
    Link to this post
    Hi Devin,

    You should implement the abstract members (GetAllPages ) that the class require.

    sample code

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Cms;
     
    /// <summary>
    /// Summary description for Class1
    /// </summary>
    public class Class1 : CmsProvider
    {
        public Class1()
        {
            //
            // TODO: Add constructor logic here
            //
        }
     
        public override string Application
        {
            get { throw new NotImplementedException(); }
        }
     
        public override Telerik.Security.SecurityManager SecurityManager
        {
            get { throw new NotImplementedException(); }
        }
     
        public override bool AllowPageHistory
        {
            get { throw new NotImplementedException(); }
        }
     
        public override bool AllowPageWorkflow
        {
            get { throw new NotImplementedException(); }
        }
     
        public override string SecurityProviderName
        {
            get { throw new NotImplementedException(); }
        }
     
        public override OutputCachingMode CachingMode
        {
            get { throw new NotImplementedException(); }
        }
     
        public override Telerik.Caching.CachingManager Cache
        {
            get { throw new NotImplementedException(); }
        }
     
        public override IPage GetPage(Guid id, bool forEdit)
        {
            throw new NotImplementedException();
        }
     
        public override IPage GetChildPageByName(Guid parentId, string pageName)
        {
            throw new NotImplementedException();
        }
     
        public override IPage GetPageByAdditionalUrl(string url)
        {
            throw new NotImplementedException();
        }
     
        public override ICmsPage GetCmsPage(Guid id)
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetPages()
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetAllPages(int from, int maxRows, string sortExpr, IList<CmsQueryCondition> filter, out int totalRows)
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetPages(Guid parentId)
        {
            throw new NotImplementedException();
        }
     
        public override void SavePage(IPage page)
        {
            throw new NotImplementedException();
        }
     
        public override void SetPageOrdinal(Guid pageId, int ordinal)
        {
            throw new NotImplementedException();
        }
     
        public override void SetPageOrdinal(ICmsPage page, int ordinal)
        {
            throw new NotImplementedException();
        }
     
        public override IRootPage GetRootPage()
        {
            throw new NotImplementedException();
        }
     
        public override IRootPage CreateRootPage()
        {
            throw new NotImplementedException();
        }
     
        public override ICmsPage CreatePage(string name, Guid parentId)
        {
            throw new NotImplementedException();
        }
     
        public override void DeletePage(Guid id)
        {
            throw new NotImplementedException();
        }
     
        public override void DeletePage(IPage page)
        {
            throw new NotImplementedException();
        }
     
        public override void SetParent(Guid sourceId, Guid targetId, int ordinal)
        {
            throw new NotImplementedException();
        }
     
        public override void SetParent(ICmsPage source, ICmsPage target, int ordinal)
        {
            throw new NotImplementedException();
        }
     
        public override ICmsPage DuplicatePage(ICmsPage page, string pageName, bool recursive, Guid parentId)
        {
            throw new NotImplementedException();
        }
     
        public override IPageTemplate CreateTemplate(string name)
        {
            throw new NotImplementedException();
        }
     
        public override IPageTemplate DuplicateTemplate(IPageTemplate template)
        {
            throw new NotImplementedException();
        }
     
        public override IPageTemplate GetTemplate(string name)
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetTemplates()
        {
            throw new NotImplementedException();
        }
     
        public override ICmsWebControl GetControl(Guid id, bool forEdit)
        {
            throw new NotImplementedException();
        }
     
        public override void SaveControl(ICmsWebControl control)
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetControls(string typeName, bool isAscx)
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetPagesForControl(Type type)
        {
            throw new NotImplementedException();
        }
     
        public override string GetVariable(string name)
        {
            throw new NotImplementedException();
        }
     
        public override void SetVariable(string name, string value)
        {
            throw new NotImplementedException();
        }
     
        public override System.Collections.IList GetUrls()
        {
            throw new NotImplementedException();
        }
     
        public override void SetHomePage(ICmsPage page)
        {
            throw new NotImplementedException();
        }
     
        public override string GetPageFromCache(string url)
        {
            throw new NotImplementedException();
        }
     
        public override void AddPageToCache(string url, string response)
        {
            throw new NotImplementedException();
        }
     
        public override void ClearPageCache()
        {
            throw new NotImplementedException();
        }
     
        public override System.Data.DataSet Export()
        {
            throw new NotImplementedException();
        }
     
        public override void Import(System.Data.DataSet source)
        {
            throw new NotImplementedException();
        }
     
        public override ICmsPage GetPageByWorkflow(Guid workflowID)
        {
            throw new NotImplementedException();
        }
     
        public override ICmsPage GetPageLanguageVersion(Guid pageID, int langID)
        {
            throw new NotImplementedException();
        }
    }


    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  22. yessenia pennelope henriquez duran
    yessenia pennelope henriquez duran avatar
    1 posts
    Registered:
    13 Sep 2005
    13 May 2011
    Link to this post
    The probleme it's because dll files is missing the AllowPartiallyTrustedCallersAttribute 

    Here is what resolve the probleme: Web application should have "High" trust level. 

    After reading 
    http://msdn.microsoft.com/library/def... 

    I understand that we have to add a section in web.config, and my web.config looks like:

Register for webinar
22 posts, 0 answered